Learn how to improve your Firecrawl scraping with advanced options.
/scrape
endpoint.
parsers
option (e.g., parsers: ["pdf"]
) when you want to ensure PDF parsing.
/scrape
endpoint, you can customize scraping with the options below.
formats
)array
["markdown", "links", "html", "rawHtml", "summary"]
{ type: "json", prompt, schema }
{ type: "screenshot", fullPage?, quality?, viewport? }
{ type: "changeTracking", modes?, prompt?, schema?, tag? }
(requires markdown
)["markdown"]
onlyMainContent
)boolean
false
to return full page content.true
includeTags
)array
excludeTags
)array
waitFor
)integer
0
maxAge
)integer
(milliseconds)maxAge
, Firecrawl returns it instantly; otherwise it scrapes fresh and updates the cache. Set 0
to always fetch fresh.172800000
(2 days)timeout
)integer
30000
(30 seconds)parsers
)array
parsers: ["pdf"]
.actions
)array
wait
{ milliseconds }
click
{ selector }
write
{ selector, text }
press
{ key }
scroll
{ direction: "up" | "down" }
scrape
{ selector }
(scrape a sub-element)executeJavascript
{ script }
pdf
(trigger PDF render in some flows)<h1>
, <p>
, <a>
, and elements with the class .main-content
, while excluding any elements with the IDs #ad
and #footer
.parsers: ["pdf"]
.formats
to extract structured data in one pass:
/v2/crawl
endpoint.
next
parameter, a URL to the next page of results.
prompt
to let Firecrawl derive crawl settings. Preview them first:
/v2/crawl
endpoint, you can customize the crawling behavior with:
array
["^/blog/.*$", "^/docs/.*$"]
array
["^/admin/.*$", "^/private/.*$"]
integer
integer
10000
boolean
false
boolean
false
boolean
false
number
undefined
object
{ "formats": ["markdown", "links", {"type": "screenshot", "fullPage": true}], "includeTags": ["h1", "p", "a", ".main-content"], "excludeTags": ["#ad", "#footer"], "onlyMainContent": false, "waitFor": 1000, "timeout": 15000}
formats: ["markdown"]
, caching enabled by default (maxAge ~ 2 days)/v2/map
endpoint identifies URLs related to a given website.
string
integer
100
"only" | "include" | "skip"
"include"
boolean
true