DocumentationDashboard

Batch

Batch tasks

Some answers don't fit in one request. A product with 8,000 reviews is 400 pages; asking for all of them is a job, not a call. Queue a task, and collect the result when it's done.

The lifecycle

CallWhat it does
POST /v1/tasksQueues the job. Answers 202 with a taskId. Bad parameters come back here as a 400, not as a failed task minutes later.
GET /v1/tasks/{id}Status and progress: completedPages of totalPages, items so far, credits spent.
GET /v1/tasks?status=doneYour finished jobs. Also queued, running, failed, cancelled, exhausted.
GET /v1/tasks/{id}/resultThe data, a slice of pages at a time. Readable while the task is still running — start consuming page 0 before page 400 exists.
DELETE /v1/tasks/{id}Cancels. A running task stops at its next page boundary; the pages it already fetched stay readable and stay charged.

Queue a task

curl --request POST 'https://data-api.roketfy.com/v1/tasks' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Content-Type: application/json' \
  --data '{
    "platform": "trendyol",
    "endpoint": "reviews",
    "params": { "contentId": "444174053" },
    "maxPages": 50
  }'

params is exactly what the endpoint itself takes — the same validation, the same defaults. maxPages caps the run; leave it out and the task walks every page the endpoint reports.

Read the result

curl 'https://data-api.roketfy.com/v1/tasks/TASK_ID/result?limit=10' \
  --header 'Authorization: Bearer YOUR_TOKEN'

Pages come back in upstream order. Feed the response's nextAfter back as ?after= to walk the rest.

Credits and retention

  • One page, one charge, at the endpoint's own rate. A 400-page review run costs 400 credits. Pages that fail cost nothing, exactly as with a live request.
  • A failed task keeps what its finished pages cost — it is not refunded, and it is not charged for the pages it never fetched.
  • A run stops when your credits do. The balance is checked before every page, so a long job can never spend past your monthly ceiling. The task ends as exhausted — not failed — and the pages it did fetch stay readable. Queueing a task with no credits left is refused outright with 402 insufficient_credits, the same answer a live call gets.
  • Results stay readable for 7 days, then expire with the task.
  • Batch runs have their own concurrency ceiling, separate from the live one — a long job never eats the slots your real-time calls need.

What can be batched

Endpointplatform / endpointCredits per page
Trendyol · Product Reviewstrendyol / reviews1
Trendyol · Product Questionstrendyol / questions1
Trendyol · Top Rankingstrendyol / top-rankings1
Trendyol · Product Searchtrendyol / search1
Trendyol · Category Productstrendyol / category-products1
Trendyol · Store Productstrendyol / store-products1
Hepsiburada · Product Reviewshepsiburada / reviews1
Hepsiburada · Product Questionshepsiburada / questions1
Hepsiburada · Product Searchhepsiburada / search1
Hepsiburada · Category Productshepsiburada / category-products1
Amazon · Product Reviewsamazon / product-reviews10
N11 · Product Reviewsn11 / product-reviews1
Google · Maps Reviewsgoogle / maps-reviews10
App Store · App Store Searchapp-store / search15
App Store · App Store Appapp-store / app15
App Store · App Store Reviewsapp-store / reviews10
Trustpilot · Business Searchtrustpilot / search19
Trustpilot · Reviewstrustpilot / reviews10
Tripadvisor · Business Searchtripadvisor / search19
Tripadvisor · Reviewstripadvisor / reviews10
Attributes · Enrich Product Attributesattributes / enrich25