Queues & schedules
Group many extractions into a named queue, then run it on demand or on a timer. Queues and schedules are managed in the dashboard console and over the /v1/data/my endpoints.
Queues
A queue is a named, ordered list of scrape items. Each item names a platform, an action, and its parameters. Add up to 1000 items to a queue, and keep up to 100 queues per account.
| Operation | Description |
|---|---|
POST /v1/data/my/queues | Create a named queue. Also list, get, patch, and delete under the same path. |
POST /v1/data/my/queues/{id}/items | Add items to a queue, up to 1000 items. |
POST /v1/data/my/queues/{id}/run | Run every item in the queue now. |
GET /v1/data/my/queues/{id}/runs | Run history for the queue, with the credit rollup per run. |
Running a queue turns every item into a job. Each item is billed as its own flat-price run, and the queue run reports a rollup of all the job credits it consumed.
# Add items to a queue (up to 1000 per queue)
curl -s -X POST https://api.capzy.ai/v1/data/my/queues/QUEUE_ID/items \
-H 'X-API-Key: capzy_data_YOUR_KEY' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{ "platform": "amazon", "action": "search", "params": { "query": "usb c cable" } },
{ "platform": "amazon", "action": "search", "params": { "query": "hdmi 2.1 cable" } }
]
}'
# Run the whole queue now
curl -s -X POST https://api.capzy.ai/v1/data/my/queues/QUEUE_ID/run \
-H 'X-API-Key: capzy_data_YOUR_KEY'Schedules
A schedule fires a queue or a saved task automatically. Choose one of two modes:
- interval run every N seconds.
- cron run on a cron expression, evaluated in the timezone you set.
| Operation | Description |
|---|---|
POST /v1/data/my/schedules | Create a schedule bound to a queue or task. Also list, patch, and delete. |
POST /v1/data/my/schedules/{id}/run | Fire the schedule once, immediately, without waiting for its next trigger. |
# Interval: run a queue every hour
{ "mode": "interval", "seconds": 3600, "queueId": "QUEUE_ID" }
# Cron: run at 6am New York time each weekday
{ "mode": "cron", "cron": "0 6 * * 1-5", "timezone": "America/New_York", "queueId": "QUEUE_ID" }Managed in the console
Queues and schedules are session-authenticated features of the dashboard. Build and monitor them under the Data API section, or drive them programmatically over the /v1/data/my/queues and /v1/data/my/schedules endpoints. Run history and per-run credit rollups are visible in both places.
Next
- Jobs & polling read the results a queue run produces.
- Pricing how per-run credits add up.