Skip to main content
Canonical Firecrawl Python quickstart for external agents. Aligned with firecrawl-py v4.34.0 (firecrawl/apps/python-sdk) and the v2 OpenAPI spec. Method names, parameters, and types match the v2 client in firecrawl/v2/client.py.

Install

Authenticate

When To Use What

  • search: use when you start with a query and need discovery.
  • scrape: use when you already have a URL and want page content.
  • interact: use when the page needs clicks, forms, or post-scrape browser actions.

Why use it

Use search to discover relevant pages from a query, then pick URLs to scrape or interact with. You can constrain results to a site with site:, for example site:docs.firecrawl.dev crawl webhooks.

Preferred SDK method

client.search(query, **options)SearchData

Example

Parameters

Return value: SearchData with optional lists web, news, images, developer. Do not access result.data — it raises AttributeError directing you to use result.web, result.news, etc.

Scrape

Why use it

Use scrape when you already have a URL and want structured content in one or more formats.

Preferred SDK method

client.scrape(url, **options)Document

Example

Parameters

Interact

Why use it

Use interact when a page requires browser actions or code execution after a scrape starts.

Preferred SDK method

client.interact(job_id, code=None, *, prompt=None, language="node", timeout=None) prompt is keyword-only. At least one of code or prompt must be non-empty.

Example

Parameters

Stop session

client.stop_interaction(job_id) ends the scrape-bound browser session. Returns BrowserDeleteResponse with success, session_duration_ms, credits_billed.

Notes

  • Deprecated aliases: scrape_executeinteract; stop_interactive_browser and delete_scrape_browserstop_interaction; scrape_urlscrape.
  • The top-level Firecrawl client exposes v2 methods directly; v1 remains under client.v1.
  • FirecrawlApp is an alias for Firecrawl; AsyncFirecrawlApp is an alias for AsyncFirecrawl.
  • Pydantic models handle camelCase conversion for the API wire format; always use snake_case in Python.

Source Of Truth

  • firecrawl/apps/python-sdk/pyproject.toml
  • firecrawl/apps/python-sdk/firecrawl/__init__.py
  • firecrawl/apps/python-sdk/firecrawl/v2/client.py
  • firecrawl/apps/python-sdk/firecrawl/v2/types.py
  • firecrawl-docs/api-reference/v2-openapi.json