Firecrawl Python Agent Quickstart
This file is the canonical quickstart for external agents integrating with Firecrawl via the Python SDK. It is generated from SDK source and the OpenAPI spec.Install
Authenticate
An async variant is also available:
from firecrawl import AsyncFirecrawl.
When To Use What
search: Use when you start with a query and need to discover relevant pages across the web.scrape: Use when you already have a URL and want to extract page content (markdown, HTML, structured data, etc.).interact: Use when the page needs clicks, form fills, or post-scrape browser actions via code or natural language.
Search
Why use it
Search finds relevant web pages for a query. Optionally scrapes each result in the same call viascrape_options.
Preferred SDK method
Example
Parameters
All parameters are keyword-only exceptquery.
Returns:
SearchData with .web, .news, and .images lists.
Scrape
Why use it
Scrape extracts content from a single URL in any format: markdown, HTML, structured JSON, screenshots, and more.Preferred SDK method
Example
Parameters
All parameters are keyword-only excepturl.
Returns:
Document with fields like markdown, html, raw_html, json, summary, metadata, links, images, screenshot, audio, video, actions, warning, change_tracking, branding, product, menu, pages, blocks.
Interact
Why use it
Interact lets you execute code or natural-language instructions in a browser session that was started by a scrape. Use it for post-scrape actions like clicking buttons, filling forms, or extracting dynamic content.Preferred SDK method
Example
Parameters
Returns:
BrowserExecuteResponse with success, output, stdout, result, stderr, exit_code, killed, error, cdp_url, live_view_url, interactive_live_view_url.
Related: app.stop_interaction(job_id) ends the browser session.
Notes
- All parameter names use snake_case (e.g.
only_main_content,skip_tls_verification,scrape_options). The SDK handles conversion to camelCase for the API. - Deprecated aliases (use the preferred names instead):
FirecrawlApp→FirecrawlAsyncFirecrawlApp→AsyncFirecrawlscrape_execute()→interact()stop_interactive_browser()→stop_interaction()delete_scrape_browser()→stop_interaction()scrape_url()→scrape()crawl_url()→crawl()map_url()→map()
- The SDK auto-retries on transient errors with configurable backoff.
- No API key is required; keyless mode gives a rate-limited free tier.
Source Of Truth
firecrawl/apps/python-sdk/firecrawl/client.pyfirecrawl/apps/python-sdk/firecrawl/v2/client.pyfirecrawl/apps/python-sdk/firecrawl/v2/types.pyfirecrawl-docs/api-reference/v2-openapi.json

