Skip to main content
Every firecrawl.api.* operation is listed below with parameter shapes and return types from the plugin Zod schemas.
New to Corsair? See API access, authentication, and error handling.

Agent

cancel

agent.cancel Cancel an in-flight agent job Risk: write
await corsair.firecrawl.api.agent.cancel({});
Input
NameTypeRequiredDescription
idstringYes
Output
NameTypeRequiredDescription
successbooleanYes

get

agent.get Get status for an agent job Risk: read
await corsair.firecrawl.api.agent.get({});
Input
NameTypeRequiredDescription
idstringYes
Output
NameTypeRequiredDescription
successbooleanYes
statusprocessing | completed | failedNo
dataobjectNo
modelspark-1-pro | spark-1-miniNo
errorstringNo
expiresAtstringNo
creditsUsednumberNo
{
}

start

agent.start Start an agentic extraction job Risk: write
await corsair.firecrawl.api.agent.start({});
Input
NameTypeRequiredDescription
promptstringYes
urlsstring[]No
schemaobjectNo
maxCreditsnumberNo
strictConstrainToURLsbooleanNo
modelspark-1-mini | spark-1-proNo
{
}
Output
NameTypeRequiredDescription
successbooleanYes
idstringNo

Crawl

cancel

crawl.cancel Cancel an in-flight crawl job Risk: write
await corsair.firecrawl.api.crawl.cancel({});
Input
NameTypeRequiredDescription
idstringYes
Output
NameTypeRequiredDescription
successbooleanNo
statuscancelledNo

get

crawl.get Get status and results for a crawl job Risk: read
await corsair.firecrawl.api.crawl.get({});
Input
NameTypeRequiredDescription
idstringYes
Output
NameTypeRequiredDescription
successbooleanYes
statusstringNo
totalnumberNo
completednumberNo
creditsUsednumberNo
expiresAtstringNo
nextstringNo
dataobject[]No
{
  markdown?: string,
  html?: string | null,
  rawHtml?: string | null,
  links?: string[],
  screenshot?: string | null,
  metadata?: {
    title?: string | string[],
    description?: string | string[],
    language?: string | string[] | null,
    keywords?: string | string[],
    sourceURL?: string,
    url?: string,
    scrapeId?: string,
    statusCode?: number,
    contentType?: string,
    error?: string | null,
    ogLocaleAlternate?: string[],
    concurrencyLimited?: boolean,
    concurrencyQueueDurationMs?: number
  }
}[]

start

crawl.start Start a recursive crawl from a base URL Risk: write
await corsair.firecrawl.api.crawl.start({});
Input
NameTypeRequiredDescription
urlstringYes
promptstringNo
excludePathsstring[]No
includePathsstring[]No
maxDiscoveryDepthnumberNo
sitemapskip | include | onlyNo
ignoreQueryParametersbooleanNo
regexOnFullURLbooleanNo
limitnumberNo
crawlEntireDomainbooleanNo
allowExternalLinksbooleanNo
allowSubdomainsbooleanNo
delaynumberNo
maxConcurrencynumberNo
webhookobjectNo
scrapeOptionsobjectNo
zeroDataRetentionbooleanNo
{
  url: string,
  headers?: {
  },
  metadata?: {
  },
  events?: completed | page | failed | started[]
}
{
  formats?: (
    markdown | summary | html | rawHtml | links | images | audio | {
      type: markdown
    } | {
      type: summary
    } | {
      type: html
    } | {
      type: rawHtml
    } | {
      type: links
    } | {
      type: images
    } | {
      type: audio
    } | {
      type: screenshot,
      fullPage?: boolean,
      quality?: number,
      viewport?: {
        width: number,
        height: number
      }
    } | {
      type: json,
      schema?: {
      },
      prompt?: string
    } | {
      type: changeTracking,
      modes?: git-diff | json[],
      schema?: {
      },
      prompt?: string,
      tag?: string | null
    } | {
      type: branding
    }
  )[],
  onlyMainContent?: boolean,
  includeTags?: string[],
  excludeTags?: string[],
  maxAge?: number,
  minAge?: number,
  headers?: {
  },
  waitFor?: number,
  mobile?: boolean,
  skipTlsVerification?: boolean,
  timeout?: number,
  parsers?: {
    type: pdf,
    mode?: fast | auto | ocr,
    maxPages?: number
  }[],
  actions?: (
    {
      type: wait,
      milliseconds: number
    } | {
      type: wait,
      selector: string
    } | {
      type: screenshot,
      fullPage?: boolean,
      quality?: number,
      viewport?: {
        width: number,
        height: number
      }
    } | {
      type: click,
      selector: string,
      all?: boolean
    } | {
      type: write,
      text: string
    } | {
      type: press,
      key: string
    } | {
      type: scroll,
      direction?: up | down,
      selector?: string
    } | {
      type: scrape
    } | {
      type: executeJavascript,
      script: string
    } | {
      type: pdf,
      format?: A0 | A1 | A2 | A3 | A4 | A5 | A6 | Letter | Legal | Tabloid | Ledger,
      landscape?: boolean,
      scale?: number
    }
  )[],
  location?: {
    country?: string,
    languages?: string[]
  },
  removeBase64Images?: boolean,
  blockAds?: boolean,
  proxy?: basic | enhanced | auto,
  storeInCache?: boolean,
  profile?: {
    name: string,
    saveChanges?: boolean
  }
}
Output
NameTypeRequiredDescription
successbooleanYes
idstringNo
urlstringNo

Map

run

map.run Map all URLs discovered from a site Risk: read
await corsair.firecrawl.api.map.run({});
Input
NameTypeRequiredDescription
urlstringYes
searchstringNo
sitemapskip | include | onlyNo
includeSubdomainsbooleanNo
ignoreQueryParametersbooleanNo
ignoreCachebooleanNo
limitnumberNo
timeoutnumberNo
locationobjectNo
{
  country?: string,
  languages?: string[]
}
Output
NameTypeRequiredDescription
successbooleanYes
linksobject[]No

Scrape

run

scrape.run Scrape a single URL (markdown, JSON, etc.) Risk: read
await corsair.firecrawl.api.scrape.run({});
Input
NameTypeRequiredDescription
urlstringYes
formatsobject[]No
onlyMainContentbooleanNo
includeTagsstring[]No
excludeTagsstring[]No
maxAgenumberNo
minAgenumberNo
headersobjectNo
waitFornumberNo
mobilebooleanNo
skipTlsVerificationbooleanNo
timeoutnumberNo
parsersobject[]No
actionsobject[]No
locationobjectNo
removeBase64ImagesbooleanNo
blockAdsbooleanNo
proxybasic | enhanced | autoNo
storeInCachebooleanNo
profileobjectNo
zeroDataRetentionbooleanNo
(
  markdown | summary | html | rawHtml | links | images | audio | {
    type: markdown
  } | {
    type: summary
  } | {
    type: html
  } | {
    type: rawHtml
  } | {
    type: links
  } | {
    type: images
  } | {
    type: audio
  } | {
    type: screenshot,
    fullPage?: boolean,
    quality?: number,
    viewport?: {
      width: number,
      height: number
    }
  } | {
    type: json,
    schema?: {
    },
    prompt?: string
  } | {
    type: changeTracking,
    modes?: git-diff | json[],
    schema?: {
    },
    prompt?: string,
    tag?: string | null
  } | {
    type: branding
  }
)[]
{
}
{
  type: pdf,
  mode?: fast | auto | ocr,
  maxPages?: number
}[]
(
  {
    type: wait,
    milliseconds: number
  } | {
    type: wait,
    selector: string
  } | {
    type: screenshot,
    fullPage?: boolean,
    quality?: number,
    viewport?: {
      width: number,
      height: number
    }
  } | {
    type: click,
    selector: string,
    all?: boolean
  } | {
    type: write,
    text: string
  } | {
    type: press,
    key: string
  } | {
    type: scroll,
    direction?: up | down,
    selector?: string
  } | {
    type: scrape
  } | {
    type: executeJavascript,
    script: string
  } | {
    type: pdf,
    format?: A0 | A1 | A2 | A3 | A4 | A5 | A6 | Letter | Legal | Tabloid | Ledger,
    landscape?: boolean,
    scale?: number
  }
)[]
{
  country?: string,
  languages?: string[]
}
{
  name: string,
  saveChanges?: boolean
}
Output
NameTypeRequiredDescription
successbooleanYes
dataobjectNo
{
  markdown?: string,
  summary?: string | null,
  html?: string | null,
  rawHtml?: string | null,
  screenshot?: string | null,
  audio?: string | null,
  links?: string[],
  actions?: {
    screenshots?: string[],
    scrapes?: {
      url?: string,
      html?: string
    }[],
    javascriptReturns?: {
      type?: string,
      value?: any
    }[],
    pdfs?: string[]
  } | null,
  metadata?: {
    title?: string | string[],
    description?: string | string[],
    language?: string | string[] | null,
    keywords?: string | string[],
    sourceURL?: string,
    url?: string,
    scrapeId?: string,
    statusCode?: number,
    contentType?: string,
    error?: string | null,
    ogLocaleAlternate?: string[],
    concurrencyLimited?: boolean,
    concurrencyQueueDurationMs?: number
  },
  warning?: string | null,
  changeTracking?: {
    previousScrapeAt?: string | null,
    changeStatus?: new | same | changed | removed,
    visibility?: visible | hidden,
    diff?: string | null,
    json?: {
    } | null
  } | null,
  branding?: {
  } | null,
  json?: any,
  images?: {
  }[]
}

run

search.run Search the web and retrieve page content Risk: read
await corsair.firecrawl.api.search.run({});
Input
NameTypeRequiredDescription
querystringYes
limitnumberNo
sourcesobject[]No
categoriesobject[]No
tbsstringNo
locationstringNo
countrystringNo
timeoutnumberNo
ignoreInvalidURLsbooleanNo
enterpriseanon | zdr[]No
scrapeOptionsobjectNo
(
  {
    type: web,
    tbs?: string,
    location?: string
  } | {
    type: images
  } | {
    type: news
  }
)[]
(
  {
    type: github
  } | {
    type: research
  } | {
    type: pdf
  }
)[]
{
  formats?: (
    markdown | summary | html | rawHtml | links | images | audio | {
      type: markdown
    } | {
      type: summary
    } | {
      type: html
    } | {
      type: rawHtml
    } | {
      type: links
    } | {
      type: images
    } | {
      type: audio
    } | {
      type: screenshot,
      fullPage?: boolean,
      quality?: number,
      viewport?: {
        width: number,
        height: number
      }
    } | {
      type: json,
      schema?: {
      },
      prompt?: string
    } | {
      type: changeTracking,
      modes?: git-diff | json[],
      schema?: {
      },
      prompt?: string,
      tag?: string | null
    } | {
      type: branding
    }
  )[],
  onlyMainContent?: boolean,
  includeTags?: string[],
  excludeTags?: string[],
  maxAge?: number,
  minAge?: number,
  headers?: {
  },
  waitFor?: number,
  mobile?: boolean,
  skipTlsVerification?: boolean,
  timeout?: number,
  parsers?: {
    type: pdf,
    mode?: fast | auto | ocr,
    maxPages?: number
  }[],
  actions?: (
    {
      type: wait,
      milliseconds: number
    } | {
      type: wait,
      selector: string
    } | {
      type: screenshot,
      fullPage?: boolean,
      quality?: number,
      viewport?: {
        width: number,
        height: number
      }
    } | {
      type: click,
      selector: string,
      all?: boolean
    } | {
      type: write,
      text: string
    } | {
      type: press,
      key: string
    } | {
      type: scroll,
      direction?: up | down,
      selector?: string
    } | {
      type: scrape
    } | {
      type: executeJavascript,
      script: string
    } | {
      type: pdf,
      format?: A0 | A1 | A2 | A3 | A4 | A5 | A6 | Letter | Legal | Tabloid | Ledger,
      landscape?: boolean,
      scale?: number
    }
  )[],
  location?: {
    country?: string,
    languages?: string[]
  },
  removeBase64Images?: boolean,
  blockAds?: boolean,
  proxy?: basic | enhanced | auto,
  storeInCache?: boolean,
  profile?: {
    name: string,
    saveChanges?: boolean
  }
}
Output
NameTypeRequiredDescription
successbooleanYes
dataobjectNo
warningstringNo
idstringNo
creditsUsednumberNo
{
  web?: {
    title?: string,
    description?: string,
    url?: string,
    markdown?: string | null,
    html?: string | null,
    rawHtml?: string | null,
    links?: string[],
    screenshot?: string | null,
    audio?: string | null,
    category?: string,
    metadata?: {
      title?: string | string[],
      description?: string | string[],
      language?: string | string[] | null,
      keywords?: string | string[],
      sourceURL?: string,
      url?: string,
      scrapeId?: string,
      statusCode?: number,
      contentType?: string,
      error?: string | null,
      ogLocaleAlternate?: string[],
      concurrencyLimited?: boolean,
      concurrencyQueueDurationMs?: number
    }
  }[],
  images?: {
    title?: string,
    imageUrl?: string,
    imageWidth?: number,
    imageHeight?: number,
    url?: string,
    position?: number
  }[],
  news?: {
    title?: string,
    snippet?: string,
    url?: string,
    date?: string,
    imageUrl?: string,
    position?: number,
    markdown?: string | null,
    html?: string | null,
    rawHtml?: string | null,
    links?: string[],
    screenshot?: string | null,
    audio?: string | null,
    metadata?: {
      title?: string | string[],
      description?: string | string[],
      language?: string | string[] | null,
      keywords?: string | string[],
      sourceURL?: string,
      url?: string,
      scrapeId?: string,
      statusCode?: number,
      contentType?: string,
      error?: string | null,
      ogLocaleAlternate?: string[],
      concurrencyLimited?: boolean,
      concurrencyQueueDurationMs?: number
    }
  }[]
}