> ## Documentation Index
> Fetch the complete documentation index at: https://aisa.one/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Firecrawl 解析

> 上传 HTML 文件并获得解析后的 markdown——当你手上已经有 HTML 时很有用。

上传单个 HTML/HTM 文件并获得解析后的 markdown。当你已经拥有原始 HTML（例如保存下来的页面，或自有流水线生成的文档），并希望 Firecrawl 在不联网抓取的情况下把它清洗成 markdown 时使用。请求为 `multipart/form-data`，包含两个字段：`file`（上传的 HTML）和 `options`（JSON 字符串）。在计量模式下，`options` 必须把 `proxy` 设为 `"basic"`，且最多只能额外把 `formats` 设为 `["markdown"]`；`options` 字符串限制为 64 KB。

计费按 Firecrawl credit 计量——Parse 消耗 1 credit。


## OpenAPI

````yaml openapi/zh/firecrawl.json POST /firecrawl/parse
openapi: 3.0.0
info:
  title: Firecrawl API
  version: 1.0.0
  description: >-
    Firecrawl 各 endpoint 的统一 API 文档，包括 Scrape、Search、Map、Parse、Crawl 和 Batch
    Scrape。Scrape、Search、Map 和 Parse 是同步接口。Crawl 和 Batch Scrape
    是异步接口：调用方提交任务，然后轮询返回的任务资源以获取状态和结果。


    计费按消耗的 Firecrawl credit 计量，而不是按请求固定收费，因此总费用随任务产生的页面、链接或结果数量增长。大致 credit
    消耗：Scrape = 每页 1 credit，Map = 每页 1 credit，Search = 每 10 条结果约 2 credits，Crawl
    = 每页 1 credit，Batch Scrape = 每页 1 credit。每个 credit 对应的美元费率取决于你的等级（normal
    $0.005，vip $0.004，svip $0.0034）。
servers:
  - url: https://api.aisa.one/apis/v1
security:
  - bearerAuth: []
paths:
  /firecrawl/parse:
    post:
      tags:
        - https://docs.firecrawl.dev/api-reference/endpoint/parse
      summary: 把上传的 HTML 文件解析成 markdown。
      description: >-
        同步接口。上传单个 HTML/HTM 文件并获得解析后的 markdown。该 endpoint 使用
        multipart/form-data，包含两个字段：file（上传的 HTML）和 options（JSON
        字符串）。在计量模式下，options 必须把 proxy 设为 "basic"，且最多只能额外把 formats 设为
        ["markdown"]。options JSON 字符串限制为 64 KB。计费为 1 个 Firecrawl credit。
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: 要解析的 HTML/HTM 文件。必须是 text/html 内容类型，或文件名以 .html/.htm 结尾。
                options:
                  type: string
                  description: >-
                    解析选项的 JSON 字符串。必须包含 proxy="basic"；可以额外包含
                    formats=["markdown"]。不允许其他键。
                  example: '{"proxy":"basic","formats":["markdown"]}'
              required:
                - file
                - options
      responses:
        '200':
          description: 解析成功完成。
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: 解析成功时为 true。
                  data:
                    type: object
                    properties:
                      markdown:
                        type: string
                        description: 以 markdown 表示的解析内容。
                  creditsUsed:
                    type: integer
                    description: 消耗的 Firecrawl credits（1 个）。
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````