API DocsdouyinSearchFetch search keyword suggestions
Fetch search keyword suggestions
What this API is for
- Fetch keyword suggestion results from Douyin App.
- Based on the user's input, returns a list of recommended search keywords to improve search experience
POST
/openapi/api/v1/douyin/search/fetch_search_suggestPrice:Price unavailable · Actual charges depend on free quota and account discounts
Authentication
All API requests require a Bearer project token in the Authorization header
Authorization header
Authorization: Bearer YOUR_API_TOKENRequest parameters
- keyword: Input keyword, e.g., "Artificial Intelligence"
| Name | Location / type | Required | Notes | Example |
|---|---|---|---|---|
| keyword | body / string | No |
|
Request examples
curl -X POST "https://api.trmesh.com/openapi/api/v1/douyin/search/fetch_search_suggest" \ -H "Authorization: Bearer sdc_your_project_token"
Response fields
- status_code: Status code (0 means success)
- status_msg: Response message (usually empty)
- rid: Request ID
- sug_list[]: List of suggested search keywords
- content: Suggested keyword (e.g., "AI software free download")
- sug_type: Suggestion type (usually empty, reserved field)
- pos[]: Position marking
- begin: Begin character position
- end: End character position
- word_record:
- group_id: Suggestion group ID
- words_position: Position in the current suggestion list
- words_content: The word content (same as content)
- words_source: Word source (typically "sug")
- extra_info:
- client_server_extra: Extra client-server config (JSON string)
- poi_id: Related POI ID (usually empty)
- search_params: Search parameters (with recommendation scores)
- words_query_record:
- info: Additional info (usually empty)
- words_source: Source of suggestions
- query_id: Suggestion query ID
- extra:
- now: Current server timestamp (milliseconds)
- logid: Log ID
- fatal_item_ids: List of fatal error items (usually empty)
- search_request_id: Search request ID (usually empty)
- log_pb:
- impr_id: Impression log ID
- time_cost:
- stream_inner: Internal stream processing time (milliseconds)
- server_engine_cost: Server search engine processing time (milliseconds)
- cache_conf:
- enable: Whether cache was hit (boolean)
| Field | Type | Notes | Example |
|---|---|---|---|
| status_code | unknown |
| |
| status_msg | unknown |
| |
| rid | unknown |
| |
| sug_list[] | unknown |
| |
| content | unknown |
| |
| sug_type | unknown |
| |
| pos[] | unknown |
| |
| begin | unknown |
| |
| end | unknown |
| |
| group_id | unknown |
| |
| words_position | unknown |
| |
| words_content | unknown |
| |
| words_source | unknown |
| |
| client_server_extra | unknown |
| |
| poi_id | unknown |
| |
| search_params | unknown |
| |
| info | unknown |
| |
| query_id | unknown |
| |
| now | unknown |
| |
| logid | unknown |
| |
| fatal_item_ids | unknown |
| |
| search_request_id | unknown |
| |
| impr_id | unknown |
| |
| stream_inner | unknown |
| |
| server_engine_cost | unknown |
| |
| enable | unknown |
|
Common response envelope
Common fields for response status, request identifiers and data
| Field | Type | Notes | Example |
|---|---|---|---|
| code | integer |
| |
| request_id | string | null |
| |
| message | string |
| |
| message_zh | string |
| |
| support | string |
| |
| time | string |
| |
| time_stamp | integer |
| |
| time_zone | string |
| |
| docs | string | null |
| |
| cache_message | string | null |
| |
| cache_message_zh | string | null |
| |
| cache_url | string | null |
| |
| router | string |
| |
| params | unknown |
| |
| data | unknown | null |
|
Errors and limits
The docs cover not only success responses, but also auth failures, rate limits, and data-service errors
| Code | Meaning | Notes |
|---|---|---|
| 200 | Success | The request completed and returned the standard response envelope. |
| 401 | Unauthorized | The token is missing, invalid, or no longer active. |
| 429 | Rate limited | The request exceeded token, user, or plan-level throughput limits. |
| 502 | Service unavailable | The gateway could not obtain a healthy result. Retry in a moment. |
Next steps
New to the API? Read the guide or explore examples