Request
https://api.zapi.ink/v1/news:kompas/searchSend your key in the x-api-key header. The response is JSON in the { project, data, timestamp } envelope, and an identical request is served from cache for 3 minutes.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| query | string | query | Yes | Keyword pencarian berita Example: indonesia |
| page | number | query | No | Nomor halaman (1-based), default 1, max 50 Example: 1 |
Code examples
curl -X GET "https://api.zapi.ink/v1/news:kompas/search?query=indonesia&page=1" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/news:kompas/search?query=indonesia&page=1", { method: "GET", headers: { "x-api-key": "zpi_xxxxxxxxxxxxxxxxxxxxxxxx" }, }); const data = await res.json(); console.log(data);
import requests res = requests.get( "https://api.zapi.ink/v1/news:kompas/search", params={"query":"indonesia","page":"1"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "news:kompas", "data": { "page": 1, "count": 20, "items": [ { "url": "https://nasional.kompas.com/read/2026/05/12/15050071/indonesia-membaca-pendek", "image": "https://asset.kompas.com/crops/oRXUxfxZTED4fIBGpcLs1mEeSoM=/0x0:1500x1000/750x500/data/photo/2025/09/17/68ca9063e749d.jpg", "title": "Indonesia Membaca Pendek", "source": "kompas.com", "summary": "Kebiasaan membaca cepat perlahan ikut mengubah cara masyarakat menyerap pengetahuan.", "category": "News", "publishedAt": "2026-05-11T17:00:00.000Z" }, { "url": "https://biz.kompas.com/read/2026/05/25/132518828/telkom-perkuat-kemandirian-digital-indonesia-lewat-indonesia-tech-sovereignty", "image": "https://asset.kompas.com/crops/71wXeUkPLIAMUs4ltyOu1esxrag=/0x0:1200x800/750x500/data/photo/2026/05/25/6a13eae45f347.jpg", "title": "Telkom Perkuat Kemandirian Digital Indonesia lewat Indonesia Tech Sovereignty Forum 2026", "source": "kompas.com", "summary": "Telkom menggelar Indonesia Tech Sovereignty Forum 2026 untuk memperkuat cloud, AI, dan keamanan siber nasional lewat kolaborasi.", "category": "Advertorial", "publishedAt": "2026-05-24T17:00:00.000Z" }, { "url": "https://money.kompas.com/read/2026/04/27/113000926/lampu-kuning-fiskal-indonesia", "image": "https://asset.kompas.com/crops/9GBEFgwXJsxqX3D4j80E-Tw8F6w=/0x0:585x390/750x500/data/photo/2012/11/07/1222538-kum----rupiah-menguat-tipis--780x390.jpg", "title": "Lampu Kuning Fiskal Indonesia", "source": "kompas.com", "summary": "Di tengah berbagai tantangan, arah kebijakan fiskal Indonesia masih berada di jalur yang tepat.", "category": "Money", "publishedAt": "2026-04-26T17:00:00.000Z" } ], "hasMore": true, "nextPage": 2 }, "timestamp": "2026-05-27T13:31:59Z" }
Frequently asked questions
How do I call the Kompas Search API?
Send a GET request to https://api.zapi.ink/v1/news:kompas/search?query=indonesia with your Zapi key in the x-api-key header. Parameters — required: query; optional: page. The response is JSON in the { project, data, timestamp } envelope.
What does the Kompas Search API return?
Cari berita berdasarkan keyword dengan pagination. The example response has the fields page, count, items, hasMore, nextPage. Each item in items has fields such as url, image, title, source, summary, category, publishedAt.
Is the Kompas Search API free?
Yes. It is on the Zapi free tier: 600 Zap a month with one API key and no credit card. Each call costs 1 Zap. Paid plans raise the limits.
Can an AI assistant call the Kompas Search API?
Yes. Add the Zapi MCP server (https://mcp.zapi.ink/mcp) to Claude, Cursor or another MCP client and ask in plain words; it calls run_scraper with scraper "kompas" and endpoint "search".
What other Kompas API endpoints are there?
It has 3 endpoints. Besides Search: Detail Artikel, Berita Terbaru.
