# Douyin Video Search

Get Douyin Video data via REST or OpenAny MCP—with pay-per-use pricing, no subscription, and no cookies required. Powered by anyapi, pass parameters such as duration, publishedWithin, query, and retrieve structured data including continuation flag, returned backtrace field, returned next cursor field, returned search id field, and returned videos field for content research and account lookup, and integration reference.

Documentation: https://openany.si/douyin/douyin-video-07cdcaca/aaa08efe-9a3a-4035-b87c-ec08099e3a44/
API ID: aaa08efe-9a3a-4035-b87c-ec08099e3a44
Provider: anyapi
Contract revision: 8
Method: POST
Endpoint: https://api.openany.si/v1/agent-apis/anyapi/v1/run/douyin.search_videos
Page update time: 2026-12-03T02:53:21.564Z
Access: OpenAny REST
OpenAny MCP: availability is not supplied by this REST contract. Check get_api on the configured OpenAny MCP server before execution.
Request content type: application/json
Execution mode: sync
Authentication: Authorization: Bearer $OPENANY_API_KEY

## Billing
Price: $0.012 / call
API-key calls use your shared balance. Review the published billing rules before making a paid request.
Price source: OpenAny public API contract.
Contract update time: 2026-12-03T02:53:18.825Z. This is not a price-change timestamp.
```json
{
  "currency": "USD",
  "mode": "fixed",
  "priceMicroUsd": "12000",
  "rounding": null,
  "unit": "call",
  "unitQuantity": null
}
```

## Usage and limits
## Douyin Video Search API

Search for public Douyin videos by keyword with sorting, time, duration, and content filters. Provide query in body. Read the response using the field paths below, preserving identifiers and the declared value types when mapping results.

## What You Can Build

- **Content research and account lookup**: Keep source records connected to their content and account identifiers.
- **Integration reference**: Use the selected request format and keep source identifiers with the returned result.

## Documented Response Fields

| Field | Meaning |
| --- | --- |
| `output.data.hasMore` | Continuation flag |
| `output.data.backtrace` | Returned backtrace field |
| `output.data.nextCursor` | Returned next cursor field |
| `output.data.searchId` | Returned search id field |
| `output.data.videos` | Returned videos field |
| `output.found` | Returned found field |

## Request parameters
```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Douyin Video Search request inputs",
  "$comment": "Declared input types grouped by HTTP location. Path, query and header values describe decoded inputs and are serialized as text on the wire; body is the payload. This is not an exhaustive provider contract or a schema for the raw HTTP request.",
  "type": "object",
  "properties": {
    "path": {
      "type": "object",
      "properties": {}
    },
    "query": {
      "type": "object",
      "properties": {
        "fields": {
          "type": "string",
          "description": "Optional. Comma-separated keys (dotted paths like `author.name` descend into nested objects) to keep on each result item: each row of the API's result list, or the `data` object itself for an API that returns one record. Keys are matched relative to that item, not against the top-level response envelope, so use `jq` to reshape the whole envelope. Shrinks the response without changing cost."
        },
        "max_items": {
          "type": "integer",
          "description": "Optional. Cap the number of result rows returned; a `_truncated` note reports how many were withheld so you can page via the API's own `limit`. An API that returns one record is not trimmed. Does not change cost.",
          "minimum": 0
        },
        "summary": {
          "type": "boolean",
          "description": "Optional. Return only a structural outline (top-level keys, item counts, and per-field byte sizes) instead of the full data. Does not change cost."
        },
        "jq": {
          "type": "string",
          "description": "Optional. A jq expression applied to the result envelope; its output replaces `output` (multiple outputs collect into an array). Reshape freely, e.g. `jq=.data | {title, description, md: .markdown[:3500]}`. Runs sandboxed with a 250ms / 2MB budget; on failure the full result is returned with a `jqError`. Does not change cost."
        },
        "max_cost_usd": {
          "type": "string",
          "description": "Optional. The most you are willing to pay for this one request, in US dollars (for example 0.05). Any route that would charge more than this is not used, so a request only ever runs on something you can afford. If nothing is available at or below your amount, the request is refused before it runs, nothing is charged, and the message tells you the cheapest price per request so you can raise it. Leave it out to accept the normal price."
        }
      }
    },
    "headers": {
      "type": "object",
      "properties": {
        "Idempotency-Key": {
          "type": "string",
          "description": "Optional wallet idempotency key, scoped to this customer for 24 hours. When the gateway honors the key, this synchronous in-process execution can continue after the caller disconnects, bounded by its execution deadline. A completed replayable result charges normally exactly once and can be replayed without another provider run or charge. A pending duplicate returns 409 idempotency_in_progress; reuse with different request semantics returns 409 idempotency_conflict.",
          "minLength": 1,
          "maxLength": 255
        }
      }
    },
    "body": {
      "additionalProperties": false,
      "example": {
        "duration": "0",
        "publishedWithin": 0,
        "query": "机器人",
        "sort": "relevance"
      },
      "properties": {
        "allowFallbacks": {
          "default": true,
          "description": "Optional, default true. When false, only the sources listed in `source` may serve; the request is refused with no charge if none of them can. When true, the listed sources are tried first and any other source may serve after them, at the normal price.",
          "type": "boolean"
        },
        "backtrace": {
          "description": "Backtrace token returned by the previous page.",
          "type": "string"
        },
        "cursor": {
          "description": "Pagination cursor: pass the previous response's nextCursor; omit for the first page. A raw integer cursor is still accepted.",
          "minimum": 0,
          "type": [
            "string",
            "integer"
          ]
        },
        "duration": {
          "default": "0",
          "description": "Duration filter in minutes: any, under 1, 1 to 5, or over 5.",
          "enum": [
            "0",
            "0-1",
            "1-5",
            "5-10000"
          ],
          "type": "string"
        },
        "ignoreSources": {
          "description": "Optional. Source ids to skip for this request, taken from this endpoint's `lanes[].source.id`. The cheapest remaining source serves and the price is that of the dearest remaining source. An id that does not serve this endpoint, or that is also in `source`, is rejected as invalid input with no charge; skipping every source is rejected the same way.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        },
        "preferLatencyUnderMs": {
          "description": "Optional; omit it and routing is unchanged, with the cheapest source serving. Prefer sources whose typical response time (median over the trailing 30 days, as published on this endpoint's lane health) is under this many milliseconds; among those, the cheapest serves. This can raise your price: when the cheapest source misses the target, a faster and dearer one serves, and you are quoted and charged its price. If no source is that fast the request is still served, by whichever source offers the best speed for its price - it is never refused for being slow. Sources we have not timed are tried last. This is a preference, not a guarantee: the median describes past requests and is not a ceiling on this one, and it excludes any wait this request itself asks for. On a paginated walk it applies to the first page only: later pages stay with the source that page chose, at the price it was quoted.",
          "minimum": 1,
          "type": "integer"
        },
        "publishedWithin": {
          "default": 0,
          "description": "Publication window in days. Use the canonical JSON integer 0 for any time, 1 for one day, 7 for seven days, or 180 for 180 days; legacy numeric strings remain accepted.",
          "enum": [
            0,
            1,
            7,
            180,
            "0",
            "1",
            "7",
            "180"
          ],
          "type": [
            "integer",
            "string"
          ]
        },
        "query": {
          "description": "Keyword to search for.",
          "minLength": 1,
          "type": "string"
        },
        "searchId": {
          "description": "Search ID returned by the previous page.",
          "type": "string"
        },
        "sort": {
          "default": "relevance",
          "description": "Sort order: relevance (Douyin's comprehensive ranking), most-liked, date-posted.",
          "enum": [
            "relevance",
            "most-liked",
            "date-posted"
          ],
          "type": "string"
        },
        "source": {
          "description": "Optional. Source ids to prefer, in order, taken from this endpoint's `lanes[].source.id` in /catalog or /apis. Omit it and the cheapest source serves, with automatic failover. Listed sources are tried first in the order given, then the others, unless `allowFallbacks` is false. A single source with `allowFallbacks` false is served only by that source at its price, quoted and charged exactly, with no failover. The price is that of the dearest source that may serve. An id that does not serve this endpoint is rejected as invalid input with no charge; a listed source that is not serving right now is refused with no charge, so omit `source` to be served by another. On a paginated walk, later pages must include the source that served page one, or omit `source`.",
          "items": {
            "minLength": 1,
            "type": "string"
          },
          "type": "array",
          "uniqueItems": true
        }
      },
      "required": [
        "query"
      ],
      "title": "Douyin video search input",
      "type": "object",
      "x-anyapi-compat-values": {
        "sort": {
          "0": "relevance",
          "1": "most-liked",
          "2": "date-posted"
        }
      },
      "description": "Search public Douyin videos by keyword with sorting, time, duration, and content filters."
    }
  },
  "required": [
    "path",
    "query",
    "headers",
    "body"
  ]
}
```

## Response fields
Source: Inferred from examples; not an exhaustive provider schema.
```json
{
  "type": "object",
  "properties": {
    "output": {
      "type": "object",
      "properties": {
        "data": {
          "type": "object",
          "properties": {
            "backtrace": {
              "type": "string"
            },
            "hasMore": {
              "type": "boolean"
            },
            "nextCursor": {
              "type": "string"
            },
            "searchId": {
              "type": "string"
            },
            "videos": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "authorImage": {
                    "type": "string"
                  },
                  "authorNickname": {
                    "type": "string"
                  },
                  "authorUniqueId": {
                    "type": "string"
                  },
                  "authorUserId": {
                    "type": "string"
                  },
                  "authorVerified": {
                    "type": "boolean"
                  },
                  "caption": {
                    "type": "string"
                  },
                  "comments": {
                    "type": "integer"
                  },
                  "createdUtc": {
                    "type": "integer"
                  },
                  "durationMs": {
                    "type": "integer"
                  },
                  "height": {
                    "type": "integer"
                  },
                  "id": {
                    "type": "string"
                  },
                  "image": {
                    "type": "string"
                  },
                  "likes": {
                    "type": "integer"
                  },
                  "region": {
                    "type": "string"
                  },
                  "saves": {
                    "type": "integer"
                  },
                  "shares": {
                    "type": "integer"
                  },
                  "url": {
                    "type": "string"
                  },
                  "videoUrl": {
                    "type": "string"
                  },
                  "views": {
                    "type": "integer"
                  },
                  "width": {
                    "type": "integer"
                  }
                }
              }
            }
          }
        },
        "found": {
          "type": "boolean"
        }
      }
    }
  }
}
```

## Request example
Scenario: Official example (output fragment; HTTP assumed)
```bash
curl \
  'https://api.openany.si/v1/agent-apis/anyapi/v1/run/douyin.search_videos' \
  -X POST \
  -H "Authorization: Bearer $OPENANY_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "duration": "0",
  "publishedWithin": 0,
  "query": "机器人",
  "sort": "relevance"
}'
```

## Response example
Example from the provider's documentation. Field values in your results will differ.
Sample response · Configured HTTP 200; actual status is unverified.
```json
{
  "output": {
    "data": {
      "backtrace": "eyJyZXFJZCI6ImV4YW1wbGUtc2VhcmNoLXRyYWNlLTEyMyJ9",
      "hasMore": true,
      "nextCursor": "20",
      "searchId": "6890123457812345678",
      "videos": [
        {
          "authorImage": "https://p3-pc.douyinpic.com/img/aweme-avatar/example_robotwatcher_avatar~c5_300x300.jpeg",
          "authorNickname": "机器人观察员",
          "authorUniqueId": "robot_watcher_cn",
          "authorUserId": "51923847610283746",
          "authorVerified": true,
          "caption": "国产人形机器人最新进展,已经能对话又能干活了 #机器人 #科技前沿",
          "comments": 8900,
          "createdUtc": 1758211200,
          "durationMs": 58000,
          "height": 1920,
          "id": "7449028193746501234",
          "image": "https://p3-pc.douyinpic.com/img/tos-cn-i-0813/example_humanoid_cover~tplv-dy-resize-origshort-autoq-75.jpeg",
          "likes": 246000,
          "region": "CN",
          "saves": 41000,
          "shares": 15200,
          "url": "https://www.douyin.com/video/7449028193746501234",
          "videoUrl": "https://v3-web.douyinvod.com/example_token_a1b2c3/video/tos/cn/tos-cn-ve-15/exampleHumanoidVideoId/?a=6383&ch=0&cr=0&dr=0&lr=all&cd=0%7C0%7C0%7C3",
          "views": 3820000,
          "width": 1080
        },
        {
          "authorImage": "https://p3-pc.douyinpic.com/img/aweme-avatar/example_geeklab_avatar~c5_300x300.jpeg",
          "authorNickname": "极客实验室",
          "authorUniqueId": "geek_lab_official",
          "authorUserId": "40381927465102938",
          "authorVerified": true,
          "caption": "机器人舞蹈大赛总决赛现场,这个转圈太丝滑了",
          "comments": 3400,
          "createdUtc": 1757952000,
          "durationMs": 73000,
          "height": 1920,
          "id": "7448611029384756123",
          "image": "https://p3-pc.douyinpic.com/img/tos-cn-i-0813/example_robotdance_cover~tplv-dy-resize-origshort-autoq-75.jpeg",
          "likes": 98000,
          "region": "CN",
          "saves": 12800,
          "shares": 6200,
          "url": "https://www.douyin.com/video/7448611029384756123",
          "videoUrl": "https://v3-web.douyinvod.com/example_token_d4e5f6/video/tos/cn/tos-cn-ve-15/exampleRobotDanceVideoId/?a=6383&ch=0&cr=0&dr=0&lr=all&cd=0%7C0%7C0%7C3",
          "views": 1560000,
          "width": 1080
        },
        {
          "authorImage": "https://p3-pc.douyinpic.com/img/aweme-avatar/example_homegadgets_avatar~c5_300x300.jpeg",
          "authorNickname": "居家好物研究所",
          "authorUniqueId": "home_gadgets_lab",
          "authorUserId": "29384756102938475",
          "authorVerified": false,
          "caption": "扫地机器人买贵的还是买便宜的?三款实测对比",
          "comments": 2700,
          "createdUtc": 1757520000,
          "durationMs": 214000,
          "height": 1920,
          "id": "7447903384756019283",
          "image": "https://p3-pc.douyinpic.com/img/tos-cn-i-0813/example_vacuumrobot_cover~tplv-dy-resize-origshort-autoq-75.jpeg",
          "likes": 61000,
          "region": "CN",
          "saves": 22000,
          "shares": 3100,
          "url": "https://www.douyin.com/video/7447903384756019283",
          "videoUrl": "https://v3-web.douyinvod.com/example_token_g7h8i9/video/tos/cn/tos-cn-ve-15/exampleVacuumRobotVideoId/?a=6383&ch=0&cr=0&dr=0&lr=all&cd=0%7C0%7C0%7C3",
          "views": 987000,
          "width": 1080
        }
      ]
    },
    "found": true
  }
}
```

## Error handling
400: Check the request fields.
401 / 403: Verify credentials and access permissions.
402: Inspect payment requirements and balance.
429: Respect returned retry guidance.
5xx: Inspect the error and usage record before retrying a paid operation.

## Common questions
### Which inputs identify this request?
Provide query in body (string). Keep identifiers and URLs in the formats documented for this implementation.

### What type does max_items use?
max_items uses the JSON type integer in query. Preserve that type; strings, numbers, booleans and arrays are not interchangeable.

### How should I structure the JSON body?
Send the body according to its root JSON schema. Do not add a second body wrapper around the documented properties, and preserve the declared types of nested values.

### How should I map the returned fields?
Use the documented response paths with their returned types. Keep null, empty collections, false and zero distinct, and retain the identifiers needed to match results to the request.

### Which API key should I use?
Use your OpenAny API key as Bearer authentication on the documented OpenAny route.

### Where can I check the current request price?
Check the pricing area for the selected API implementation. Follow its billing unit, quantity and any request-dependent rules before sending the request.

## Available implementations
- anyapi: https://openany.si/douyin/douyin-video-07cdcaca/aaa08efe-9a3a-4035-b87c-ec08099e3a44/
- anyapi: https://openany.si/douyin/douyin-video-07cdcaca/dbd67237-eaf9-490f-82ce-d1057558eab3/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/014f63b7-1d1e-464e-92a0-3dd2ef112a40/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/0520fc81-0438-4cd2-97e7-9cd519e5b181/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/0c7240e9-8b5d-4d1b-a0a5-981eeca295a6/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/0d999649-06b4-42c2-bc55-d6f8cb3e9c39/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/14ef4441-c93e-4dde-8ead-b22b77db0ecc/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/1aad7fba-50b6-49db-9c15-924a78924fee/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/1b02f649-8b8e-4e38-b256-a84979b3a420/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/1f1f2f9e-0c4d-4c14-a722-dd52f4bd058c/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/200a0248-5e34-4d1d-8d30-699165888d5f/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/28457232-7ebb-4c8b-ab92-4f207ba38d32/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/2a48255e-1992-4f82-81e7-26bd8aada66e/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/333c8216-f429-4ba6-af5a-0bbaef0ea4a9/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/3c10ac62-6fae-463b-9009-2b512a5d35d8/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/42f5f269-73cd-4b5f-be06-5f1f672d490a/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/471714ec-ee3d-4038-8915-c11c3fcda83f/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/583ae39c-2873-4dca-963c-19c12e9fae32/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/5c399301-5a6f-4e53-8382-e557643a7ad6/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/6d4e3251-0c03-4afb-b7ae-71f6c2c1c73f/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/7816cd6d-ff6a-463a-8a18-dd37eb1dcf4e/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/787e487f-fc56-4922-b2a0-b3bebf6af149/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/7e36b556-cc8f-464b-8769-438b28d9010f/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/83c02d9f-9d81-410a-b9a0-dd27b56c5c8f/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/877a24ec-67b6-4769-926f-e72a5197902b/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/912d9143-6d32-4ddc-813c-34b8121b558c/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/9d59e439-5b89-4ac3-bc62-b4ddfbae27e4/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/a6f003ab-0f05-4b08-9a99-420dc40d7bfd/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/aac917f5-9a82-4cf6-8966-0591993fe425/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/ae106a78-e1d5-422d-845e-14d7946c46f9/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/b4ac1061-6297-47f9-ae03-1ba3d6130804/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/b614b77d-845b-41f0-a7f1-a73ca34f7511/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/b792397f-6472-49bd-9abe-1a14257c308f/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/b877990c-e8cf-4d6a-ba6a-4fcf5d1fb0fe/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/b9fa20eb-f1e5-444b-8386-eeed61e102c4/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/be7547ea-1d03-4fdc-90e3-6a482b532864/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/c74a81c5-b8f8-4ac5-a110-85495f5727c0/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/cfdc9d5b-487e-4594-8884-0cc2e56978f5/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/d9645424-6e69-4001-aca7-8871112ebf22/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/db3120b9-a178-483c-939f-86ba13e11794/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/ddc247eb-2991-422f-a094-067114a58888/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/e8f1f236-aa9e-4b7c-b0bb-97df1a549552/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/ed04b67f-2459-4420-ac4f-27c270bde3f8/
- tikhub: https://openany.si/douyin/douyin-video-07cdcaca/f9b0badc-6c26-4d50-8c84-fe1505e2f53f/

Integration guide: https://openany.si/docs/
Agent setup: https://openany.si/SKILL.md
