MCPcopy
hub / github.com/firecrawl/firecrawl / async_example

Function async_example

apps/python-sdk/example_pagination.py:91–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

89from firecrawl import AsyncFirecrawl
90
91async def async_example():
92 async_client = AsyncFirecrawl(api_key="your-api-key")
93
94 # Simple async crawl - automatically waits for completion
95 crawl_result = await async_client.crawl("https://example.com", limit=50)
96 print(f"Async crawl documents: {len(crawl_result.data)}")
97
98 # Manual async crawl with pagination
99 crawl_job = await async_client.start_crawl("https://example.com", limit=50)
100 pagination_config = PaginationConfig(max_pages=2)
101 status = await async_client.get_crawl_status(
102 crawl_job.id,
103 pagination_config=pagination_config
104 )
105 print(f"Async crawl with pagination: {len(status.data)}")
106 if status.next:
107 next_page = await async_client.get_crawl_status_page(status.next)
108 print(f"Async crawl next page documents: {len(next_page.data)}")
109
110# Run async example
111# asyncio.run(async_example())

Callers

nothing calls this directly

Calls 6

AsyncFirecrawlClass · 0.90
PaginationConfigClass · 0.90
crawlMethod · 0.45
start_crawlMethod · 0.45
get_crawl_statusMethod · 0.45
get_crawl_status_pageMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…