Our own visit statistics are always on. Google Analytics, which helps us understand how people use our public pages (not your signed-in workspace), is enabled only with your permission. See our Privacy policy.

Douyin Hashtag search API

POST

API health

24h health
Normal
24h average time
—
  • Healthy / normal
  • Available
  • Limited
  • Mostly down
Normal

Find Douyin hashtags whose names contain a keyword, ranked by heat. Each hashtag has its numeric ID, a heat index and the videos, likes and views it gathered over the last 7 full days in China time, with the period dates on every row. Up to 200 hashtags per call, 20 by default; pass hashtag_id to hashtag_detail for all-time totals.

Price $15.56 per 1,000 requests ($0.01556 per call). Failed calls and empty results are not charged. Synchronous. For slow jobs add "mode": "async" to the body, take the job_id and poll.

AI prompt

Paste this into your AI assistant. It already holds this endpoint's parameters, response fields and an example request, so the assistant can ask what you need and then write the scraper.

Please help me write a data collection script with the EveryInfra Douyin Hashtag search endpoint (douyin/hashtag_search).

How the endpoint works:
- Request: POST https://api.everyinfra.com/api/v1/social with the header Authorization: Bearer <API key>. Read the key from the EVERYINFRA_API_KEY environment variable and never hard-code it.
- In the request body, set platform to douyin and action to hashtag_search, and put the parameters inside params.
- Required parameters:
  - keyword: The word to look for in Douyin hashtag names, such as food; Chinese terms usually match more hashtags. It finds hashtags, not videos.
- Optional parameters:
  - limit: The most rows to return in this call, an integer from 1 to 200. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge. (default: 20)
- Returns a list of records. Main fields of each record: hashtag_id (Hashtag ID (a digit string)), hashtag_name (Hashtag name, without the #), search_rank, heat_index (The hashtag's heat index over the perio…), period_video_count (Videos posted under the hashtag during…), period_like_count (Likes the hashtag's videos received dur…), period_view_count (Views of the hashtag's videos during th…), period_start (First day of the period, YYYY-MM-DD (ha…), period_end (Last day of the period, YYYY-MM-DD (has…).
- Example request body:
{
  "platform": "douyin",
  "action": "hashtag_search",
  "params": {
    "keyword": "美食"
  }
}
- Price: $15.56 per 1,000 requests; failed and empty results are not charged.
- For dozens or hundreds of targets, add "mode": "async" to the body: you get a job_id at once and poll GET https://api.everyinfra.com/api/v1/jobs/{job_id} for the result.
- On 422, fix the request using the suggested parameter names and allowed values in the error; on 429 or 503, wait for Retry-After and try again.

Before writing code, ask me which targets I need, how many, which fields, and what output format I want; then confirm the plan and the rough cost with me.

Request parameters

NameInTypeRequiredDefaultDescription
AuthorizationheaderstringYes-Bearer followed by your API key. Create it in the console; never put it in a URL or a code repository.
platformbodystringYesdouyinPlatform identifier, fixed value.
actionbodystringYeshashtag_searchCapability identifier, fixed value.
keywordbody.paramsstringYes-The word to look for in Douyin hashtag names, such as food; Chinese terms usually match more hashtags. It finds hashtags, not videos.
limitbody.paramsinteger (1–200)No20The most rows to return in this call, an integer from 1 to 200. The default applies when you leave it out, and a call can return fewer rows. Larger values return 422 before any charge.

Code samples

bash
curl -X POST 'https://api.everyinfra.com/api/v1/social' \
  -H "Authorization: Bearer $EVERYINFRA_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "platform": "douyin",
  "action": "hashtag_search",
  "params": {
    "keyword": "美食"
  }
}'

OpenAPI definition (JSON)Samples read the key from the EVERYINFRA_API_KEY environment variable; copied code never contains your key.

Response example

Field preview

No sample response is available for these parameters yet. This preview shows the response shape and fields from the API definition, with … as placeholders; it is not the result of a live call.

json
{
  "id": "req_…",
  "platform": "douyin",
  "action": "hashtag_search",
  "results": [
    {
      "hashtag_id": …,
      "hashtag_name": …,
      "search_rank": …,
      "heat_index": …,
      "period_video_count": …,
      "period_like_count": …,
      "period_view_count": …,
      "period_start": …,
      "period_end": …,
      "platform": …
    }
  ],
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}

Response fields

Business data is in results. The table lists the fields a record can contain; values the platform does not show are never made up.

FieldMeaning
hashtag_idHashtag ID (a digit string); pass it as hashtag_id to hashtag_detail.
hashtag_nameHashtag name, without the #.
search_rankKeeps the platform's own meaning
heat_indexThe hashtag's heat index over the period (hashtag_search), a Douyin metric to compare only within one result.
period_video_countVideos posted under the hashtag during the period (hashtag_search).
period_like_countLikes the hashtag's videos received during the period (hashtag_search).
period_view_countViews of the hashtag's videos during the period (hashtag_search), as counted by the platform.
period_startFirst day of the period, YYYY-MM-DD (hashtag_search); always the last 7 full days up to yesterday in China time.
period_endLast day of the period, YYYY-MM-DD (hashtag_search): yesterday in China time.
platformSource platform identifier, the same as platform in the request (for example xiaohongshu, tiktok).

Errors and billing

401
Missing or invalid key.
402
Insufficient balance. Top up first.
422
Invalid parameter name or value. Fix it using the suggestions in the error. No charge.
429
Per-minute request limit reached. Wait for Retry-After, then try again.
503
Could not complete. The held charge is returned to your balance. If the outcome is unknown, verify it before you retry.
200 empty
No data. No charge.

Errors