Everything you can do in the dashboard's search tools is also available over a REST API at the same prices. This article covers keys and the basic flow. The full list of routes and fields is in the API reference at api.dataatscale.com/docs.
Create a key
Only admins can create keys. Open Settings › Developers, press New key, and give it a name that says what it is for, because the name is the only label you see later. The full key is shown once, so copy it then. You can never see it again.
A key starts with das_live_, belongs to your organisation, and never expires. When you create it you can pick one workspace, and the key then works only in that workspace. Revoke a key in Settings › Developers and it stops working immediately. When the person who made a key changes or resets their password, the keys they made are revoked too, so make new ones then.
A key can run searches, read tasks and results, and check your balance, tokens, limits, usage and credit history. A key limited to a workspace cannot read the credit history. Changing your plan, buying credits, opening the payment portal and inviting people stay with an admin signed in to the dashboard.
Send the key
Each request carries one header:
Authorization: Bearer das_live_your_key
Requests also need to accept gzip, so send Accept-Encoding: gzip. A request without it is refused with gzip_required.
Submit a search
Each tool has its own route, and the same routes are listed in the API reference.
| Tool | Route |
|---|---|
| Find similar | POST /v1/youtube/lookalike, /v1/tiktok/lookalike, /v1/instagram/lookalike |
| Search by topic | POST /v1/youtube/topic-search, /v1/tiktok/topic-search, /v1/instagram/topic-search |
| Look up creators | POST /v1/youtube/creator-lookup, /v1/tiktok/creator-lookup, /v1/instagram/creator-lookup |
| Creator Brand Scan | POST /v1/youtube/brand-scan, /v1/tiktok/brand-scan, /v1/instagram/brand-scan |
| YouTube channel emails | POST /v1/youtube/email-extraction |
| TikTok Shop | POST /v1/tiktok/shop/creator-search and the other four under /v1/tiktok/shop/ |
Name the task with an optional label of 1 to 120 characters. Without one it gets a generated name. Send workspace_id to run it in a workspace, and leave it out to use your default workspace.
The response gives you a task_id and credits_locked, which is the most the task can cost, and tokens_locked, the tokens it holds. Send max_credits to set the most you are willing to pay: if the task would cost more, nothing is started or charged and the request is refused. A malformed request is refused with a 422 that lists the fields that failed, and a field name the API does not know is refused and not ignored.
To see the price before you commit, send the same body to the tool's route plus /estimate. Estimates, input checks and match counts are free.
Get the results
Searches run in the background and take a few minutes, up to about 40 minutes. A task is queued, then running, then ends as completed, failed or cancelled.
- Poll
GET /v1/{platform}/{feature}/{task_id}untilstatusiscompleted,failedorcancelled. The call returns at once with the current state, so you can call it as often as you like. - Read
GET /v1/{platform}/{feature}/{task_id}/results. - Each page carries
next_cursor. Send it back as?cursor=for the next page and stop when it comes back empty. Do not build or parse a cursor yourself.limitsets the page size.
Instead of polling you can pass a webhook_url at submit, which the next article covers.
Cancel a task
POST /v1/{platform}/{feature}/{task_id}/cancel stops a task that has not ended. Results already produced are charged at the normal rate, and the rest of the held credits and tokens come back.
Size limits for one task
| Task | Most it takes |
|---|---|
| Find similar, Search by topic | 1,000 results |
| TikTok Shop affiliate search | 20,000 creators |
| Look up channels, creators or accounts | 5,000 creators |
| Look up GMV | 10,000 creators |
| Get channel emails | 1,000 channels |
| Creator Brand Scan | 1 creator |
A request body can be at most 256 KB, and a larger one is refused with a 413. Saving creators to a list and bulk list changes take larger bodies.
Prices, balance and limits
GET /v1/pricingreturns the live credit price of each tool and what a credit costs you.GET /v1/billing/balancereturns your balance.GET /v1/billing/tokensreturns the tokens you hold and when each batch ends.GET /v1/billing/limitsshows each daily limit and how much is used.GET /v1/billing/ledgerlists all credit movements.
Errors
Each error has a code you can branch on and a detail sentence for a person. A 422 adds fields, and a 402 adds credits_needed and your balance, or cap_remaining when your monthly spending cap stopped it. A 429 for too many requests adds how many seconds until more open up.
| Code | Meaning |
|---|---|
unauthorized | Your key is missing, invalid or revoked. |
insufficient_credits | Your balance cannot cover what the request can cost. |
spending_cap_reached | The request would take this month past your spending cap. |
forbidden | Your role or workspace access does not allow it. |
email_not_confirmed | The account behind the key has not confirmed its email. |
daily_limit_reached | A daily limit of your plan is used up. |
rate_limited | Too many requests to one route in 10 minutes. |
validation_error | A field is missing or not in the expected format. |
New codes may appear, so handle an unknown one by its HTTP status.