通过官方 MediaWiki API 按标题、URL 或 Wikidata ID 提取维基百科文章。返回文章标题、摘要(首段)、纯文本全文、缩略图、首图、所有类目、地理坐标(适用时)、Wikidata Q-ID、过去 30 天页面浏览量,以及其他语言的引用。支持 12+ 语言,包括英语、德语、法语、西班牙语、中文和日语。适用于 AI 训练数据、知识图谱富化、RAG 数据摄入和参考数据库。
# 通过 Apify API 启动运行 curl -X POST "https://api.apify.com/v2/acts/santamaria-automations~wikipedia-scraper/runs?token=YOUR_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "queries": [ "Stripe (公司)", "OpenAI", "埃菲尔铁塔", "阿尔伯特·爱因斯坦", "Transformer (机器学习模型)" ], "language": "zh", "extractFullContent": true, "includePageviews": true }' # 或通过 MCP 与 AI 代理配合使用: # https://mcp.apify.com?tools=santamaria-automations/wikipedia-scraper
| 字段 | 类型 | 示例 |
|---|---|---|
| title | string | 埃菲尔铁塔 |
| page_id | integer | 9202 |
| wikidata_id | string | Q243 |
| summary | string | 埃菲尔铁塔是一座位于法国巴黎的镂空结构铁塔... |
| content | string | 埃菲尔铁塔(法语:La Tour Eiffel)... |
| thumbnail_url | string | https://upload.wikimedia.org/wikipedia/commons/... |
| categories | array | ["埃菲尔铁塔","巴黎建筑"] |
| coordinates | object | {"lat":48.8584,"lon":2.2945} |
| pageviews_30d | integer | 512,847 |
| canonical_url | string | https://zh.wikipedia.org/wiki/埃菲尔铁塔 |