# Douyin Music detail API (douyin.music_detail)

- Canonical page: https://everyinfra.com/en/douyin-api/music_detail
- Endpoint: POST /api/v1/social with {"platform": "douyin", "action": "music_detail", "params": {...}}
- Price: $0.000806 per call ($0.81 per 1,000 requests); failed and empty results are not charged
- Returns: single object
- 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=music_detail

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| music_id | not declared | yes | not declared | Numeric Douyin music ID, such as `7699717253151558410`, taken from the `id` of a `music_search` row; a douyin.com/music/<ID> link is accepted too. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| id | The record's unique ID on the platform. Unique only within one platform; IDs can repeat across platforms. |
| url | Link to the record on the platform. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| author_name | Author's display name. |
| duration_seconds | Duration in seconds. null for content that is not video or audio. |
| duration_sec | Video length in seconds. |
| use_count | How many works use this track (music_search), the figure Douyin shows on the music page. |
| cover_image_url | Video or image-post cover thumbnail URL (search / user_posts rows). |
| audio_url | Audio link: the video's audio track on transcript (mp3), the track's play link on music_search; may expire. |
| lyric_url | Lyrics file link (music_search), only when Douyin has one. |
| 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": "music_detail",
  "params": {
    "music_id": "7699717253151558410"
  }
}'
```

```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": "music_detail",
        "params": {
            "music_id": "7699717253151558410",
        },
    },
    timeout=120,
)
print(response.status_code)
print(response.json())
```

## Response example

No real sample for these example parameters yet: structure only, every value is a placeholder (…).

```text
{
  "id": "req_…",
  "platform": "douyin",
  "action": "music_detail",
  "results": {
    "id": …,
    "url": …,
    "title": …,
    "author_name": …,
    "duration_seconds": …,
    "duration_sec": …,
    "use_count": …,
    "cover_image_url": …,
    "audio_url": …,
    "lyric_url": …,
    "platform": …
  },
  "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
