Wikipedia Search API

Wikipedia articles that match your search words, in any language edition, best match first: page id, page key, title, short description, the matching excerpt as plain text, thumbnail image and a link to the article.

$0.50 per 1,000 records

You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.

Try it
Ready-made, maintained by usArticles, 9 fieldsv1.0

Data from mediawiki.org/wiki/API:REST_API/Reference

Get this data

Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.

Try it

Search
Search words, as you would type them in Wikipedia's search box, such as solid state battery.
Example: solid state battery
Languageoptional
Code of the Wikipedia language edition to search, such as en (English), de (German), fr, es, ja or simple (Simple English). Default en.
Example: en

Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key

For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
Endpoint
POSThttps://pullrow.dev/v1/apis/wikipedia-search/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
curl -X POST "https://pullrow.dev/v1/apis/wikipedia-search/run" \
  -H "Authorization: Bearer $PULLROW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"search":"solid state battery"},"max_items":50}'

Inputs

Send them as input in the request body. Leave one out to use its default.

searchtextrequired
Search words, as you would type them in Wikipedia's search box, such as solid state battery.
example: solid state battery
languagetext
Code of the Wikipedia language edition to search, such as en (English), de (German), fr, es, ja or simple (Simple English). Default en.
default: enexample: en

What's in each record

9 fields: 8 here, 1 technical one under Technical details.

Basics

  • Key

    The article's page key as used in links, with underscores for spaces, such as Solid-state_battery.

    Example Solid-state_battery

  • Title

    Title of the article.

    Example Solid-state battery

  • Description

    Short description of the article's subject, such as Battery with solid electrodes and a solid electrolyte.

    Example Battery with solid electrodes and a solid electrolyte

  • Excerpt

    Snippet of the article around the matching words, in plain text.

    Example A solid-state battery (SSB) is an electrical battery that uses a solid electrolyte to conduct ions between the…

  • Rank

    Position in the search results, 1 for the best match.

    Example 1

  • Language

    Code of the language edition searched, such as en.

    Example en

Pictures and media

  • Thumbnail

    Small thumbnail of the article's lead image.

    Example Open the image

Technical detailsField names and types for developers, and the 1 field hidden above

Hidden by default

This field comes with each record too. It is an internal code, a note about how the record was read or a copy of what was searched for, so the lists above leave it out.

  • ID idWikipedia's page id of the article in that language edition.

Field names and types

The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.

Field nameTypeShown on this page asFilled
idtextID (hidden)3 of 3
keytextKey3 of 3
titletextTitle3 of 3
descriptiontextDescription3 of 3
excerpttextExcerpt3 of 3
thumbnail_urlimage linkThumbnail1 of 3
urllinkLink3 of 3
ranknumberRank3 of 3
languagetextLanguage3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordTitleKeyDescriptionExcerptRankLanguageLinkThumbnail
1Solid-state batterySolid-state_batteryBattery with solid electrodes and a solid electrolyteA solid-state battery (SSB) is an electrical battery that uses a solid electrolyte to conduct ions between the electrodes, instead of the liquid or gel1enen.wikipedia.org/wiki/Solid-state_batterythumb.wikimedia.org/wikipedia/commons/thumb/c/c4/All-Solid-State_Battery.png/60px-All-Solid-State_Battery.png?utm_source=en.wikipedia.org&utm_campaign=rest&utm_content=thumbnail
2Semi-solid-state batterySemi-solid-state_batteryType of rechargeable batteryA semi-solid-state battery (also formally known as a quasi-solid-state battery, QSSB) is a type of rechargeable battery that serves as an intermediate2enen.wikipedia.org/wiki/Semi-solid-state_battery—
3Solid-state silicon batterySolid-state_silicon_batteryAlternative battery typeA solid-state silicon battery or silicon-anode all-solid-state battery is a type of rechargeable lithium-ion battery consisting of a solid electrolyte3enen.wikipedia.org/wiki/Solid-state_silicon_battery—

Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.

Reliability

Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.

Incidents and repairs

How it is kept working What a repair can't do

A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.

  • You pay only for records returned. A run that returns none costs nothing.
Known limits
  • Up to 100 articles per search, best match first. Wikipedia's search has no further pages, so a run never returns more than 100.
  • One language edition per run, named by its code (en, de, fr, ja, simple and so on). An unknown code cannot be reached and ends the run without records.
  • Searches article pages only. The excerpt is a short snippet around the match, not the article text.
  • Thumbnails are small (about 60 pixels wide) and missing for articles without a lead image; the short description is missing for some articles.
  • Text comes from Wikipedia under the CC BY-SA 4.0 license: credit Wikipedia and link the article when you publish it.

Version history

A run uses the live version unless the request names another one with version.