Overview
What callbacks are, streaming vs final delivery, and data completeness guarantees.
Payloads
Callback JSON structure, run vs callback statuses, custom_data, and examples.
Delivery
Idempotency, missed-callback detection, and replaying failed deliveries.
What are Callbacks?
Callbacks are the way Edges delivers results forasync and schedule execution modes.
Instead of waiting for the entire operation to complete, you receive results progressively as they become available.
Callbacks are only useful if you can trust that all of them are received and processed.
To ensure you never miss any data, see Managing Callbacks.
PENDING: The callback is queued and waiting to be delivered to your webhook endpoint.RUNNING: The callback has been sent to your endpoint and is being processed (or was successfully delivered).FAILED: The callback delivery failed (e.g., network error, timeout, or your endpoint returned an error status code).SUCCESS: The callback was successfully delivered to your endpoint and your endpoint returned a successful HTTP status code (2xx).
These are callback statuses that indicate the delivery status of the callback itself. They are different from run statuses (like
BLOCKED, FAILED, SUCCEEDED) which indicate the execution state of the run. See Understanding Run Statuses vs Callback Statuses for more details.Quick Start
1. Set up your webhook endpoint
Create an HTTPS endpoint that can receive POST requests with JSON payloads.2. Configure your action call
Include acallback parameter with your webhook URL:
3. Handle incoming callbacks
- For
on: "all"mode: Process the JSON payloads as they arrive. Each callback contains results and metadata. Verify completeness by comparing the run output count with received results. - For
on: "final"mode: Receive a single callback with run status, then fetch all results usingGET /runs/{run_uid}/outputs.
Understanding Async and Schedule Modes
async and schedule execution modes are both async modes: the results are not sent immediately in the response payload but delivered during execution via callbacks.
Setting Up Callbacks
Every action call in async/schedule mode requires acallback parameter:
string
Your webhook URL that will receive the callback data. Must be HTTPS.
object
Optional headers for authentication or custom metadata (API keys, etc.).
string
default:"all"
Defines when you want to receive callbacks. See Streaming vs Final Callbacks below.
"all"(default): Stream callbacks progressively as results are processed"final": Receive a single callback when all inputs are processed or an error occurs
Please refer to each async/schedule action in the API Reference for specific details.
Streaming vs Final Callbacks
By default, Edges sends callbacks progressively as results become available (callback.on: "all"). However, you can opt to receive only a single callback when the entire job completes by setting callback.on: "final".
When to Use Each Mode
Streaming Mode ("all")
This is the default behavior. You receive callbacks progressively:
- One callback per batch/page of results with
run.status: RUNNING - One final callback with
run.status: SUCCEEDEDwhen complete
- Start processing data immediately as it arrives
- Better for large datasets (stream instead of waiting)
- Real-time progress tracking
- Your endpoint receives multiple requests per run
- Requires handling multiple callbacks and aggregating results
- Must verify completeness by comparing output count with received results
run.status: SUCCEEDED, verify that all callbacks were received:
Final Mode ("final")
You receive a single callback only when the job is complete:
- One callback with
run.status: SUCCEEDEDorrun.status: PARTIAL_SUCCEEDEDindicating the run status - Or one callback with
run.status: FAILEDif an error occurred - Important: The callback indicates the run status but does not contain all results. You must fetch results using the
GET /runs/{run_uid}/outputsAPI endpoint.
- Receive final callback with run status (
SUCCEEDED,PARTIAL_SUCCEEDED, orFAILED) - Fetch all results using
GET /runs/{run_uid}/outputsAPI endpoint - Process the complete result set
- Dramatically reduces webhook executions (1 instead of N)
- Simpler integration logic (no aggregation needed)
- Lower costs for webhook-based automation platforms
- Data completeness guaranteed by the GET Results API
- Must wait for the entire job to complete before receiving status
- Requires an additional API call to fetch results after the callback
Data Completeness Guarantees
Each callback mode ensures data completeness differently. Understanding these guarantees helps you build robust integrations that never miss data.All Callbacks Mode (on: "all")
Results are delivered progressively through multiple callbacks during the run execution.
How completeness is ensured:
- Each callback contains a subset of the run results
- When the run finishes, verify completeness by:
- Retrieving the run output count using
GET /runs/{run_uid}- theoutput_countfield indicates the total number of outputs generated - Comparing it with the number of results received via callbacks (count all results from callbacks with
run.status: RUNNINGand the finalrun.status: SUCCEEDED)
- Retrieving the run output count using
- ✅ Counts match → All callbacks were received, data is complete
- Counts differ → One or more callbacks are missing
- Use the List Callbacks endpoint to identify missing callbacks
- Retry missing callbacks using the Replay Callback endpoint
- Or fetch missing results directly via
GET /runs/{run_uid}/outputs - To recover input-level errors (e.g., 404s) that aren’t in outputs, use
GET /runs/{run_uid}/inputs
Final Callback + GET Results Mode (on: "final")
Results are delivered after the run is fully completed using a two-step process.
How it works:
- A single final callback indicates the run status (
SUCCEEDED,PARTIAL_SUCCEEDED, orFAILED) - The client then retrieves all results using the
GET /runs/{run_uid}/outputsAPI call
- Results are fetched directly from the server via the API
- No intermediate callbacks are involved
- No callback verification needed
Summary
Which Mode Should I Use?
- All Callbacks → If you need real-time processing or progressive results
- Final Callback + GET → If you prefer a simpler flow and can wait for completion
How Callbacks Work
Understanding how callbacks are processed and delivered helps you build robust integrations.Parallel Processing & Pagination
Async actions are designed to scale efficiently by processing multiple pages concurrently:- Improved performance: Pages are processed in parallel
- Manageable payloads: Each page generates a separate callback
- Faster time-to-first-result: Start consuming data immediately
Callback Flow
The callback flow depends on thecallback.on setting:
- Streaming Mode (on: all)
- Final Mode (on: final)
1
Trigger Action
Action is triggered in async mode with
max_results: 1002
Auto-Pagination
Backend automatically paginates results with
page_size: 103
Receive Running Callbacks
You receive 10 callbacks with:
run.status: RUNNING(this is the run status, indicating the run is in progress)- Each containing ~10 results (may vary slightly as we filter out ads and other content)
4
Final Success Callback
Once the run completes, you receive one final callback with
run.status: SUCCEEDED (indicating the run finished successfully)Important: You may receive multiple callbacks for a single execution, and they may arrive out of order due to parallel processing. Always use the
run_uid and batch_uid to track and organize your data.Next Steps
Callback Payloads
The JSON structure, run vs callback statuses, and
custom_data.Callback Delivery
Idempotency, missed-callback detection, and replays.
List Callbacks
Endpoint reference — parameters, filters and responses.
Manage Runs
Read, stop, continue and resume a run.

