POST /v1/similar · 1 search

Find pages like this one

Send a page title, or a passage_id from a search result. Get back the pages most like it by meaning, each with its closest paragraph. Good for "read next" lists, related topics, and widening a search an AI started.

Request

curl https://wikivectors.com/v1/similar \
  -H "Authorization: Bearer $WIKIVECTORS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Ada Lovelace", "limit": 5}'

Reply (shortened)

{
  "source": { "page_id": 974, "title": "Ada Lovelace", "url": "…" },
  "results": [
    { "title": "BCS Lovelace Medal", "score": 0.898, … },
    { "title": "Earl of Lovelace", "score": 0.896, … },
    { "title": "Women in science", "score": 0.887, … },
    { "title": "Lord Byron", "score": 0.879, … },
    { "title": "Charles Babbage", "score": 0.872,
      "text": "Charles Babbage (26 December 1791 – 18 October 1871) was an English polymath…",
      "passage_id": 48812345, "url": "…", "attribution": "…" }
  ]
}

What you send

FieldTypeWhat it is
titlestringA page title. Case is ignored, _ is a space, redirects are followed.
passage_idintegerOr a passage_id from /v1/search, to find pages like that one paragraph. Send title or passage_id, not both.
limitinteger1 to 20 pages. Default 5.

What you get back

source is the page you asked about (with redirected_from if your title was a redirect). results has one paragraph per page: the one closest in meaning, closest page first. Each has the same fields as a search result. score is how alike they are, from 0 to 1.

How it works

We compare stored meanings (vectors), so no AI model runs and it is fast. A page's meaning is the average of its first 3 paragraphs, which say what it is about. The page itself and lists of namesakes are left out.

If it fails

404 not_found: no page has that title, or no paragraph has that passage_id (they change when a page is edited, so take a fresh one). 409 no_vector_yet: we hold the page but haven't worked out its meaning yet. Try later, or search for its title.

Cost

Each call counts as one search.