# Wikipedia Search (`wikipedia.search`)

Full-text search of Wikipedia in any language edition.

- **Route:** `POST /v1/run/wikipedia.search`
- **Price:** $0.0005 per request ($0.50 per 1,000) · `cost_usd` on every response
- **Source:** Wikimedia APIs (`wikipedia`) · failover: no
- **Measured latency:** p50 2326 ms · p95 2326 ms · p99 2326 ms (1 calls, 30d)
- **Heavy response:** no

## Input

| Field | Type | Required | Default | Notes |
|---|---|---|---|---|
| `query` | string | yes |  |  |
| `language` | string | no | "en" |  |
| `limit` | integer | no | 10 |  |

## Output (`output` in the run envelope)

| Field | Meaning |
|---|---|
| `results` | Title, snippet, word count and URL. |
| `license` | Attribution requirement. |

## Example

```bash
curl -s -X POST https://getallapis.com/v1/run/wikipedia.search \
  -H "Authorization: Bearer $GETALLAPIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"large language model","limit":5}'
```

```python
from getallapis_client import Client
client = Client()  # reads GETALLAPIS_API_KEY
result = client.run('wikipedia.search', {'query': 'large language model', 'limit': 5})
print(result['cost_usd'], result['output'])
```

```bash
getallapis run wikipedia.search '{"query":"large language model","limit":5}'
```

Quote first (free, validates input): `POST /v1/quote/wikipedia.search` with the same body.
