Firecrawl Scraping API

The Scraping API from Firecrawl — 6 operation(s) for scraping.

Operations 8

POST /scrape Scrape a single URL and optionally extract information using an LLM #
POST /scrape/{jobId}/interact Interact with the browser session associated with a scrape job #
DELETE /scrape/{jobId}/interact Stop the interactive browser session associated with a scrape job #
POST /parse Upload and parse a file #
POST /batch/scrape Scrape multiple URLs and optionally extract information using an LLM #
GET /batch/scrape/{id} Get the status of a batch scrape job #
DELETE /batch/scrape/{id} Cancel a batch scrape job #
GET /batch/scrape/{id}/errors Get the errors of a batch scrape job #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/firecrawl-scraping-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

firecrawl-scraping-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Firecrawl Account Scraping API
  version: v2
  description: API for interacting with Firecrawl services to perform web scraping and crawling tasks.
  contact:
    name: Firecrawl Support
    url: https://firecrawl.dev/support
    email: support@firecrawl.dev
servers:
- url: https://api.firecrawl.dev/v2
security:
- bearerAuth: []
tags:
- name: Scraping
paths:
  /scrape:
    post:
      summary: Scrape a single URL and optionally extract information using an LLM
      operationId: scrapeAndExtractFromUrl
      tags:
      - Scraping
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - type: object
                properties:
                  url:
                    type: string
                    format: uri
                    description: The URL to scrape
                required:
                - url
              - $ref: '#/components/schemas/ScrapeOptions'
              - type: object
                properties:
                  zeroDataRetention:
                    type: boolean
                    default: false
                    description: If true, this will enable zero data retention for this scrape. To enable this feature, please contact help@firecrawl.dev
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScrapeResponse'
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Request rate limit exceeded. Please wait and try again later.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  code:
                    type: string
                    example: UNKNOWN_ERROR
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
  /scrape/{jobId}/interact:
    post:
      summary: Interact with the browser session associated with a scrape job
      operationId: interactWithScrapeBrowserSession
      tags:
      - Scraping
      security:
      - bearerAuth: []
      parameters:
      - name: jobId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The scrape job ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - code
              properties:
                code:
                  type: string
                  minLength: 1
                  maxLength: 100000
                  description: Code to execute in the scrape-bound browser sandbox
                language:
                  type: string
                  enum:
                  - python
                  - node
                  - bash
                  default: node
                  description: Language of the code to execute. Use `node` for JavaScript or `bash` for agent-browser CLI commands.
                timeout:
                  type: integer
                  minimum: 1
                  maximum: 300
                  default: 30
                  description: Execution timeout in seconds
                origin:
                  type: string
                  description: Optional origin label used for execution telemetry
      responses:
        '200':
          description: Code executed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  stdout:
                    type:
                    - string
                    - 'null'
                    description: Standard output from the code execution
                  result:
                    type:
                    - string
                    - 'null'
                    description: Standard output (alias for stdout)
                  stderr:
                    type:
                    - string
                    - 'null'
                    description: Standard error output from the code execution
                  exitCode:
                    type:
                    - integer
                    - 'null'
                    description: Exit code of the executed process
                  killed:
                    type: boolean
                    description: Whether the process was killed due to timeout
                  error:
                    type:
                    - string
                    - 'null'
                    description: Error message if the code raised an exception
        '400':
          description: Invalid job ID
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Invalid job ID format.
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Payment required to access this resource.
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Forbidden.
        '404':
          description: Scrape job not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Job not found.
        '409':
          description: Scrape replay context is unavailable or session could not be initialized
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Replay context is unavailable for this scrape job. Please rerun the scrape.
        '410':
          description: Scrape browser session has already been destroyed
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Browser session has been destroyed.
        '429':
          description: Too many active browser sessions
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: You have reached the maximum number of active browser sessions.
        '502':
          description: Failed to communicate with browser service
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to execute code in browser session.
    delete:
      summary: Stop the interactive browser session associated with a scrape job
      operationId: stopInteractiveScrapeBrowserSession
      tags:
      - Scraping
      security:
      - bearerAuth: []
      parameters:
      - name: jobId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The scrape job ID
      responses:
        '200':
          description: Interactive scrape browser session stopped successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Forbidden.
        '404':
          description: Interactive scrape browser session not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Browser session not found.
  /parse:
    post:
      summary: Upload and parse a file
      operationId: parseFile
      tags:
      - Scraping
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
                  description: 'The file bytes to parse. Supported extensions: .html, .htm, .pdf, .docx, .doc, .odt, .rtf, .xlsx, .xls.'
                options:
                  $ref: '#/components/schemas/ParseOptions'
              required:
              - file
            encoding:
              options:
                contentType: application/json
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScrapeResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  code:
                    type: string
                    example: BAD_REQUEST
                  error:
                    type: string
                    example: Invalid multipart form-data request.
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Request rate limit exceeded. Please wait and try again later.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  code:
                    type: string
                    example: UNKNOWN_ERROR
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
  /batch/scrape:
    post:
      summary: Scrape multiple URLs and optionally extract information using an LLM
      operationId: scrapeAndExtractFromUrls
      tags:
      - Scraping
      security:
      - bearerAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              allOf:
              - type: object
                properties:
                  urls:
                    type: array
                    items:
                      type: string
                      format: uri
                      description: The URL to scrape
                  webhook:
                    type: object
                    description: A webhook specification object.
                    properties:
                      url:
                        type: string
                        description: The URL to send the webhook to. This will trigger for batch scrape started (batch_scrape.started), every page scraped (batch_scrape.page) and when the batch scrape is completed (batch_scrape.completed or batch_scrape.failed). The response will be the same as the `/scrape` endpoint.
                      headers:
                        type: object
                        description: Headers to send to the webhook URL.
                        additionalProperties:
                          type: string
                      metadata:
                        type: object
                        description: Custom metadata that will be included in all webhook payloads for this crawl
                        additionalProperties: true
                      events:
                        type: array
                        description: 'Type of events that should be sent to the webhook URL. (default: all)'
                        items:
                          type: string
                          enum:
                          - completed
                          - page
                          - failed
                          - started
                    required:
                    - url
                  maxConcurrency:
                    type: integer
                    description: Maximum number of concurrent scrapes. This parameter allows you to set a concurrency limit for this batch scrape. If not specified, the batch scrape adheres to your team's concurrency limit.
                  ignoreInvalidURLs:
                    type: boolean
                    default: true
                    description: If invalid URLs are specified in the urls array, they will be ignored. Instead of them failing the entire request, a batch scrape using the remaining valid URLs will be created, and the invalid URLs will be returned in the invalidURLs field of the response.
                required:
                - urls
              - $ref: '#/components/schemas/ScrapeOptions'
              - type: object
                properties:
                  zeroDataRetention:
                    type: boolean
                    default: false
                    description: If true, this will enable zero data retention for this batch scrape. To enable this feature, please contact help@firecrawl.dev
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchScrapeResponseObj'
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Request rate limit exceeded. Please wait and try again later.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
  /batch/scrape/{id}:
    parameters:
    - name: id
      in: path
      description: The ID of the batch scrape job
      required: true
      schema:
        type: string
        format: uuid
    get:
      summary: Get the status of a batch scrape job
      operationId: getBatchScrapeStatus
      tags:
      - Scraping
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchScrapeStatusResponseObj'
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Request rate limit exceeded. Please wait and try again later.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
    delete:
      summary: Cancel a batch scrape job
      operationId: cancelBatchScrape
      tags:
      - Scraping
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Successful cancellation
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Batch scrape job successfully cancelled.
        '404':
          description: Batch scrape job not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Batch scrape job not found.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
  /batch/scrape/{id}/errors:
    parameters:
    - name: id
      in: path
      description: The ID of the batch scrape job
      required: true
      schema:
        type: string
        format: uuid
    get:
      summary: Get the errors of a batch scrape job
      operationId: getBatchScrapeErrors
      tags:
      - Scraping
      security:
      - bearerAuth: []
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CrawlErrorsResponseObj'
        '402':
          description: Payment required
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Payment required to access this resource.
        '429':
          description: Too many requests
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Request rate limit exceeded. Please wait and try again later.
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: An unexpected error occurred on the server.
components:
  schemas:
    ScrapeOptions:
      type: object
      properties:
        formats:
          $ref: '#/components/schemas/Formats'
        onlyMainContent:
          type: boolean
          description: Only return the main content of the page excluding headers, navs, footers, etc. This is a deterministic HTML-level filter applied before markdown is generated; no LLM is involved.
          default: true
        onlyCleanContent:
          type: boolean
          description: Beta. Run an additional LLM-based pass over the generated markdown to remove residual boilerplate that `onlyMainContent` can miss (cookie banners, ad blocks, social share widgets, breadcrumbs, newsletter signups, comment sections, related-article lists). Headings, lists, tables, code blocks, image references, and inline links are preserved. Can be combined with `onlyMainContent` (the most common setup) or used on its own. Skipped with a warning when the markdown exceeds the cleaning model's output token limit (the original markdown is preserved). Not supported on zero-data-retention requests.
          default: false
        includeTags:
          type: array
          items:
            type: string
          description: Tags to include in the output.
        excludeTags:
          type: array
          items:
            type: string
          description: Tags to exclude from the output.
        maxAge:
          type: integer
          description: Returns a cached version of the page if it is younger than this age in milliseconds. If a cached version of the page is older than this value, the page will be scraped. If you do not need extremely fresh data, enabling this can speed up your scrapes by 500%. Defaults to 2 days.
          default: 172800000
        minAge:
          type: integer
          description: When set, the request only checks the cache and never triggers a fresh scrape. The value is in milliseconds and specifies the minimum age the cached data must be. If matching cached data exists, it is returned instantly. If no cached data is found, a 404 with error code SCRAPE_NO_CACHED_DATA is returned. Set to 1 to accept any cached data regardless of age.
        headers:
          type: object
          description: Headers to send with the request. Can be used to send cookies, user-agent, etc.
        waitFor:
          type: integer
          description: Specify a delay in milliseconds before fetching the content, allowing the page sufficient time to load. This waiting time is in addition to Firecrawl's smart wait feature.
          default: 0
        mobile:
          type: boolean
          description: Set to true if you want to emulate scraping from a mobile device. Useful for testing responsive pages and taking mobile screenshots.
          default: false
        skipTlsVerification:
          type: boolean
          description: Skip TLS certificate verification when making requests.
          default: true
        timeout:
          type: integer
          description: Timeout in milliseconds for the request. Minimum is 1000 (1 second). Default is 60000 (60 seconds). Maximum is 300000 (300 seconds).
          default: 60000
          minimum: 1000
          maximum: 300000
        parsers:
          type: array
          description: Controls how files are processed during scraping. When "pdf" is included (default), the PDF content is extracted and converted to markdown format, with billing based on the number of pages (1 credit per page). When an empty array is passed, the PDF file is returned in base64 encoding with a flat rate of 1 credit for the entire PDF.
          items:
            oneOf:
            - type: object
              properties:
                type:
                  type: string
                  enum:
                  - pdf
                mode:
                  type: string
                  enum:
                  - fast
                  - auto
                  - ocr
                  default: auto
                  description: 'PDF parsing mode. "fast": text-based extraction only (embedded text, fastest). "auto" (default): attempts fast extraction first, falls back to OCR if needed. "ocr": forces OCR parsing on every page.'
                maxPages:
                  type: integer
                  minimum: 1
                  maximum: 10000
                  description: Maximum number of pages to parse from the PDF. Must be a positive integer up to 10000.
              required:
              - type
              additionalProperties: false
          default:
          - pdf
        actions:
          type: array
          description: Actions to perform on the page before grabbing the content
          items:
            oneOf:
            - title: Wait
              oneOf:
              - type: object
                title: Wait by Duration
                properties:
                  type:
                    type: string
                    enum:
                    - wait
                    description: Wait for a specified amount of milliseconds
                  milliseconds:
                    type: integer
                    minimum: 1
                    description: Number of milliseconds to wait
                required:
                - type
                - milliseconds
                additionalProperties: false
              - type: object
                title: Wait for Element
                properties:
                  type:
                    type: string
                    enum:
                    - wait
                    description: Wait for a specific element to appear
                  selector:
                    type: string
                    description: CSS selector to wait for
                    example: '#my-element'
                required:
                - type
                - selector
                additionalProperties: false
            - type: object
              title: Screenshot
              properties:
                type:
                  type: string
                  enum:
                  - screenshot
                  description: Take a screenshot. The links will be in the response's `actions.screenshots` array.
                fullPage:
                  type: boolean
                  description: Whether to capture a full-page screenshot (ignores viewport.height) or limit to the current viewport.
                  default: false
                quality:
                  type: integer
                  description: The quality of the screenshot, from 1 to 100. 100 is the highest quality.
                viewport:
                  type: object
                  properties:
                    width:
                      type: integer
                      description: The width of the viewport in pixels
                    height:
                      type: integer
                      description: The height of the viewport in pixels
                  required:
                  - width
                  - height
              required:
              - type
            - type: object
              title: Click
              properties:
                type:
                  type: string
                  enum:
                  - click
                  description: Click on an element
                selector:
                  type: string
                  description: Query selector to find the element by
                  example: '#load-more-button'
                all:
                  type: boolean
                  description: Clicks all elements matched by the selector, not just the first one. Does not throw an error if no elements match the selector.
                  default: false
              required:
              - type
              - selector
            - type: object
              title: Write text
              properties:
                type:
                  type: string
                  enum:
                  - write
                  description: 'Write text into an input field, text area, or contenteditable element. Note: You must first focus the element using a ''click'' action before writing. The text will be typed character by character to simulate keyboard input.'
                text:
                  type: string
                  description: Text to type
                  example: Hello, world!
              required:
              - type
              - text
            - type: object
              title: Press a key
              description: Press a key on the page. See https://asawicki.info/nosense/doc/devices/keyboard/key_codes.html for key codes.
              properties:
                type:
                  type: string
                  enum:
                  - press
                  description: Press a key on the page
                key:
                  type: string
                  description: Key to press
                  example: Enter
              required:
              - type
              - key
            - type: object
              title: Scroll
              properties:
                type:
                  type: string
                  enum:
                  - scroll
                  description: Scroll the page or a specific element
                direction:
                  type: string
                  enum:
                  - up
                  - down
                  description: Direction to scroll
                  default: down
                selector:
                  type: string
                  description: Query selector for the element to scroll
                  example: '#my-element'
              required:
              - type
            - type: object
              title: Scrape
              properties:
                type:
                  type: string
                  enum:
                  - scrape
                  description: Scrape the current page content, returns the url and the html.
              required:
              - type
            - type: object
              title: Execute JavaScript
              properties:
                type:
                  type: string
                  enum:
                  - executeJavascript
                  description: Execute JavaScript code on the page
                script:
                  type: string
                  description: JavaScript code to execute
                  example: document.querySelector('.button').click();
              required:
              - type
              - script
            - type: object
              title: Generate PDF
              properties:
                type:
                  type: string
                  enum:
                  - pdf
                  description: Generate a PDF of the current page. The PDF will be returned in the `actions.pdfs` array of the response.
                format:
                  type: string
                  enum:
                  - A0
                  - A1
                  - A2
                  - A3
                  - A4
 

# --- truncated at 32 KB (67 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/firecrawl/refs/heads/main/openapi/firecrawl-scraping-api-openapi.yml