1
Submit a task
POST /v1/tasks with a source, an action, and params. Torii queues it and returns a
task_id immediately.Response — 202 Accepted
2
Poll until it finishes
GET /v1/tasks/{id}. While it runs, status is queued or running; when done it is
succeeded (or failed), and a succeeded task carries the full result envelope.Response
3
Read the result
The
result is a normalized Envelope. source tells you the provenance
(live / cache / empty / blocked); items is an array of normalized Item cards. Media
URLs are torii-hosted, so they never expire in your hands.One Item
Discover what a platform supports
Before you hardcode aplatform.action, ask the catalog:
{ "name": "youtube.search", "group": "scrape", "summary": "…" }.
If a platform.action isn’t listed, it genuinely doesn’t exist, and calling it returns
unsupported. See API Reference → Sources.
Where to go next
The task lifecycle & Envelope
Statuses, retry/cancel, the full
Envelope and Item schema, and error codes.Media & previews
The image/video proxy, hover-to-play previews, and account health.