GET /v1/pages/{title}/facts · 1 search

Get a page's facts

Many Wikipedia pages have a fact box at the top right: when a person was born, where they studied, their job; a company's founders; a city's population. This call gives you that box as clean data, cited to the exact revision.

Request

curl https://wikivectors.com/v1/pages/Sam_Altman/facts \
  -H "Authorization: Bearer $WIKIVECTORS_KEY"

Reply (shortened)

{
  "query": "Sam_Altman", "found": true,
  "title": "Sam Altman", "status": "ok",
  "infobox": {
    "type": "biography", "name": "Sam Altman",
    "facts": [
      { "label": "Born",
        "value": "Samuel Harris Altman; April 22, 1985 (age 41); Chicago, Illinois, U.S.",
        "items": ["Samuel Harris Altman", "April 22, 1985 (age 41)", "Chicago, Illinois, U.S."],
        "links": [{ "text": "Chicago", "title": "Chicago" }],
        "date": "1985-04-22" },
      { "label": "Title",
        "items": ["CEO of OpenAI", "Chairman of Helion Energy", …], … },
      …
    ]
  },
  "permalink": "https://en.wikipedia.org/w/index.php?oldid=…",
  "license": "CC BY-SA 4.0", "attribution": "…"
}

What you send

The exact page title in the path. Spaces can be _ or %20. Case is ignored and redirects are followed, like Pages by title. A title with a slash works as is (/v1/pages/AC/DC/facts).

What you get back

The page fields (page_id, title, redirected_from, description, wikidata_id, url, permalink, revision_id, license, attribution) plus status and infobox.

FieldWhat it is
statusok: the box is in infobox. none: the page has no fact box (infobox is null). pending: see below.
infobox.typeThe kind of box: biography, company, settlement, film… Left out when the box doesn't say.
infobox.facts[]One row of the box: label, value (the text as shown), items (the value split into lines, when there are 2 or more), links (Wikipedia pages it links to), section (the header above it, like "Government") and date (a machine date like 1985-04-22, when Wikipedia marks one).

Facts are Wikipedia's words as written. We never change them. revision_id and permalink point to the revision the box was read from.

Pending

We read each page's box as our hourly updater fetches the page. If we haven't read this one yet, the call waits up to about 25 seconds while we fetch it. If it still isn't ready you get 202 with status: "pending" and a Retry-After header. Try again then.

Cost

Each call counts as one search. A title with no page gives 404 page_not_found.