What you get#
Onekey exposes Wikipedia as 22 endpoints behind one API key: 5 endpoints return one record (data is an object) and 17 endpoints return a list (data is an array). Every answer uses the same envelope (success, data, metadata, error), the cost is reported in metadata.credits_charged, and fields are mapped onto the unified schema so the code you write for Wikipedia also works for the rest of the knowledge & reference category.
Endpoints#
| Endpoint | What it does | Parameters | Credits | Status |
|---|---|---|---|---|
article | Wikipedia article summary (English). | title* | 1 | stable |
categories | Categories a Wikipedia page belongs to (first 50). | title* | 5 | stable |
category_members | Pages in a Wikipedia category (first 50). | category* | 5 | stable |
extract | Plain-text intro extract of a Wikipedia article (follows redirects). | title* | 1 | stable |
featured | Wikipedia featured article of the day (today's featured article for a date). | year*, month*, day* | 1 | stable |
intro_html | HTML intro of a Wikipedia article plus its plain-text form. | title* | 1 | stable |
langlinks | Equivalent article titles in other languages. | title* | 5 | stable |
links | Outgoing article links of a Wikipedia page (first 50). | title* | 5 | stable |
media_list | Media files used on a Wikipedia page. | title* | 5 | stable |
most_read | Most-read Wikipedia articles for a day (Wikimedia pageviews top). | year*, month*, day* | 5 | stable |
nearby | Wikipedia articles near a latitude/longitude (10 km). | lat*, lon* | 5 | stable |
on_this_day | Wikipedia 'On this day' historical events for a month/day. | month*, day* | 5 | stable |
on_this_day_births | Wikipedia 'On this day' births for a month/day. | month*, day* | 5 | stable |
on_this_day_deaths | Wikipedia 'On this day' deaths for a month/day. | month*, day* | 5 | stable |
on_this_day_holidays | Wikipedia 'On this day' holidays for a month/day. | month*, day* | 5 | stable |
pageviews | Daily pageviews for one Wikipedia article between two dates (YYYYMMDD). | title*, start*, end* | 5 | stable |
pageviews_aggregate | Daily aggregate English Wikipedia pageviews between two dates (YYYYMMDD). | start*, end* | 5 | stable |
random | A random Wikipedia article summary. | - | 1 | stable |
related | Articles related to a Wikipedia article (morelike search). | title* | 5 | stable |
revisions | Ten most recent revisions of a Wikipedia page. | title* | 5 | stable |
search | Search Wikipedia articles (English). | q* | 5 | stable |
suggest | Title autocomplete suggestions for a search prefix. | q* | 5 | stable |
A * marks a required parameter. Each endpoint name links to its reference page with the full parameter table, caching window and a recorded response.
Make a request#
This calls wikipedia.article (1 credit, stable). Replace YOUR_API_KEY with your key; sign up, no card. 1,000 free credits cover the open-platform endpoints. Hard-to-reach platforms (X, TikTok, Instagram, Reddit, and others marked on their page) need a verified email and a purchased pack.
curl "https://api.onekey.dev/v1/wikipedia/article?title=Alan%20Turing" \
-H "x-api-key: YOUR_API_KEY"Fields you get back#
These unified fields come back from Wikipedia, with the same names as on every other platform. The count is how many of its 22 mapped endpoints return the field; a field the source lacks is null, never missing. 8 platform-specific fields (ext.<name>) come on top, documented on each endpoint page.
| Field | Type | Endpoints |
|---|---|---|
content.title | string | 20 |
content.text | string | 13 |
content.id | string | 11 |
content.url | URL | 7 |
content.year | integer | 4 |
content.updatedAt | ISO 8601 date | 3 |
engagement.views | integer | 3 |
media.thumbnailUrl | URL | 3 |
author.username | string | 1 |
content.createdAt | ISO 8601 date | 1 |
content.language | string | 1 |
content.type | string | 1 |
place.lat | number | 1 |
place.lon | number | 1 |
The full schema is in Unified schema.
Pricing#
Wikipedia calls cost 1 to 5 credits, flat per endpoint. Free when served from cache (0.2 credit for a cached response over 100 KB). Invalid, failed or not-found calls are not charged. See pricing for credit packs.