{
  "id": "firecrawl.scrape",
  "object": "tool",
  "name": "Firecrawl Scrape",
  "summary": "Scrape one URL into clean markdown, HTML, or schema-shaped JSON.",
  "description": "Turn a single URL into clean Markdown, HTML, links, images, a summary, or a screenshot — and add a `json` format object to LLM-extract structured data against your own schema or prompt. Anti-bot handling is included at no extra cost: `proxy` defaults to 'auto', which retries with enhanced proxies when the plain fetch is blocked, at the same price. `maxAge` reuses a recent cached copy for a much faster response; set 0 to force a live fetch. PDFs parse natively and bill per PDF page. Two costs to know before choosing this endpoint: a page answering 403 or 404 is still charged, because the browser and proxy were already spent — check `metadata.statusCode` before retrying a blocked URL — and the LLM formats (`json`, `question`, `highlights`, `audio`, `video`) each add four times the base page cost.\n\nRaw firecrawl#scrape endpoint: input is { body, queryParams, pathParams } as the provider documents them (https://docs.firecrawl.dev/api-reference/endpoint/scrape).",
  "category": "web",
  "hosted_by": "Firecrawl",
  "runtime": "partner",
  "side_effects": false,
  "status": "live",
  "credits": 0,
  "price": null,
  "providers": [
    {
      "id": "firecrawl",
      "name": "Firecrawl",
      "price": null,
      "own_key_only": true
    }
  ],
  "mcp_name": "firecrawl_scrape",
  "input_schema": {
    "type": "object",
    "properties": {
      "body": {
        "type": "object",
        "properties": {
          "formats": {
            "description": "Output formats. Defaults to ['markdown'].",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "markdown",
                    "summary",
                    "html",
                    "rawHtml",
                    "rawBase64",
                    "links",
                    "images",
                    "screenshot",
                    "branding",
                    "product",
                    "menu",
                    "audio",
                    "video"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "markdown",
                        "summary",
                        "html",
                        "rawHtml",
                        "rawBase64",
                        "links",
                        "images",
                        "branding",
                        "product",
                        "menu",
                        "audio",
                        "video"
                      ]
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "screenshot"
                    },
                    "fullPage": {
                      "type": "boolean"
                    },
                    "quality": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "viewport": {
                      "type": "object",
                      "properties": {
                        "width": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "height": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "width",
                        "height"
                      ]
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "json"
                    },
                    "schema": {
                      "description": "JSON Schema the extracted object must conform to.",
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "prompt": {
                      "description": "What to extract from the page.",
                      "type": "string"
                    },
                    "checkPromptInjection": {
                      "description": "Scan the page for prompt-injection attempts before extracting. Adds 4 credits when the check runs; a detection fails the request with 403 SCRAPE_PROMPT_INJECTION_DETECTED.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "changeTracking"
                    },
                    "modes": {
                      "type": "array",
                      "items": {
                        "type": "string",
                        "enum": [
                          "git-diff",
                          "json"
                        ]
                      }
                    },
                    "schema": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "prompt": {
                      "type": "string"
                    },
                    "tag": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "description": "Requires 'markdown' to also be in the formats array."
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "question"
                    },
                    "question": {
                      "type": "string",
                      "maxLength": 10000,
                      "description": "Natural-language question about the page; the answer lands in the response's `answer` field."
                    }
                  },
                  "required": [
                    "type",
                    "question"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "highlights"
                    },
                    "query": {
                      "type": "string",
                      "maxLength": 10000,
                      "description": "Source-text selection request; the selection lands in the response's `highlights` field."
                    }
                  },
                  "required": [
                    "type",
                    "query"
                  ]
                }
              ]
            }
          },
          "onlyMainContent": {
            "description": "Return only the main content, excluding headers, navs and footers (default true). A deterministic HTML-level filter; no LLM.",
            "type": "boolean"
          },
          "onlyCleanContent": {
            "description": "Beta. An additional LLM pass over the markdown to remove residual boilerplate (default false).",
            "type": "boolean"
          },
          "includeTags": {
            "description": "CSS selectors to include, matched against the original page DOM.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "excludeTags": {
            "description": "CSS selectors to exclude, matched against the original page DOM.",
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "maxAge": {
            "description": "Serve a cached copy younger than this many ms (default 172800000, 2 days). 0 forces a live fetch. Cached results still cost a full credit — caching buys speed, not credits.",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "minAge": {
            "description": "Cache-ONLY lookup: never triggers a fresh scrape. A miss returns 404 SCRAPE_NO_CACHED_DATA. Set 1 to accept any cached data.",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "headers": {
            "description": "Headers to send with the request (cookies, user-agent, etc.).",
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "waitFor": {
            "description": "Extra ms to wait after load, on top of Firecrawl's smart wait (default 0).",
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "mobile": {
            "description": "Emulate a mobile device (default false).",
            "type": "boolean"
          },
          "skipTlsVerification": {
            "description": "Skip TLS certificate verification (default true).",
            "type": "boolean"
          },
          "timeout": {
            "description": "Per-page deadline in ms (default 60000, max 300000).",
            "type": "integer",
            "minimum": 1000,
            "maximum": 300000
          },
          "parsers": {
            "description": "File processing. Defaults to ['pdf'], which parses PDFs to markdown at 1 credit per PDF page. An EMPTY array returns the PDF as base64 at a flat 1 credit.",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "const": "pdf"
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "pdf"
                    },
                    "mode": {
                      "description": "'fast': embedded text only. 'auto' (default): fast with OCR fallback. 'ocr': force OCR on every page.",
                      "type": "string",
                      "enum": [
                        "fast",
                        "auto",
                        "ocr"
                      ]
                    },
                    "maxPages": {
                      "description": "Cap the number of PDF pages parsed.",
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 10000
                    },
                    "pages": {
                      "description": "Also return per-page markdown in `pages`. No additional cost.",
                      "type": "boolean"
                    },
                    "blocks": {
                      "description": "Also return per-page typed layout blocks. No additional cost.",
                      "type": "boolean"
                    },
                    "pageMarkers": {
                      "description": "Annotate page breaks in the markdown. No additional cost.",
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type"
                  ]
                }
              ]
            }
          },
          "actions": {
            "description": "Browser actions to run before scraping. Max 50; the combined wait time must not exceed 60 s. Not supported for PDFs.",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "wait"
                    },
                    "milliseconds": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 9007199254740991
                    },
                    "selector": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ],
                  "description": "Wait for a duration OR for an element — provide one."
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "screenshot"
                    },
                    "fullPage": {
                      "type": "boolean"
                    },
                    "quality": {
                      "type": "integer",
                      "minimum": 1,
                      "maximum": 100
                    },
                    "viewport": {
                      "type": "object",
                      "properties": {
                        "width": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        },
                        "height": {
                          "type": "integer",
                          "minimum": -9007199254740991,
                          "maximum": 9007199254740991
                        }
                      },
                      "required": [
                        "width",
                        "height"
                      ]
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "click"
                    },
                    "selector": {
                      "type": "string"
                    },
                    "all": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "type",
                    "selector"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "write"
                    },
                    "text": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "text"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "press"
                    },
                    "key": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "key"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "scroll"
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "up",
                        "down"
                      ]
                    },
                    "selector": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "scrape"
                    }
                  },
                  "required": [
                    "type"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "executeJavascript"
                    },
                    "script": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "type",
                    "script"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "pdf"
                    },
                    "format": {
                      "type": "string",
                      "enum": [
                        "A0",
                        "A1",
                        "A2",
                        "A3",
                        "A4",
                        "A5",
                        "A6",
                        "Letter",
                        "Legal",
                        "Tabloid",
                        "Ledger"
                      ]
                    },
                    "landscape": {
                      "type": "boolean"
                    },
                    "scale": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "type"
                  ]
                }
              ]
            }
          },
          "location": {
            "type": "object",
            "properties": {
              "country": {
                "description": "ISO 3166-1 alpha-2 country code (e.g. 'US', 'AU', 'DE', 'JP'). Defaults to 'US'.",
                "type": "string",
                "pattern": "^[A-Z]{2}$"
              },
              "languages": {
                "description": "Preferred languages and locales in order of priority (e.g. ['en-US']). Defaults to the language of the location.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "removeBase64Images": {
            "description": "Replace base64 image URLs in markdown with a placeholder (default true). Does not affect html or rawHtml.",
            "type": "boolean"
          },
          "blockAds": {
            "description": "Enable ad-blocking and cookie-popup blocking (default true).",
            "type": "boolean"
          },
          "proxy": {
            "description": "'auto' (default) retries with enhanced anti-bot proxies when the basic fetch is blocked. Enhanced proxies carry NO surcharge.",
            "type": "string",
            "enum": [
              "basic",
              "enhanced",
              "auto"
            ]
          },
          "storeInCache": {
            "description": "Store the page in the Firecrawl index and cache (default true). Sensitive options (actions, headers) force this false.",
            "type": "boolean"
          },
          "lockdown": {
            "description": "Serve from Firecrawl's cache only, never fetching the target (default false). Billed 5 credits on a hit, 1 on a miss; a miss returns 404 SCRAPE_LOCKDOWN_CACHE_MISS.",
            "type": "boolean"
          },
          "redactPII": {
            "description": "Redact personally identifiable information from the returned markdown (default false). Costs +4 credits per page.",
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "object",
                "properties": {
                  "mode": {
                    "description": "Redaction strategy. 'accurate' (default) is model-only and optimized for precision, 'aggressive' increases recall with extra heuristics, 'fast' uses heuristics without the model call.",
                    "type": "string",
                    "enum": [
                      "accurate",
                      "aggressive",
                      "fast"
                    ]
                  },
                  "entities": {
                    "description": "Restrict redaction to these entity buckets. Omit to redact all.",
                    "type": "array",
                    "items": {
                      "type": "string",
                      "enum": [
                        "PERSON",
                        "EMAIL",
                        "PHONE",
                        "LOCATION",
                        "FINANCIAL",
                        "SECRET"
                      ]
                    }
                  },
                  "replaceStyle": {
                    "description": "'tag' (default) replaces spans with placeholders like <EMAIL>, 'mask' replaces characters with *, 'remove' deletes the span.",
                    "type": "string",
                    "enum": [
                      "tag",
                      "mask",
                      "remove"
                    ]
                  }
                }
              }
            ]
          },
          "profile": {
            "description": "Persistent browser storage shared by scrapes using the same name.",
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "saveChanges": {
                "type": "boolean"
              }
            },
            "required": [
              "name"
            ]
          },
          "threatProtection": {
            "type": "object",
            "properties": {
              "mode": {
                "description": "URL scanning mode for this request. 'normal' checks URLs against Google Web Risk and costs +2 credits per URL scanned.",
                "type": "string",
                "enum": [
                  "off",
                  "normal"
                ]
              },
              "riskScoreThreshold": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "blacklist": {
                "maxItems": 1000,
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "whitelist": {
                "maxItems": 1000,
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "blockedTlds": {
                "maxItems": 1000,
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "failurePolicy": {
                "type": "string",
                "enum": [
                  "open",
                  "closed"
                ]
              }
            }
          },
          "auditMetadata": {
            "type": "object",
            "properties": {
              "username": {
                "type": "string",
                "maxLength": 1024,
                "description": "The username associated with the request."
              }
            },
            "required": [
              "username"
            ]
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "The URL to scrape.",
            "examples": [
              "https://example.com/pricing"
            ]
          },
          "zeroDataRetention": {
            "description": "Persist nothing beyond the lifetime of the request (default false). Enterprise-gated; costs +1 credit per page and is incompatible with the screenshot format.",
            "type": "boolean"
          }
        },
        "required": [
          "url"
        ]
      }
    },
    "required": [
      "body"
    ],
    "additionalProperties": false
  },
  "kind": "endpoint"
}