# Wikipedia API：条目、搜索与分类 | Anysite

> 7 个接口覆盖条目、全文搜索、分类、链接和多语言数据：干净 JSON，不用处理 continuation token，也不用解析 HTML。7 天免费试用。

URL: https://anysite.io/zh/sources/wikipedia/
Canonical: https://anysite.io/zh/sources/wikipedia/
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.

---

// 数据源 · 商业数据

# Wikipedia API 智能体引用的参考层

条目、全文搜索、分类、链接和多语言数据，统一返回干净 JSON：一次调用拿到整篇条目和它的章节树，不用再钻原始 MediaWiki 的迷宫。智能体有了可引用的参考层，就不用靠猜。

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

## Wikipedia 能拉到什么

/api/wikipedia/articles 完整条目元数据：标题、描述、摘要、Wikidata ID、配图、分类、langlinks、上一次修订和规范链接

/api/wikipedia/articles/categories 条目所属的分类：分类名、隐藏标记和规范网页链接

/api/wikipedia/articles/content 条目的完整纯文本，外加章节索引（层级、标题、字节偏移），方便结构化导航

/api/wikipedia/articles/langlinks 跨语言链接：每个关联的 Wikipedia 语言版本对应的语言代码和本地化标题

/api/wikipedia/articles/links 条目内部链接：每条外链的标题和规范链接

/api/wikipedia/articles/search 全文搜索结果：按相关度排序的条目，带摘录、字数、体积和更新时间戳

/api/wikipedia/categories/members 某个分类下的页面和子分类：标题、类型、加入日期和规范链接

## 返回什么

```
{
  "title": "Python (programming language)",
  "description": "General-purpose programming language",
  "wikidata_id": "Q28865",
  "summary": "Python is a high-level, general-purpose programming…",
  "categories": ["Programming languages", "Cross-platform software"],
  "langlinks": 168,
  "last_revision": "2026-07-19T08:41:02Z",
  "url": "https://en.wikipedia.org/wiki/Python_(programming_language)"
}
```

## 适合这些活儿

[智能体产品](https://anysite.io/zh/use-cases/agentic-products/) [科研与文献](https://anysite.io/zh/use-cases/science-research/) [市场调研](https://anysite.io/zh/use-cases/market-research/)

## 给智能体一层参考资料

条目、分类和链接图谱，都做成带类型的接口。这里有 7 个接口，同一把 key 通 900+ 个数据源。

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

## 常见问题

条目标识可以传什么？

标题（比如「Albert Einstein」）、数字 page ID，或完整的 Wikipedia 链接，三种写法在任何条目接口上都指向同一篇条目。

能拉其他语言的条目吗？

可以。凡是接受条目或分类的接口，都能传 language 参数，值是两位语言代码，比如「de」「fr」「ja」，默认是「en」。langlinks 接口会把一篇条目映射到各个关联语言版本里的对应条目。

内容有多新？

条目是在提问那一刻实时拉的，每条记录都带上一次修订的时间戳，搜索结果里每篇条目也带更新时间戳，你随时清楚自己引用的是哪个版本。