Skip to main content
By default, Firecrawl SDKs automatically paginate through all results when checking the status of crawls and batch scrapes. However, you can disable auto-pagination to manually fetch results one page at a time.

Why Use Manual Pagination?

Manual pagination is useful when you want to:
  • Process results incrementally as they become available
  • Reduce memory usage by not loading all results at once
  • Implement custom caching or rate limiting logic
  • Display progress to users in real-time
  • Handle very large result sets more efficiently

How Pagination Works

When a crawl or batch scrape job has more data than can fit in a single response, Firecrawl includes a next field in the status response. This opaque URL can be passed back to the SDK to fetch the next page of results.
The next URL is opaque and should not be parsed or modified. Always pass it directly to the SDK methods.

Manual Pagination for Crawls

Disable auto-pagination and fetch results one page at a time:

Manual Pagination for Batch Scrapes

The process is identical for batch scrape operations:

Implementing a Pagination Loop

Here’s a complete example that fetches all pages manually:

Response Structure

When using manual pagination, status responses include:
Fields:
  • status: Current job status (scraping, completed, failed)
  • total: Total number of pages to scrape
  • completed: Number of pages completed so far
  • creditsUsed: Credits consumed
  • data: Array of scraped documents in this page
  • next: Opaque URL for the next page (only present if more data exists)

Best Practices

Check both next and status: A page may have no next URL because the job is still in progress. Check status to know if you should poll again.
Store the next URL: If you need to pause processing, save the next URL to resume from that point later.
Handle rate limits: When manually paginating, implement appropriate delays between requests to avoid rate limiting.
The next URL is temporary and may expire. Don’t store it for long-term use. If it expires, restart pagination from the job ID.

Auto-Pagination (Default Behavior)

By default, the SDKs automatically fetch all pages for you:
For most use cases, auto-pagination is recommended as it simplifies your code. Use manual pagination only when you need fine-grained control over the fetching process.