# Wikipedia Autocomplete — Zapi reference > Wikipedia article autocomplete from the OpenSearch action. Matches titles by prefix, not phrases. **Base URL:** `https://api.zpi.web.id` **Auth:** Send `x-api-key: YOUR_KEY` header on every request. Get a free key at https://zpi.web.id/dashboard/keys. **Response envelope:** `{ status, message, content }` **Rate limit:** 60 req/min on free tier. **Related:** - Detail page: https://zpi.web.id/api/autocomplete/wikipedia-autocomplete - Endpoint catalog: https://zpi.web.id/category/autocomplete - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Wikipedia Autocomplete **Category:** autocomplete · **Slug:** `wikipedia-autocomplete` **Detail page:** https://zpi.web.id/api/autocomplete/wikipedia-autocomplete Wikipedia article autocomplete from the OpenSearch action. Matches titles by prefix, not phrases. **Tags:** wikipedia, knowledge, autocomplete, opensearch ### Autocomplete Article titles matching a prefix. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/autocomplete` - **Cache TTL:** 600s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `q` | string | query | yes | Title prefix to complete | | `lang` | string | query | no | Wikipedia edition, e.g. id, en, jv. Default id | | `count` | number | query | no | Maximum titles. Default 10, max 50 | **cURL:** ```bash curl "https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/autocomplete?q=kucing&lang=id&count=10" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/autocomplete?q=kucing&lang=id&count=10", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/autocomplete?q=kucing&lang=id&count=10", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "count": 10, "items": [ { "url": "https://id.wikipedia.org/wiki/Kucing", "text": "Kucing" }, { "url": "https://id.wikipedia.org/wiki/Kucing_emas", "text": "Kucing emas" }, { "url": "https://id.wikipedia.org/wiki/Kucing_persia", "text": "Kucing persia" }, { "url": "https://id.wikipedia.org/wiki/Kucing_Schr%C3%B6dinger", "text": "Kucing Schrödinger" }, { "url": "https://id.wikipedia.org/wiki/Kucingan_(tumbuhan)", "text": "Kucingan (tumbuhan)" }, { "url": "https://id.wikipedia.org/wiki/Kucing_siam", "text": "Kucing siam" }, { "url": "https://id.wikipedia.org/wiki/Kucing_pallas", "text": "Kucing pallas" }, { "url": "https://id.wikipedia.org/wiki/Kucing_liar_eropa", "text": "Kucing liar eropa" } ], "query": "kucing", "locale": "id", "provider": "wikipedia" } ``` --- ### Expand Walk the title index — the prefix with every letter appended, deduplicated. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/expand` - **Cache TTL:** 1800s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `q` | string | query | yes | Seed to expand | | `modifiers` | enum(all|alphabet|questions|prepositions|digits) | query | no | Which modifier sets to append. Default all | | `lang` | enum(id|en) | query | no | Language for the question and preposition sets. Default id | | `count` | number | query | no | Cap the returned list. Default: every unique result found | **cURL:** ```bash curl "https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/expand?q=kucing&modifiers=all&lang=id&count=200" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/expand?q=kucing&modifiers=all&lang=id&count=200", { headers: { "x-api-key": process.env.ZAPI_KEY } }); const data = await res.json(); ``` **Python:** ```python import requests r = requests.get("https://api.zpi.web.id/v1/autocomplete:wikipedia-autocomplete/expand?q=kucing&modifiers=all&lang=id&count=200", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "seed": "kucing", "count": 88, "items": [ { "via": "seed", "text": "Kucing" }, { "via": "seed", "text": "Kucing emas" }, { "via": "seed", "text": "Kucing persia" }, { "via": "seed", "text": "Kucing Schrödinger" }, { "via": "seed", "text": "Kucingan (tumbuhan)" }, { "via": "seed", "text": "Kucing siam" }, { "via": "seed", "text": "Kucing pallas" }, { "via": "seed", "text": "Kucing liar eropa" } ], "locale": "id", "provider": "wikipedia", "modifiers": "alphabet", "truncated": false, "variantsTried": 27, "variantsFailed": 16 } ``` --- _Generated: 2026-08-02T14:25:53.410Z_