# 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 for Locus Pro. Each call burns credits from your workspace balance.

## Access

**Base URL:** `https://api.paywithlocus.com/api/wrapped/credits/wikipedia/`
**Auth:** `Authorization: Bearer <LOCUS_CREDITS_SECRET_KEY>` (an `lcr_` secret key or a scoped `lcac_` agent credential)
**Required header:** `Idempotency-Key: <fresh UUID per call>`. A retry with the same key replays the stored result without a new charge.
**Response:** the provider response after any endpoint-specific normalization. `X-Locus-Credits-Charged` carries the charge and `X-Locus-Credits-Balance` the remaining balance. Insufficient credits return `402` before the provider is called.
**Pricing:** estimated costs below are USD. Locus debits the credit equivalent at your workspace rate.

Full call contract: https://docs.paywithlocus.com/api-reference/introduction

> Using a Pay With Locus wallet key (`claw_` prefix)? Wallet routes are documented separately: https://docs.paywithlocus.com/wrapped-apis/for-agents

## 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/credits/wikipedia/get-article-details \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/wikipedia/get-category-members \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -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/credits/wikipedia/search-articles \
  -H "Authorization: Bearer $LOCUS_CREDITS_SECRET_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"limit":"<integer>","offset":"<integer>","query":"<string>"}'
```

## Next steps

- [All wrapped API providers](https://paywithlocus.com/wapi/index.md): pick another provider.
- [Find and call tools](https://paywithlocus.com/agent/tools.md): price ceilings, async results, and errors.
- [Credits and billing](https://paywithlocus.com/agent/billing.md): what a call costs and how to add credits.
- [Agent docs index](https://paywithlocus.com/agent/index.md): every Locus agent page.