Wikipedia scraper and API skills
Site: wikipedia.org
Wikipedia's MediaWiki APIs are open and well documented, and these skills use them — while routing around the parts that have been decommissioned and the current-events pages that were never in the API at all.
Working with Wikipedia
- The mobile-sections REST endpoint is decommissioned and returns 403; section trees are read from the endpoints that still exist.
- Current-events portal subpages use a non-zero-padded day of month, which is the single most common reason a date-built URL 404s.
2 Wikipedia skills
- wikipedia.orgv1
Wikipedia Trending World News
Return today's trending world news from Wikipedia — curated ITN headlines from the Main Page plus today's Current Events portal subpage bucketed by category (Business, Disasters, Politics, etc.). Read-only; uses the public MediaWiki API with no auth or anti-bot stealth.
- wikipedia.orgv1
Wikipedia Get Article
Given a Wikipedia article reference (URL, lang+title, or free-form name), return structured content: canonical URL, title, language, lead summary, full section tree, infobox key/value pairs, thumbnail, image list, outbound article links, external links with section attribution, categories, last-revised timestamp, pageid, and revid. Handles redirects, disambiguation pages, and non-English editions.
Wikipedia scraping questions
- Does Wikipedia have an API?
- Yes — the MediaWiki Action and REST APIs are open and need no key. Some endpoints have been decommissioned, and the current-events portal is not exposed as structured data.
- Is scraping Wikipedia legal?
- Reading data that Wikipedia publishes publicly is generally treated as lawful in the US — hiQ v. LinkedIn found that scraping a public site does not by itself violate the Computer Fraud and Abuse Act. That is not the whole question: Wikipedia's terms of service, its robots.txt, the rate at which you request pages, and any personal or copyrighted data you collect all carry their own obligations, and the rules differ outside the US. These skills read public pages at human-scale rates and never bypass a login. Treat this as background, not legal advice.
- What data can I extract from Wikipedia?
- Page ID, revision, title, canonical URL and lead extract; plus current-events headlines bucketed by category with their source dates.