end_datestringwajib
End date YYYYMMDD
https://api.sandbase.ai/v1/api/douyin/index/portraitReturns crowd portrait analysis for a specific keyword over a defined date range. Allows querying data for Douyin or Toutiao platforms.
[
{
"data": {
"BaseResp": {
"StatusCode": 500,
"StatusMessage": "关键词不为空"
}
}
}
]Pilih contoh untuk memuat input dan hasilnya ke playground.
Returns crowd portrait analysis for one keyword over a date range on Douyin or Toutiao. It needs a keyword, a start_date and an end_date. app_name is optional and picks the platform.
人工智能 attracts on Douyin.aweme) and Toutiao (toutiao).curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/portrait" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"end_date": "1735660799", "keyword": "人工智能", "start_date": "1730044800"}'
The result is returned in outputs[0].data.
| Name | Type | Required | Description |
|---|---|---|---|
end_date | string | Yes | End date YYYYMMDD |
keyword | string | Yes | The keyword to analyze |
start_date | string | Yes | Start date YYYYMMDD |
app_name | string | No | Platform, aweme=Douyin, toutiao=Toutiao |
Real response for the request above, trimmed: lists keep their first item and long strings are cut.
{
"BaseResp": {
"StatusCode": 500,
"StatusMessage": "日期格式满足%Y%m%d"
}
}
| Field | Meaning |
|---|---|
BaseResp | Status block of the response. In the sample call it is the only top-level key. |
BaseResp.StatusCode | Numeric status of the call. The sample call returned 500, which means the request failed. |
BaseResp.StatusMessage | Text that explains the status. The sample call returned 日期格式满足%Y%m%d, which says the date must match the %Y%m%d format. |
start_date and end_date as YYYYMMDD strings, for example 20241101. The sample request used Unix-style numbers such as 1730044800, and the call failed with the date format error shown above.app_name to aweme for Douyin or toutiao for Toutiao.$0.001 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.
Mulai membangun
Endpoint API platform dengan autentikasi dan pelacakan penggunaan terpadu.
curl -X POST "https://api.sandbase.ai/v1/api/douyin/index/portrait" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"keyword": "example",
"end_date": "example",
"start_date": "example"
}'Atur SandBase API key Anda di environment server Anda. Permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key Anda di server. Jangan tampilkan di kode browser.
end_datestringwajibEnd date YYYYMMDD
keywordstringwajibThe keyword to analyze
start_datestringwajibStart date YYYYMMDD
app_namestringPlatform, aweme=Douyin, toutiao=Toutiao
Nilai yang mungkin: aweme, toutiao
Contoh respons yang disimpan untuk API ini; tidak ada permintaan langsung yang dibuat saat melihatnya.
[
{
"data": {
"BaseResp": {
"StatusCode": 500,
"StatusMessage": "关键词不为空"
}
}
}
]Jelajahi lebih lanjut
| API | Harga | Respons |
|---|---|---|
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Douyin | $0.001 per panggilan | JSON |
Pertanyaan
Kirim permintaan POST ke https://api.sandbase.ai/v1/api/douyin/index/portrait dengan kunci API SandBase Anda di header Authorization (Bearer) dan parameter sebagai body JSON. Anda juga dapat mencobanya di Playground di halaman ini tanpa menulis kode.
$0.001 per panggilan, ditagihkan dari saldo SandBase Anda. Anda hanya dikenai biaya untuk panggilan yang Anda lakukan; tidak ada langganan.
Wajib: end_date (string), keyword (string) dan start_date (string). Opsional: app_name (salah satu dari aweme, toutiao). Tabel Parameters dan Playground di halaman ini mencantumkan setiap field.
Respons JSON yang dikembalikan dalam permintaan HTTP yang sama (sinkron). README di halaman ini menyertakan contoh respons.
Tidak. Douyin Keyword Crowd Portrait berjalan melalui SandBase, jadi satu kunci API SandBase mencakup endpoint ini dan setiap API serta model lain di katalog. Anda tidak perlu mendaftar akses API Douyin secara terpisah.