Wikipedia article search

Wikipedia Search API for articles

Search Wikipedia over HTTP and receive an extract of the article body with each result, giving a model a stable definition to ground an answer on.

Endpoint
POST https://api.search1api.com/search
What a Wikipedia result contains

Results arrive in the same JSON shape as every other engine, so existing parsing continues to work.

1
Article title

The canonical article title, such as Transformer (deep learning).

2
Article link

The link points at the article on wikipedia.org.

3
Article extract

The snippet is text from the article rather than a description of it.

Useful for

Grounding / Definitions / Entity lookup

A stable definition to ground an answer

Set `search_service` to `wikipedia` and the results come from Wikipedia articles. The endpoint, the authentication, and the response shape are the same as every other engine.

Extracts rather than descriptions

The `snippet` field is text from the article body, so it can be cited directly instead of being treated as a teaser.

Canonical titles for entity resolution

Article titles are disambiguated, so a query lands on a specific entity rather than an ambiguous name.

Low-drift grounding

Reference articles change far more slowly than the open web, which makes them useful as a stable anchor when other sources disagree.

Standard Search parameters

`max_results` up to 50, plus `include_sites`, `exclude_sites`, and `time_range`.

What is a Wikipedia search API?

A Wikipedia search API is an HTTP interface that returns Wikipedia articles as structured results. The Wikimedia Foundation publishes its own APIs, which are powerful but shaped around MediaWiki concepts such as page IDs, revisions, and continuation tokens, and they require their own client code. Search1API exposes Wikipedia as one of the search services on its Search endpoint, returning the article title, the article link, and an extract as the snippet, in the same JSON shape it returns for its other engines. For grounding a model, that is usually the right shape: one call, a canonical title, and enough text to anchor a definition before deciding whether to read further.

Implementation path

Typical workflow

Search Wikipedia over HTTP and receive an extract of the article body with each result, giving a model a stable definition to ground an answer on.

1

Send a query with `search_service` set to `wikipedia`.

2

Use the article title as the resolved entity and the snippet as the grounding text.

3

Set `crawl_results` when the workflow needs the full article rather than an extract.

One request, a definition you can cite

A single call searches Wikipedia and returns an extract with each result, so an answer can be grounded without a second fetch.

bash
curl -X POST https://api.search1api.com/search \
-H "Authorization: Bearer $SEARCH1API_KEY" \
-H "Content-Type: application/json" \
-d '{
"query": "transformer model",
"search_service": "wikipedia",
"max_results": 5
}'

Best for

Grounding an assistant on a definition before it reasons further.

Entity resolution that turns an ambiguous name into a canonical title.

RAG pipelines that need a stable reference layer alongside live web results.

Fact checking that compares a claim against a reference article.

FAQ

How is this different from the Wikimedia API?

Wikimedia’s APIs are built around MediaWiki concepts such as page IDs, revisions, and continuation tokens, and they need their own client code. Search1API returns JSON in the same shape as its other engines, so Wikipedia can be queried through the same code path as web search.

Can I get the full article text?

Yes. Set `crawl_results` to the number of top results you want fetched, and each page retrieved successfully includes a `content` field with the article text as markdown. Results that cannot be retrieved are returned without `content` and are not charged.

Which language editions are covered?

Results follow the query language, and the `language` parameter can be set explicitly. For Chinese-language reference material, `baidu` also surfaces Baidu Baike entries.

What does a Wikipedia search cost?

One credit per search, and one additional credit for each page retrieved successfully through `crawl_results`. At the base top-up rate of $1 for 1,000 credits, that is $1 per 1,000 searches. Signup includes 100 free credits with no credit card.

Is Wikipedia a reliable source for an AI answer?

It is a reference layer, not a primary source. It works well for definitions, entity resolution, and stable background, and it pairs with `arxiv` for research claims and with a web engine for current events.

Which other reference sources are supported?

The same Search endpoint accepts `arxiv` for papers and `imdb` for film and television records, alongside general web engines and the Chinese-language engines, for 17 engines in total on one contract.