# How do I export Douyin data?

Take it page by page with DataXAPI's Douyin endpoints: videos, accounts, comments, trend-index (巨量算数) figures and Xingtu rate cards all come back in one JSON shape, so paging through and saving is the export. Without code, the command line writes results to a file, and a Skill turns jobs like comments straight into a CSV table. DataXAPI reads Douyin with 34 endpoints, from $0.0020 a call; a failed call is not charged.

## What you can export

Videos found by keyword, an account's profile and its videos, the comments and replies under a video, Douyin's trending lists, a keyword's daily search and composite index from the trend-index (巨量算数), and Xingtu creators' rate cards and audiences. All of it is publicly visible data; you never sign in to Douyin.

## Three ways to export

**In code**: each call returns one page, with the list in `data.items`; pass `page.next_cursor` back as `cursor` for the next page, within the hour the cursor is good for. Every page is a call charged on its own.

**On the command line**: `dataxapi call` with `--pages` walks several pages, `--max-spend` caps what they may cost, and `--out` writes the result to a JSON file. **With a Skill**: `dataxapi run comments` takes a video's comments page by page, and `--out` writes them as a CSV that opens in any spreadsheet.

## Before you export

The comments endpoint cannot tell a missing video from one without comments: both are empty results, and an empty result is charged. Objects that do not exist and failed calls are not. A call's result is kept for 24 hours: reading it again by its request ID, in another view, is not charged again.

## Endpoints

- [Douyin video search](https://dataxapi.com/apis/douyin/videos/search/) ($0.0200 / a call): Search Douyin videos by terms, a page at a time, sorted by relevance, newest or most liked and filtered by time posted: caption, author with follower count, engagement counts.
- [Douyin user videos](https://dataxapi.com/apis/douyin/users/videos/list/) ($0.0020 / a call): Get a page of the videos a Douyin account has posted, newest first: caption, engagement counts, time posted.
- [Douyin video comments](https://dataxapi.com/apis/douyin/videos/comments/list/) ($0.0020 / a call): Get a page of comments on a Douyin video: text, commenter, likes, reply count, time posted.
- [Douyin trend-index keyword trends](https://dataxapi.com/apis/douyin/index/keywords/history/) ($0.0060 / a call): Get the day-by-day search index and composite index of a keyword, or of one to five keywords at once, on Douyin over a date range, from 巨量算数 (the Douyin index), with the daily averages of the period, of the one before and of a year earlier. An index is the platform's score of volume, not a count of searches; days are calendar days in China time (UTC+8).

## How-to guides

- [How to export Douyin video comments in bulk](https://dataxapi.com/guides/douyin-video-comments/)
- [How to get Douyin keyword trends in bulk](https://dataxapi.com/guides/douyin-keyword-trends/)
- [How to look up a Douyin creator's Xingtu rate card](https://dataxapi.com/guides/douyin-xingtu-creator-rates/)

## More about Douyin

- [Douyin API](https://dataxapi.com/apis/douyin/)
- [Douyin trend-index API](https://dataxapi.com/apis/douyin/index/)

---

Catalog revision c48ce454ae6c4c65. [HTML version](https://dataxapi.com/answers/export-douyin-data/)
