# What are aweme_id and modal_id in Douyin links?

> aweme_id is the 19-digit number Douyin gives each video and photo post; modal_id is a web link parameter that carries the same number. Shapes, look-alikes and how the API uses them.

Canonical page: https://okdata.online/answers/douyin-aweme-id-modal-id/

**Short answer: **They are the same number. aweme_id is Douyin's ID for a post, a 19-digit integer, and modal_id is the parameter douyin.com uses to open that post in an overlay on another page. Send the number as id, or the whole link as url, to okdata's Douyin video detail for $0.002; every search result carries it as id as well.

In Douyin's own API every post is an "aweme", and `aweme_id` is the post's ID: a plain integer, 19 digits long for anything posted in recent years, such as `7428815302664207643`. Videos and photo posts (图文) share the same kind of number. `modal_id` is not a second ID. It is a query parameter on douyin.com pages that opens a post in a pop-up layer over whatever you were browsing: search results, a creator's page, your own likes, the 精选 feed. Its value is the aweme_id, so `douyin.com/search/露营?modal_id=7428815302664207643` and `douyin.com/video/7428815302664207643` point at the same post. Tools that only look for `/video/` in the path fail on the first kind of link, which is why "unsupported URL" reports with `modal_id` keep turning up in downloader issue trackers.

## Where the number shows up

| Where | Example | What it is |
|---|---|---|
| Video page | `douyin.com/video/7428815302664207643` | aweme_id in the path |
| Photo post page | `douyin.com/note/7428815302664207643` | same ID space, different path |
| Overlay on another page | `douyin.com/user/MS4w...?modal_id=7428815302664207643` | aweme_id as a parameter |
| Share link | `v.douyin.com/iAbCdEf/` | a short code that redirects to one of the above |
| okdata response | `id` on a post | aweme_id as a string |

## Look-alikes to keep apart

- **Comment IDs** are also 19-digit numbers that start with 7. Keep them in their own column so they never get joined to posts.
- **sec_uid** (`MS4wLjABAAAA…`) identifies an account, not a post. See [how to get a sec_uid](/answers/douyin-sec-uid/).
- **The numeric uid** and the **Douyin number (抖音号)** are account identifiers too.
- **The code in a v.douyin.com link** is not an ID. It only means something after the redirect.

One more property: divide an aweme_id by 2^32 and you get a Unix time close to when the post was uploaded. Douyin does not document this, and scheduled posts go live hours after that moment, so report `published_at` instead.

## How the API takes it and returns it

[Douyin video detail](/apis/douyin/videos/get/) takes `id=7428815302664207643`, or `url=` with any link from the table, `modal_id` links and v.douyin.com short links included. It returns the post with `id` (the aweme_id as a string), `url`, `type` (`video` or `image`), caption, publish time, author and counts. Every result of [Douyin video search](/apis/douyin/videos/search/) carries the same `id`, and [video comments](/apis/douyin/videos/comments/list/) take it as `id`.

| Step | Calls | Cost |
|---|---|---|
| One link or ID to post data | 1 | $0.002 |
| 300 links from a spreadsheet | 300 | $0.60 |
| One search page, IDs included | 1 | $0.02 |

## Example

```bash
curl -G "https://api.okdata.online/v1/douyin/videos/get" \
  -H "Authorization: Bearer $OKDATA_API_KEY" \
  --data-urlencode 'url=https://www.douyin.com/search/露营?modal_id=7428815302664207643' \
  --data-urlencode 'fields=id,url,type,published_at,metrics.likes'
```

The `url` in the answer is the canonical `/video/` or `/note/` link, whichever kind of post it is.

## Limits

- Store the ID as text. A 19-digit number is too large for a double to hold exactly: JavaScript rounds it, and Excel keeps 15 significant digits, so the last four become zeros.
- A `modal_id` copied from a logged-in page such as `/user/self` still works, because only the number is read.
- Deleted or private posts return `not_found`, which is not charged.
- Turning share text into an ID step by step is covered in [Douyin share link to video ID](/answers/douyin-share-link-to-video-id/).

## Endpoints used

- [Douyin video detail](https://okdata.online/apis/douyin/videos/get/) `douyin.videos.get`: $0.002 per call
- [Douyin video search](https://okdata.online/apis/douyin/videos/search/) `douyin.videos.search`: $0.02 per call · about 20 videos per page

## More about Douyin

- [Douyin API](https://okdata.online/apis/douyin/)
- [Douyin API in Python: videos, profiles and comments (2026)](https://okdata.online/guides/douyin-api-python/)
- [How to export Douyin video comments in bulk](https://okdata.online/guides/douyin-video-comments/)
- [How to find Douyin Xingtu creators and get their rate cards](https://okdata.online/guides/douyin-xingtu-creator-rates/)
- [What is Douyin's a_bogus parameter, and do I need to generate it to get Douyin data?](https://okdata.online/answers/douyin-a-bogus-signature/)
- [How do I export Douyin video comments for sentiment analysis?](https://okdata.online/answers/douyin-export-comments-sentiment/)
- [How do I monitor brand mentions on Douyin and get new videos every day?](https://okdata.online/answers/douyin-keyword-monitoring/)
- [Why do some Douyin links say /note/ instead of /video/?](https://okdata.online/answers/douyin-note-vs-video-links/)
- [My Douyin scraper stopped working after a signature change. Should I fix it or switch to an API?](https://okdata.online/answers/douyin-scraper-broke-signature/)
- [How to collect Douyin comments: API, crawler or no-code (2026)](https://okdata.online/compare/douyin-comment-scraping/)
- [Douyin data APIs: official vs third-party vs open-source (2026)](https://okdata.online/compare/douyin-data-apis/)
- [Official platform APIs vs third-party data APIs (2026)](https://okdata.online/compare/official-apis-vs-data-apis/)
- [Scraping it yourself vs a per-call data API: cost, upkeep and risk](https://okdata.online/compare/scraping-vs-data-api/)
- [How to choose a social media data API (2026)](https://okdata.online/compare/social-media-data-apis/)

## Sources

- [Douyin /user/self link with modal_id reported as unsupported (VidBee issue #502)](https://github.com/nexmoe/VidBee/issues/502) (read 2026-11-12)
- [Search page link with ?modal_id= not recognised (TikTokDownloader issue #147)](https://github.com/JoeanAmier/TikTokDownloader/issues/147) (read 2026-11-12)
- [Excel specifications and limits: number precision of 15 digits](https://support.microsoft.com/en-us/office/excel-specifications-and-limits-1672b34d-7043-467e-8e27-269d656771c3) (read 2026-11-12)

Where people asked this (read 2026-11-12): 

- https://github.com/nexmoe/VidBee/issues/502
- https://github.com/JoeanAmier/TikTokDownloader/issues/147

Updated 2026-11-12
