Quick start
- Sign in with Google or an email code. A new account gets $0.30 of trial balance at its first sign-in, with Google or with an email code: one per email address. It works on endpoints priced at $0.005 per record or less.
- Create a key on the API keys page of the console and copy it (it is shown once).
- Send the first request:
curl -X POST "https://api.silklinedata.com/v1/weibo/hot" \
-H "Authorization: Bearer $SILKLINE_KEY" \
-H "Content-Type: application/json" \
-d '{"limit": 5}'Another endpoint is another /v1/{tool}/{mode} path with its own parameters. Every endpoint's page under Platforms lists what it takes and returns.
The whole catalog is JSON too: GET /api/public-catalog?lang=en lists every endpoint on sale with its name, summary, parameters (name, type, required), an example input, paging and prices, no key needed. GET /v1/endpoints has the prices only.
Authentication
Send Authorization: Bearer slk_… with every request. A missing, malformed or revoked key answers 401 invalid_key. Use the key on your server only, never in a web page or an app; if it leaks, revoke it in the console and create another.
Requests
POST /v1/{tool}/{mode} with the parameters as a JSON object body (at most 16 KB), lists included. Every example on this site is written this way.
GET with the parameters in the query string is accepted too, but only for endpoints whose every parameter is one word or one number: a query string carries text only, so lists and true/false need POST.
limit: the most records this request returns, 1 to 100, default 20. An answer never holds more. cursor: for the next page, see below.
Response and meta
A success is HTTP 200 with {data, cursor, meta}: data is the array of records (empty when nothing was found), cursor the bookmark of the next page or null.
{
"data": [
{
"…": "…"
}
],
"cursor": null,
"meta": {
"request_id": "req_01…",
"charged_usd": "0.018650",
"balance_usd": "9.981350",
"items": 5
}
}| meta | Meaning |
|---|---|
| request_id | The request's ID, also in the X-Request-Id header. Quote it when you report a problem. |
| items | How many records are in data. |
| charged_usd | What this request cost, in USD with 6 decimals. |
| balance_usd | The balance you can still spend after it. |
| minimum_usd | The part added to reach the minimum, when the records alone cost less. |
| same_price_up_to | When the minimum applied: how many records the same money buys. Raise limit to it and pay the same. |
| partial, reason | Present when only part of the answer came back; reason says why. |
Change the platform name. The rest of your code stays.
33 platforms answer one kind of request with one envelope: records in data, the next page in cursor, the cost in meta.
POST /v1/xiaohongshu/search
Authorization: Bearer $SILKLINE_KEY
{"keyword":"星巴克","limit":20}
{ "data": [ { "type": "note", "publishedAt": "2026-10-05T20:02:38Z", "title": "星巴克🎄2026 Holiday Menu", "likes": 237, "collects": 63, "noteId": "6ac4025e0000000012035ea2", "url": "https://www.xiaohongshu.com/explo…" } ], "cursor": "c1.v7Kq2LmX9pTe.Zr4w…", "meta": { "charged_usd": "0.036000" }}
POST /v1/bilibili/search
Authorization: Bearer $SILKLINE_KEY
{"keyword":"大疆","limit":20}
{ "data": [ { "type": "video", "publishedAt": "2026-11-11T01:00:00Z", "title": "大疆 Osmo Action 7 ,GoPro 杀…", "views": 3834, "likes": 11, "bvid": "BV17jWN6gEro", "url": "https://www.bilibili.com/video/BV…" } ], "cursor": "c1.N3fYc8RbQ1sH.k0Tq…", "meta": { "charged_usd": "0.147200" }}
Paging
When cursor is not null, there is a next page: send it back unchanged with the same parameters (limit may change). The last page has cursor: null. A cursor is valid for an hour. Each page is its own request, charged on its own. Every endpoint's page says whether it pages; one that does not answers in one request and its cursor is always null.
import os, requests
url = "https://api.silklinedata.com/v1/xiaohongshu/search"
params = {"keyword": "coffee", "limit": 100}
headers = {"Authorization": "Bearer " + os.environ["SILKLINE_KEY"]}
records, cursor = [], None
while True:
body = dict(params, cursor=cursor) if cursor else params
answer = requests.post(url, headers=headers, json=body).json()
records += answer["data"]
cursor = answer["cursor"]
if not cursor:
breakPage through any list
Send the cursor back with the same request and the next records come. When the list ends, the cursor is null.
data- The records, in the endpoint's documented fields. Never more than the limit you asked for.
cursor- Present while the list has more. Send it back with the same request to get the next batch.
meta- What this request cost and what is left, in every response.
POST /v1/xiaohongshu/search
Authorization: Bearer $SILKLINE_KEY
{"keyword":"星巴克","limit":20}
{
"data": [
{ "noteId": "6ac4025e0000000012035ea2", "title": "星巴克🎄2026 Holiday Menu",
"likes": 237, "comments": 12 }
],
"cursor": "c1.Gt5nR1zVb8Ky.Qe2s…",
"meta": { "charged_usd": "0.036000", "balance_usd": "9.964000" }
}
POST /v1/xiaohongshu/search
Authorization: Bearer $SILKLINE_KEY
{"keyword":"星巴克","limit":20,"cursor":"c1.Gt5nR1zVb8Ky.Qe2s…"}
{
"data": [
{ "noteId": "6af563aa00000000160196e7", "title": "新🎄星:圣诞抹茶苹果奶",
"likes": 1254, "comments": 47 }
],
"cursor": "c1.a9MhT4wLc3Px.Uv6d…",
"meta": { "charged_usd": "0.036000", "balance_usd": "9.928000" }
}
POST /v1/xiaohongshu/search
Authorization: Bearer $SILKLINE_KEY
{"keyword":"星巴克","limit":20,"cursor":"c1.a9MhT4wLc3Px.Uv6d…"}
{
"data": [
{ "noteId": "6af7aca0000000002a019b4f", "title": "终于在北美星巴克喝上太妃榛…",
"likes": 105, "comments": 11 }
],
"cursor": null,
"meta": { "charged_usd": "0.025000", "balance_usd": "9.903000" }
}
Errors
An error answers its HTTP status and {error: {code, message}, meta: {request_id}}. An error on our side is never charged; a not_found answer may be charged (see below).
{
"error": {
"code": "invalid_key",
"message": "The API key is missing or not valid."
},
"meta": {
"request_id": "req_01…"
}
}| code | HTTP | Meaning |
|---|---|---|
| bad_request | 400 | A parameter is not valid (for example limit outside 1 to 100, or a body that is not a JSON object). |
| bad_input | 400 | The platform did not accept the input; the message says why. |
| cursor_invalid | 400 | The cursor is not one we issued for this endpoint. Start again without a cursor. |
| cursor_mismatch | 400 | The cursor belongs to a request with other parameters. Only limit may change between pages. |
| cursor_expired | 400 | The cursor is older than an hour, or the listing cannot go on from it. Start again without a cursor. |
| cursor_paused_today | 429 | This cursor can be used again after 00:00 UTC (resumes_at); until then the listing can only be read from its first page. Not charged. |
| invalid_key | 401 | The API key is missing, malformed or revoked. |
| insufficient_balance | 402 | The balance does not cover what this request reserves; the body says both amounts. |
| account_frozen | 403 | The account is suspended under the Terms of Service. Write to hello@silklinedata.com from the account's email address. |
| unknown_endpoint | 404 | No such endpoint, or it is not on sale. |
| not_found | 404 | The platform answered that the thing you asked for does not exist. This 404 may be charged, up to the endpoint minimum: see meta.charged_usd. The answer also has data (empty) and cursor (null). |
| payload_too_large | 413 | The body is larger than 16 KB. |
| rate_limited | 429 | Too many requests in a minute. Slow down and retry. |
| daily_cap | 429 | The day's spending cap of the key or the account is reached; the body says the cap. |
| source_unavailable | 502 | The platform did not answer. Not charged; retry later. |
| mode_unavailable | 503 | The endpoint is paused for now. Not charged. |
| account_paused_today | 429 | This account's requests are paused until 00:00 UTC; resumes_at and Retry-After say when. Not charged. If your use is ordinary, write to us. |
| service_paused_today | 503 | The service is paused for some requests until 00:00 UTC; resumes_at and Retry-After say when. Not charged. |
| busy | 503 | We are busy. Not charged; retry shortly. |
| source_timeout | 504 | The platform took too long to answer. Not charged. |
Rate limits
- About 600 requests a minute per IP address and about 300 per key; past that, 429
rate_limited. Both numbers are approximate: a little more or less may get through. Do not pace your requests to the exact number; on a 429, wait a moment and retry. - Spending per day is capped: currently, $20 a day after the first top-up, $200 a day once you have topped up $50 in total and your first top-up is 7 days old. Each key can have its own daily cap in the console. At the cap, 429
daily_cap. - A request runs for about 26 seconds at most; past that it answers 504 and is not charged.
Billing
- Pay per record returned, at each endpoint's price on the pricing page.
- Topping up adds a payment fee; the top-up page shows it before you pay. Prices per record do not include it, and it is not refunded.
- You pay per record; when a request returns few records or none, it is charged at most the endpoint minimum for each page it reads, possibly less, and errors or timeouts on our side are not charged. When the minimum applied,
same_price_up_toin the answer says how many records the same money buys. Every endpoint's page gives its minimum and how many records a page holds. - Balance does not expire while your account is open. No subscription, nothing renews.
- Every answer says what it cost (
charged_usd) and what is left (balance_usd).
A bill you can read line by line.
Five example requests at today's prices. Each line is the price per record times what came back.
POST /v1/weibo/search | 20 records | 20 × $0.00373 | $0.0746 |
POST /v1/xiaohongshu/search | 20 records | 20 × $0.0018 | $0.036 |
POST /v1/douyin-comments/comments | 502 · no answer | not charged | $0 |
POST /v1/xiaohongshu/search | 0 records · at most the minimum | the platform answered with nothing: at most the endpoint's minimum | $0.025 |
POST /v1/xiaohongshu/search {…, "cursor": …} | 20 records · page 2 | same request, cursor sent back · 20 × $0.0018 | $0.036 |
| Charged | $0.1716 | ||
|---|---|---|---|
| Balance left | $9.8284 | ||