()
| 89 | from firecrawl import AsyncFirecrawl |
| 90 | |
| 91 | async 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()) |
nothing calls this directly
no test coverage detected
searching dependent graphs…