wikipedia.org: official API and open-data routes
Symptom: 403 'Please set a user-agent and respect our robot policy' (verified 2026-10-27 with a stock python-requests User-Agent)
What agents usually want: article text and facts
Wikimedia REST API
- Documentation: https://en.wikipedia.org/api/rest_v1/
- Authentication: No key; send a descriptive User-Agent with contact information
- Policy: https://foundation.wikimedia.org/wiki/Policy:Wikimedia_Foundation_User-Agent_Policy
- Last check: ok, 2026-10-27
MediaWiki Action API
- Documentation: https://www.mediawiki.org/wiki/API:Main_page
- Authentication: No key; same User-Agent policy
- Last check: ok, 2026-10-27
Wikidata Query Service (SPARQL)
- Documentation: https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service
- Authentication: No key; can be slow (11 s for a trivial query on 2026-10-27)
- Last check: ok, 2026-10-27