# Douyin Hashtag search API (douyin.hashtag_search)

- Canonical page: [https://everyinfra.com/en/douyin-api/hashtag_search](https://everyinfra.com/en/douyin-api/hashtag_search?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "douyin", "action": "hashtag_search", "params": {...}}
- Price: $0.01556 per call ($15.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, default 20, max 200 per call
- Mode: sync; add "mode": "async" for slow tasks

## Health

- Live health (24h percent, hourly and daily trends): https://api.everyinfra.com/api/v1/social/availability?platform=douyin&action=hashtag_search

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| keyword | not declared | yes | not declared | The word to look for in Douyin hashtag names, such as `food`; Chinese terms usually match more hashtags. It finds hashtags, not videos. |
| limit | integer (1–200) | no | 20 | 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. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| hashtag_id | Hashtag ID (a digit string); pass it as `hashtag_id` to hashtag_detail. |
| hashtag_name | Hashtag name, without the #. |
| search_rank | Position in this keyword search result, starting at 1: a product_search row is a product, a search row is a post, a hashtag_search row is a hashtag. |
| heat_index | The hashtag's heat index over the period (hashtag_search), a Douyin metric to compare only within one result. |
| period_video_count | Videos posted under the hashtag during the period (hashtag_search). |
| period_like_count | Likes the hashtag's videos received during the period (hashtag_search). |
| period_view_count | Views of the hashtag's videos during the period (hashtag_search), as counted by the platform. |
| period_start | First day of the period, YYYY-MM-DD (hashtag_search); always the last 7 full days up to yesterday in China time. |
| period_end | Last day of the period, YYYY-MM-DD (hashtag_search): yesterday in China time. |
| platform | Source platform identifier, the same as platform in the request (for example xiaohongshu, tiktok). |

## Example

```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": "美食"
  }
}'
```

```python
import os
import requests

response = requests.post(
    "https://api.everyinfra.com/api/v1/social",
    headers={"Authorization": f"Bearer {os.environ['EVERYINFRA_API_KEY']}"},
    json={
        "platform": "douyin",
        "action": "hashtag_search",
        "params": {
            "keyword": "美食",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

Real response to the example request above, captured 2026-11-07T14:47:42Z. `results` and `count` are real with personal information (names, handles, avatars, profile links, contact details) removed; the list keeps the first 2 of 20. `id`, `billing` and `quota` differ on every call, so only their shape is shown.

```text
{
  "id": "req_…",
  "platform": "douyin",
  "action": "hashtag_search",
  "results": [
    {
      "hashtag_id": "1767586897793101",
      "hashtag_name": "美食",
      "search_rank": 1,
      "heat_index": 58567572,
      "period_video_count": 393945,
      "period_like_count": 68080130,
      "period_view_count": 5177091488,
      "period_start": "2026-10-31",
      "period_end": "2026-11-06",
      "platform": "douyin"
    },
    {
      "hashtag_id": "1581688162541582",
      "hashtag_name": "美食教程",
      "search_rank": 2,
      "heat_index": 18339337,
      "period_video_count": 50914,
      "period_like_count": 23681506,
      "period_view_count": 1957784078,
      "period_start": "2026-10-31",
      "period_end": "2026-11-06",
      "platform": "douyin"
    }
  ],
  "count": 20,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

- Capability catalog (no key): https://api.everyinfra.com/api/v1/social/catalog?platform=douyin
- OpenAPI: https://everyinfra.com/openapi.json · Agents guide: https://everyinfra.com/agents.md
