> ## Documentation Index
> Fetch the complete documentation index at: https://docs.vexqo.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# TikTok

> Read a public TikTok post by URL or ID, or a profile by username.

TikTok lookups return public post or profile data as JSON. Both endpoints use your Vexqo API key and cost **4 credits per successful request** by default. Failed requests are not charged. Check `credit_costs.tiktok_post` and `credit_costs.tiktok_profile` in `GET /account` for your account's rates.

## Read a post

Use `GET /tiktok/posts` with a `target` query parameter. Supply a numeric post ID or a full public TikTok video or photo URL. Short links are not supported.

Set `TIKTOK_POST_URL` to the public post you want to read:

```bash theme={null}
curl --fail-with-body --get "https://api.vexqo.dev/tiktok/posts" \
  --header "X-API-Key: $VEXQO_API_KEY" \
  --data-urlencode "target=$TIKTOK_POST_URL"
```

The response contains `post`, `source` and `links`:

| Field | What it contains |
| - | - |
| `post.id`, `post.url`, `post.type` | Post identity, public URL and media type. |
| `post.caption`, `post.created_at` | Published caption and timestamp, when available. |
| `post.author` | Author ID, username, name, verification status and URL. |
| `post.metrics` | Source-provided views, likes, comments, shares and saves. Missing values are `null`. |
| `post.media` | Media assets, returned count, source-provided expected count and completeness. |
| `source` | Collection URL and time, cache status, age and collection exit country. |
| `links` | Follow-up API and source links where available. |

## Read a profile

Use `GET /tiktok/profiles/{username}`. Supply a username, with or without its leading `@`.

```bash theme={null}
curl --fail-with-body "https://api.vexqo.dev/tiktok/profiles/gymshark" \
  --header "X-API-Key: $VEXQO_API_KEY"
```

The response contains `profile`, `source` and `links`. Profile fields include the public username, display name, biography, avatar, website, verification status, followers, following, post count and likes when supplied by TikTok. This endpoint returns profile details, not a list of the account's posts.

## Optional parameters

Both endpoints accept these query parameters:

| Parameter | Default | Meaning |
| - | - | - |
| `max_age` | `0` | Maximum acceptable cached age, from 0 to 300 seconds. Zero requests fresh collection. Cache hits have the same credit cost. |
| `country` | Service default | Two-letter proxy exit country. This selects the collection location, not the post's origin or audience. |

## Data availability

Vexqo returns the fields exposed by TikTok's public page at collection time. Missing metrics remain `null`. Media URLs are supplied by TikTok, may expire or require platform cookies, and are not rehosted. Check `media.complete`, `expected_count` and `returned_count` before assuming a photo post is complete.

These endpoints support individual public post and profile lookups. They do not provide keyword search, a complete account history or TikTok ad-library research.

See [credits and errors](https://docs.vexqo.dev/usage.md) for authentication failures, rate limits and retries, or the [live API reference](https://api.vexqo.dev/docs#/Public%20social%20data) for the complete response schema.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.