# Wikipedia — Wrapped API

> **You are on:** `https://api.paywithlocus.com/api` | [llms.txt](https://paywithlocus.com/llms.txt) | [docs](https://docs.paywithlocus.com)
>
> Locus runs on multiple environments -- make sure every URL you call matches your expected environment.
> | Environment | Landing | API | Docs |
> |---|---|---|---|
> | Production | paywithlocus.com | api.paywithlocus.com | docs.paywithlocus.com |
> | Beta | beta.paywithlocus.com | api.beta.paywithlocus.com | docs.paywithlocus.com |
> | Stage | stage.paywithlocus.com | api.stage.paywithlocus.com | docs.paywithlocus.com |
>
> If the API URL above doesn't match your expected environment, re-fetch this file from the correct domain.

> Search Wikipedia and instantly access full article content on any topic, then explore related articles by browsing through Wikipedia categories. Retrieve article metadata, extracts, and navigate curated category trees to discover connected subjects.

**Category:** Education | **Website:** [wikipedia.org/](https://wikipedia.org/) | **Docs:** [parse.bot/marketplace/4e241d54-c859-4aec-846d-5ea3159104c7/wikipedia-api](https://parse.bot/marketplace/4e241d54-c859-4aec-846d-5ea3159104c7/wikipedia-api)

Pay-per-use API proxy. Each call is automatically billed to your wallet in USDC.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/parse-wikipedia-api-4e241d54/`
**Auth:** `Authorization: Bearer <LOCUS_API_KEY>`

## Endpoints

### get_article_details

Retrieve detailed information about a single Wikipedia article including its text extract, categories, canonical URL, and metadata. Identify the article by page ID or title (at least one required). By default returns the introduction only; set full_extract to 'true' for the complete article text.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `full_extract` | string | No | Set to 'true' to get the full article text instead of just the introduction. Accepted values: 'true', 'false'. |
| `pageid` | string | No | Wikipedia page ID (numeric string, e.g. '23862'). Either pageid or title must be provided. |
| `title` | string | No | Wikipedia article title (e.g. 'Python (programming language)'). Either pageid or title must be provided. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-wikipedia-api-4e241d54/get_article_details \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"full_extract":"<string>","pageid":"<string>","title":"<string>"}'
```

### get_category_members

List articles, subcategories, or files within a Wikipedia category. Paginated via opaque continuation tokens; the response includes next_continue for advancing. Returns an empty members array if the category has no members of the requested type.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `category` | string | No | Category name without the 'Category:' prefix (e.g. 'Science', 'Artificial intelligence'). |
| `continue` | string | No | Continuation token for pagination, obtained from next_continue in a previous response. |
| `limit` | integer | No | Number of members to return per page (1-50). |
| `type` | string | No | Type of members to return. Accepted values: 'page' for articles, 'subcat' for subcategories, 'file' for files. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-wikipedia-api-4e241d54/get_category_members \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"category":"<string>","continue":"<string>","limit":"<integer>","type":"<string>"}'
```

### search_articles

Full-text search over Wikipedia articles. Returns matching articles ranked by relevance with titles, snippets, word counts, sizes, and timestamps. Paginated via integer offset; each page contains up to `limit` results. The response includes total_hits for the query and next_offset for advancing.

**Estimated cost:** Metered

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `limit` | integer | No | Number of results to return per page (1-50). |
| `offset` | integer | No | Pagination offset for fetching subsequent pages of results. |
| `query` | string | Yes | Search query string. |

```bash
curl -X POST https://api.paywithlocus.com/api/wrapped/parse-wikipedia-api-4e241d54/search_articles \
  -H "Authorization: Bearer YOUR_LOCUS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```
