# TikTok Account playlists API (tiktok.user_playlists)

- Canonical page: [https://everyinfra.com/en/tiktok-api/user_playlists](https://everyinfra.com/en/tiktok-api/user_playlists?utm_medium=ai_doc&utm_campaign=page_md)
- Endpoint: POST https://api.everyinfra.com/api/v1/social with {"platform": "tiktok", "action": "user_playlists", "params": {...}}
- Price: $0.000556 per call ($0.56 per 1,000 requests); failed calls and empty results are not charged
- Returns: list, one page of up to 30 per call; the number of rows varies from page to page and a short page is not the end (limit is ignored; pass the top-level next_page_token from the response as page_token for the next page; no next_page_token means the end)
- Pagination: pass next_page_token back as page_token for the next page, other params unchanged; one call per page, tokens last 24 hours
- 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=tiktok&action=user_playlists

## Parameters

| name | type | required | default | description |
|---|---|---|---|---|
| username | not declared | yes | not declared | A TikTok username such as `nasa` (a leading @ is removed), a profile link, or the account's `sec_uid`. An account that does not exist returns 200 with an empty result and `empty_reason` set to `account_not_found`, and the call is not charged. |
| page_token | not declared | no | not declared | Page token. Leave it out for the first page, then pass back the previous response's `next_page_token` exactly as received, with the other parameters unchanged. Each page holds up to 30 playlists and counts as one call. Tokens last 24 hours, and the last page has no `next_page_token`. |

## Response fields (items in `results`)

| field | meaning |
|---|---|
| playlist_id | Playlist ID (user_playlists); pass it unchanged as `playlist_id` to playlist_videos. |
| title | Title. null when the platform has no titles (for example text-only posts). |
| url | Link to the record on the platform. |
| cover_image_url | Video cover image link (signed, expires). |
| video_count | Number of videos. |
| author_username | Author's username (@handle), usually usable in URLs. |
| author_name | Author's display name. |
| author_id | Author's unique ID on the platform. |
| author_sec_uid | The account's secUid: in live_room, the streamer's account, starting with MS4w; in music_detail, the music author's account, present only for original sounds; in photos, playlist_videos, user_reposts and user_stories, the post author's account; in user_playlists, the playlist owner's account. |
| author_avatar_url | Author's avatar image link (on most platforms signed and expires). |
| 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": "tiktok",
  "action": "user_playlists",
  "params": {
    "username": "nasa"
  }
}'
```

```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": "tiktok",
        "action": "user_playlists",
        "params": {
            "username": "nasa",
        },
    },
    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": "tiktok",
  "action": "user_playlists",
  "results": [
    {
      "playlist_id": …,
      "title": …,
      "url": …,
      "cover_image_url": …,
      "video_count": …,
      "author_username": …,
      "author_name": …,
      "author_id": …,
      "author_sec_uid": …,
      "author_avatar_url": …,
      "platform": …
    }
  ],
  "next_page_token": …,
  "pagination": { … },
  "count": …,
  "billing": {
    "charged": …,
    "charged_usd": …,
    "balance_after_usd": …,
    …
  },
  "quota": { … }
}
```

## Also

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