Quick Decision Guide
Not sure which approach fits your use case? Here’s how to decide:- ⚡️ Live mode is ideal when you have a single input and expect few results. It’s the simplest and fastest way to get your data immediately.
- 📦 Async/Schedule modes are better suited when you expect a lot of results and want to avoid manual pagination. Results are streamed progressively via callbacks, as soon as they’re processed.
Execution Modes & Pagination
Edges handles pagination differently based on your execution mode:livemode: You handle pagination manually using the cursor from response headers.async/schedulemodes: Pagination is automatic — you just specify how many results you want.
Async Pagination (Automatic)
Inasync and schedule modes, pagination is completely automated:
- No manual handling required - Edges handles all pagination internally
- Use
max_resultsparameter - Specify how many total results you want - Results delivered via callbacks - Each page generates a separate callback
- Progressive delivery - Start receiving data immediately
max_results has a default value for each action (see API Reference).
There’s also a maximum limit you cannot exceed (0 <= x <= max_value).How Async Pagination Works
- You specify
max_results: 100in your request - Edges automatically paginates with optimal
page_size - You receive multiple callbacks, each with a batch of results
- Each callback has
status: RUNNINGuntil the finalSUCCEEDEDcallback
Live Pagination (Manual)
Inlive mode, you control pagination manually for real-time responses:
Pagination Parameters
number
Maximum number of items per page (read-only, varies by action)
string
Cursor value obtained from the
X-Pagination-Next response header of a previous request. Cursors expire after 24 hours.Pagination Headers
Each response includes headers to help you navigate:string
URL for the next page containing the
cursor parameter — follow this exactlystring
Not always present — some actions do not support previous page navigation
Cursor-Based Pagination
Live mode uses cursor-based pagination for reliable, consistent results:- The
X-Pagination-Nextheader contains a URL with acursorparameter - This
cursoris required to access the next page - Cursors expire after 24 hours — if expired, restart pagination from the beginning
- You cannot jump to a specific page — always follow the cursor sequence
Live Pagination Example
1
1. Make the initial request
Start by fetching the first page of results (no cursor needed for the first request).
2
2. Check the response headers
Examine the response headers to find pagination info:
X-Pagination-Next: URL with cursor for next page, ornullif last pageX-Pagination-Previous: URL for previous page (not always present)
3
3. Fetch the next page
Use the exact URL from
X-Pagination-Next header (includes the cursor):4
4. Continue until done
Repeat until the
X-Pagination-Next header is no longer present — you’ve reached the last page.Paginating Run Outputs & Inputs
TheGET /runs/{run_uid}/outputs and GET /runs/{run_uid}/inputs endpoints use cursor-based pagination by default.
- Use
limitto control page size (default: 100, max: 500). - Follow the
X-Pagination-Nextresponse header to fetch the next page — it contains the full URL withlimitandcursor. - Stop when the
X-Pagination-Nextheader is absent — there are no more pages.
Best Practices Summary
For Live Mode
- Follow the
X-Pagination-Nextheader iteratively until it is no longer present - Always use the exact URL from
X-Pagination-Next— never construct cursor values manually - Handle cursor expiration gracefully — restart from the beginning if you receive an error (cursors expire after 24 hours)
For Async/Schedule Modes
- Set
max_resultsparameter to control how many total results you want - Results are delivered progressively via callbacks as soon as they’re processed
- No manual pagination handling required
For Run Outputs & Inputs
- Follow the
X-Pagination-Nextheader — same pattern as live mode - Use
limitto control page size (default: 100, max: 500) - Do not use
offset— it is deprecated and disables cursor pagination

