Douyin Music API
Read Douyin background music metadata, MP3 stream URL, author, and usage count by music ID. 2 credits per call. Invoke via POST /v1/call/douyin.music or the MCP call tool. Costs 2 credits per successful call; failed calls are free.
What you get
| Field | Type | Meaning |
|---|---|---|
data.title | string | Track title |
data.author | string | Track author |
data.play_url | string | Audio stream URL |
data.user_count | integer | Number of videos using this sound |
The request
Endpoint: POST https://socialtoai.app/v1/call/douyin.music. Pass id and a fresh Idempotency-Key header:
curl -X POST "https://socialtoai.app/v1/call/douyin.music" \
-H "Authorization: Bearer $SOCIALTOAI_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"id": "7123456789012345678"}'Python example
import os, uuid, requests
resp = requests.post(
"https://socialtoai.app/v1/call/douyin.music",
headers={
"Authorization": f"Bearer {os.environ['SOCIALTOAI_API_KEY']}",
"Idempotency-Key": str(uuid.uuid4()),
},
json={"id": "7123456789012345678"},
timeout=30,
)
print(resp.json())Use over MCP
Connect Claude, ChatGPT, Cursor, or Codex to https://socialtoai.app/mcp and ask your assistant to run call with op="douyin.music".