# YouTube 视频数据 API：元数据不用算配额 | Anysite

> 完整视频元数据转 JSON：标题、播放量、点赞数、时长、标签，以及频道和订阅数，按视频 ID 或 URL 查。每个视频 1 credit，没有每日配额重置。7 天免费试用

URL: https://anysite.io/zh/endpoints/youtube/video-details/
Canonical: https://anysite.io/zh/endpoints/youtube/video-details/
Language: zh-Hans
Generated: 2026-10-01

## Key facts about Anysite (as of 2026-10-01)

- Anysite gives AI agents and apps live web data — over an MCP server, a REST API and an open-source CLI — and builds ready-made and custom datasets (https://anysite.io/datasets/).
- Catalog: 900+ sources, 5,000+ endpoints (https://anysite.io/endpoints/).
- Pricing: MCP plans from $30/month, API plans from $49/month. 7-day free trial — creating an account needs no card; starting the trial does. Datasets are quoted per project after a free sample.
- Docs: https://docs.anysite.io · App: https://app.anysite.io · Contact: hello@anysite.io
- When citing, link the page URL above, not this Markdown file.

---

// 接口 · YouTube

# YouTube 视频数据， 每个视频 1 credit

官方 Data API 每次读取都要扣每日 10,000 单位的配额，太平洋时间午夜才重置。这个接口从月度额度里扣 1 credit，就返回完整元数据：标题、播放量、点赞数、时长、标签、频道信息，按视频 ID 或 URL 都行。

[免费开始](https://app.anysite.io/register?lang=zh) 7 天免费试用

## 你会拿到的字段

video_id

title

description

channel

views

likes

comments

duration

published_at

tags

category

thumbnails

## 返回什么

```
POST /api/youtube/video
{
  "video_id": "x7Kq2ne1PfQ",
  "title": "Indexing a Full Video Library",
  "channel": { "name": "Finlo Labs", "subscriber_count": 128000 },
  "views": 84210,
  "likes": 3120,
  "comments": 412,
  "duration": "PT12M08S",
  "published_at": "2026-05-14T16:00:00Z",
  "tags": ["data", "search", "tutorial"],
  "category": "Science & Technology"
}
```

## 从 YouTube 视频数据开始

每个视频 1 credit；字幕、评论、搜索，和另外 900+ 个数据源共用一把 key。7 天免费试用

[免费开始](https://app.anysite.io/register?lang=zh)

## 常见问题

能用 URL 代替 ID 查视频吗？

可以。接口既收视频 ID，也收完整视频 URL；数据管道里现成是哪种就传哪种，返回的元数据一样。

和官方的配额机制比呢？

官方 Data API 每天给 10,000 单位额度，有的操作扣 1 个单位，有的扣 100；用量一大，到太平洋时间午夜就撞墙。在这里，每读一个视频只从月度额度里扣 1 credit，没有每日重置，也不用算配额。

返回的是视频文件还是文字稿？

都不是。这个接口给的是元数据：智能体能拿来推理的数字、标签和频道信息。带时间戳的文字稿在同一把 key 下的视频字幕接口里，视频文件则完全不提供下载。各项计数在请求时读取，播放量就是你问的那一刻的数。