Setup
Put them in your environment or
.env; Data APIs covers the other ways.
Notes
- Keyless, but Wikimedia requires an informative User-Agent with contact information; set WIKIPEDIA_USER_AGENT.
- No fixed read limit: send requests one at a time, batch titles with | where a call accepts several, and back off on a ratelimited error.
- Action API calls (/w/api.php) need action and format=json; the REST calls (/w/rest.php/v1) answer JSON already.
Endpoints
Search articles
Get article text extracts
Search pages (REST)
Autocomplete page titles
Get page source
Get page HTML
- Returns text/html, not JSON.