Skip to the content

Scraper API

Wikipedia

wikipedia.searchAvailable

Wikipedia search

The articles Wikipedia's own search finds: title, address, the passage that matched, size, when each was last edited, and how many articles match in all.

Give it Words to search for, and a language.

1 unit a run, for runs that return data. Runs that fail cost nothing. How units work

Counted
1 unit a run
Inputs
4, 1 required
Record
11 fields
A run takes
up to 5 minutes
Records kept
7 days
Measured
its success, on the status page

POST/v1/scrapers/wikipedia.search/runs

{
"input": {
"query": "espresso machine"
}
}

sent, and answered

a record of the run11 fields

{
position: 1
page_id: 321546
title: "Espresso machine"
url: "https://en.wikipedia.org/wiki/Espresso_machine"
language: "en"
snippet: "An espresso machine is a device that brews coffee by rapidly forcing h…
word_count: 1981
length_bytes: 16740
last_edited_at: "2026-05-22T13:07:26Z"
… 2 more fields

ok1 unit a run

A record this scraper returned for this input. The first 9 of its 11 fields are set down here; the whole record is below.

en.wikipedia.org
The page Wikipedia search reads, as a browser shows it
The page this scraper reads, photographed in a browser on 19 November 2026. It belongs to its publisher, who has no part in this service.

What it is used for

Find the article for a name
Search Wikipedia in a language and get the matching articles with a snippet, so a name in your data can be matched to the right one.
Collect articles on a subject
Page through the results with offset to list every article that mentions a term, with its word count and when it was last edited.
Gauge how covered a topic is
total_results and word_count say how much Wikipedia holds on a subject, in each language you search.

What you send

Words to search for, and a language. These are its 4 inputs, as its schema has them.

querystring Required
What to search for, e.g. espresso machine. Wikipedia's own search syntax works (intitle:, quotes).
languagestring Optional
The language edition to search, as Wikipedia's code for it: en, de, ja, simple.Default en
max_resultsinteger Optional
How many results to return, at most 50.Default 10
offsetinteger Optional
How many results to skip first: 0 for the first results, 50 for the ones after the first fifty.Default 0

A request, ready to send

It starts a run with the input shown at the top of this page, waits up to 60 seconds for it, and reads its records. Put your key in the variable it reads.

# Start a run and wait up to 60 seconds for it to finish
curl -X POST "https://api.enrichednow.com/v1/scrapers/wikipedia.search/runs?wait=60" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"espresso machine"}}'

# Read its records, with the id the first call answered
curl "https://api.enrichednow.com/v1/runs/$RUN_ID/records?limit=100" \
  -H "Authorization: Bearer $ENRICHEDNOW_API_KEY"
from enrichednow import EnrichedNow

client = EnrichedNow()  # reads ENRICHEDNOW_API_KEY

# Start a run, wait for it to end, and get its records
result = client.scrape("wikipedia.search", {"query": "espresso machine"})
print(result.run.id, result.run.status, result.run.record_count)

# Read its records: pages are fetched as you go
for record in result.records:
    print(record)

Install it with pip install enrichednow, then save as run.py and run python3 run.py

import EnrichedNow from "enrichednow";

const client = new EnrichedNow(); // reads ENRICHEDNOW_API_KEY

// Start a run, wait for it to end, and get its records
const { run, records } = await client.scrape("wikipedia.search", { query: "espresso machine" });
console.log(run.id, run.status, run.record_count);

// Read its records: pages are fetched as you go
for await (const record of records) console.log(record);

Install it with npm install enrichednow, then save as run.mjs and run node run.mjs

package main

import (
	"context"
	"fmt"
	"log"
	"time"

	enrichednow "github.com/enrichednow/enrichednow-go"
)

func main() {
	client, err := enrichednow.NewClient() // reads ENRICHEDNOW_API_KEY
	if err != nil {
		log.Fatal(err)
	}
	ctx, cancel := context.WithTimeout(context.Background(), 10*time.Minute)
	defer cancel()

	// Start a run, wait for it to end, and get its records
	run, records, err := client.Scrape(ctx, "wikipedia.search", map[string]any{"query": "espresso machine"})
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(run.ID, run.Status, run.RecordCount)

	// Read its records: pages are fetched as you go
	for records.Next() {
		fmt.Println(string(records.Current()))
	}
	if err := records.Err(); err != nil {
		log.Fatal(err)
	}
}

Install it with go get github.com/enrichednow/enrichednow-go@latest, then save as run.go and run go run run.go

import com.enrichednow.EnrichedNowClient;
import com.enrichednow.ScrapeResult;
import java.util.Map;

public class Run {
    public static void main(String[] args) {
        EnrichedNowClient client = EnrichedNowClient.fromEnv(); // reads ENRICHEDNOW_API_KEY

        // Start a run, wait for it to end, and get its records
        ScrapeResult result = client.scrape("wikipedia.search", Map.of("query", "espresso machine"));
        System.out.println(result.run().id() + " " + result.run().status() + " " + result.run().recordCount());

        // Read its records: pages are fetched as you go
        for (Map<String, Object> record : result.records()) {
            System.out.println(record);
        }
    }
}

Add com.enrichednow:enrichednow-java:0.4.0 to your Maven or Gradle build, then save as Run.java

enrichednow run wikipedia.search --input 'query=espresso machine'

Install it with curl -fsSL https://raw.githubusercontent.com/enrichednow/enrichednow-cli/main/install.sh | sh

What comes back

The articles Wikipedia's own search finds: title, address, the passage that matched, size, when each was last edited, and how many articles match in all. A record has 11 fields. One we could not read is null, never an empty string or a zero.

A record wikipedia.search returned
{
  "position": 1,
  "page_id": 321546,
  "title": "Espresso machine",
  "url": "https://en.wikipedia.org/wiki/Espresso_machine",
  "language": "en",
  "snippet": "An espresso machine is a device that brews coffee by rapidly forcing heated, pressurized water through a small, compressed cake (commonly called a puck)",
  "word_count": 1981,
  "length_bytes": 16740,
  "last_edited_at": "2026-05-22T13:07:26Z",
  "total_results": 1153,
  "fetched_at": "2026-11-19T18:07:42.680595Z"
}

The scraper returned this record for the input above, reading a saved copy of the page, not the live site.

The fields of a record

positioninteger
The result's place among all results of the search, from 1.
page_idinteger
Wikipedia's id of the article in this language edition.
titlestring
The article's title.
urlstring
The article's address.
languagestring
The language edition that was searched, e.g. en.
snippetstring or null
The passage of the article that matched the search, as plain text.
word_countinteger or null
The number of words in the article.
length_bytesinteger or null
The size of the article's source in bytes.
last_edited_atdatetime or null
When the article was last edited, in UTC.
total_resultsinteger or null
How many articles Wikipedia says match the search, the same on every record of a run.
fetched_atdatetime
When the results were read, in UTC.

The whole schema, in its reference

Units and limits

Counted per request
Billed per request: a run that returns data costs 1 unit, however many records it returns.
A miss costs nothing
A run that fails, that meets something not supported yet, or that you cancel costs nothing. You pay for runs that return data.
What bounds a run
A run may take up to 5 minutes. Its records are read in pages of up to 1,000 and are kept for 7 days.

What it does not do

  • One run returns up to 50 results. Use offset for the ones after them.
  • The results are articles. To read one, give its title to the Wikipedia article scraper.

The bounds its schema sets

max_results
1 to 50; 10 unless you say otherwise
offset
0 to 9,950; 0 unless you say otherwise

Scraper API pricing: how units workThe five ways a run ends

Questions

What does Wikipedia search return?

The articles Wikipedia's own search finds: title, address, the passage that matched, size, when each was last edited, and how many articles match in all. A record has 11 fields, among them position, page_id, title, url, language and snippet. A value that could not be read is null, never an empty string or a zero.

What do I send?

Words to search for, and a language. The input query is required. Optional: language, max_results and offset.

How is it counted?

Billed per request: a run that returns data costs 1 unit, however many records it returns. A run that fails, that meets something not supported yet, or that you cancel costs nothing. The first 1,000 units each month are free.

How much does one run return?

Its schema sets these bounds: max_results 1 to 50 (10 unless you say otherwise); offset 0 to 9,950 (0 unless you say otherwise). A run may take up to 5 minutes.

What does it not do?

One run returns up to 50 results. Use offset for the ones after them. The results are articles. To read one, give its title to the Wikipedia article scraper.

How long are the records kept, and in what format do they come?

Records are kept for 7 days after the run ended, and read in pages of up to 1,000. They come as JSON, as NDJSON with one record a line, or as CSV with a column for each field.

Can an AI assistant call it?

Yes. Through the EnrichedNow MCP server an assistant calls the tool run_scraper with the scraper_id wikipedia.search and the same input. It costs what the same API call costs.

Wikipedia

Wikipedia's articles and its search, in any of its languages.

  • Wikipedia article

    wikipedia.page

    An article's title and a language, or the article's address. The article: its text as a whole and by section, its one-line description, categories, lead image, coordinates, Wikidata id and when it was last edited.

Wikipedia on the line-up

Where
Worldwide

Run it on an input of your own.

Create an account, make a key, and send the request above with your own input. The first 1,000 units each month are free.