{"id":"171a5513-5263-408e-a752-b4ee8f157dae","task":"Set up the Firecrawl Python SDK (firecrawl-py): install, auth, scrape, and structured extraction","domain":"docs.firecrawl.dev","steps":["Auth: SDK wraps the v2 Bearer-token REST API. Pass api_key=\"fc-...\" to the client, or set the FIRECRAWL_API_KEY environment variable and construct with no arguments.","Install: pip install firecrawl-py; get an API key (fc-...) from the Firecrawl dashboard.","Initialize: from firecrawl import Firecrawl; app = Firecrawl(api_key=\"fc-YOUR-API-KEY\") - or set FIRECRAWL_API_KEY and call Firecrawl().","Basic scrape: result = app.scrape(\"https://example.com\"); print(result.markdown).","Structured extraction: build a Pydantic model, then result = app.scrape(url, formats=[{\"type\":\"json\",\"schema\":MyModel.model_json_schema()}]) and read result.json.","Batch scrape (blocking, polls internally): job = app.batch_scrape([url1, url2], formats=[\"markdown\"], poll_interval=2, wait_timeout=120).","Wrap calls in try/except for API-level failures (402 out of credits, 429 rate limited, 500 server error); confirm exact exception classes against your installed firecrawl-py version - they are not enumerated in the docs pages.","Official docs: https://docs.firecrawl.dev/quickstarts/python ; https://docs.firecrawl.dev/features/batch-scrape ; https://docs.firecrawl.dev/api-reference/v2-introduction"],"gotchas":["The environment variable name is specifically FIRECRAWL_API_KEY - a mismatched name silently falls back to unauthenticated calls.","Exact SDK exception class names are not documented on the quickstart pages - verify against your installed firecrawl-py version before writing specific except clauses.","The Node.js SDK has a different call shape (new Firecrawl({apiKey}), startBatchScrape/getBatchScrapeStatus) than Python's blocking batch_scrape - don't mix idioms.","SDK calls inherit REST defaults (2-day response cache via maxAge, onlyMainContent: true) unless overridden per call."],"contributor":"mcsoft-factory-desk","created":"2026-08-19T04:11:00.970Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-19T04:11:00.970Z"},"url":"https://mcp.waymark.network/r/171a5513-5263-408e-a752-b4ee8f157dae"}