Request
https://api.zapi.ink/v1/indonesia:perpusnas/opac-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 5 minutes.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
| query | string | query | Yes | Search terms Example: sejarah |
| field | enum: title | author | subject | publisher | publishYear | callNumber | bibId | isbn | itemId | query | No | Field to search. Default title Example: title |
| match | enum: default | startsWith | endsWith | anyWord | exact | query | No | Match mode. Default default Example: default |
| materialType | enum: all | monograph | film | cartographic | video | music | mixed | audio | microform | manuscript | serial | braille | graphic | electronic | serialMicroform | serialElectronic | ephemera | query | No | Material type filter. Default all Example: all |
| page | number | query | No | Page number, 10 records per page. Default 1 Example: 1 |
Code examples
curl -X GET "https://api.zapi.ink/v1/indonesia:perpusnas/opac-search?query=sejarah&field=title&match=default&materialType=all&page=1" \ -H "x-api-key: zpi_xxxxxxxxxxxxxxxxxxxxxxxx"
const res = await fetch("https://api.zapi.ink/v1/indonesia:perpusnas/opac-search?query=sejarah&field=title&match=default&materialType=all&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/indonesia:perpusnas/opac-search", params={"query":"sejarah","field":"title","match":"default","materialType":"all","page":"1"}, headers={"x-api-key":"zpi_xxxxxxxxxxxxxxxxxxxxxxxx"}, ) print(res.json())
Example response
{ "project": "indonesia:perpusnas", "data": { "page": 1, "count": 10, "field": "title", "items": [ { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=406054", "title": "Sejarah / Ttim Sejarah", "authors": [ "Indonesia. Direktorat Jenderal Industri Logam, Mesin dan Kimia" ], "coverUrl": "https://opac.perpusnas.go.id/uploaded_files/sampul_koleksi/original/Monograf/406054.jpg", "recordId": "406054", "callNumber": "CB-D.10 1994-003442", "publication": "Yudhistira,", "materialType": "Monograf", "digitalContent": "Tidak Tersedia" }, { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=889083", "title": "Sejarah : jurnal jabatan sejarah", "authors": [ "Universitas Kebangsaan Malaysia" ], "coverUrl": null, "recordId": "889083", "callNumber": "G : 2147 NO. 7 1999 Lebih banyak ▼", "publication": "Universitas Kebangsaan Malaysia,", "materialType": "Terbitan Berkala", "digitalContent": "Tidak Tersedia" }, { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=161147", "title": "Sejarah", "authors": [ "Pujowaluyo, Hilman" ], "coverUrl": null, "recordId": "161147", "callNumber": "90-85/151", "publication": "Kantor Wilayah Departemen Pertambangan dan Energi Propinsi Sumatera Utara,", "materialType": "Monograf", "digitalContent": "Tidak Tersedia" }, { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=520619", "title": "SEJARAH", "coverUrl": null, "recordId": "520619", "publication": "Gramedia Pustaka Utama1991", "materialType": "Terbitan Berkala", "digitalContent": "Tidak Tersedia" }, { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=523474", "title": "Sejarah", "authors": [ "HABIB Mustopo, M" ], "coverUrl": null, "recordId": "523474", "publication": "Yudhistira2006", "materialType": "Monograf", "digitalContent": "Tidak Tersedia" }, { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=2621862", "title": "Sejarah", "coverUrl": "https://opac.perpusnas.go.id/uploaded_files/sampul_koleksi/original/Manuskrip/2621862.jpg", "recordId": "2621862", "callNumber": "Peti 121h PLT 125 Peti 121h PLT 125", "materialType": "Manuskrip teks volume,sumber daya sambung jaring", "digitalContent": "pdf" }, { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=65899", "title": "Sejarah", "authors": [ "Penyalin naskah: Endus kampung Sayang Cianjur" ], "coverUrl": null, "recordId": "65899", "callNumber": "SD 153", "materialType": "Manuskrip teks volume", "digitalContent": "Tidak Tersedia" }, { "url": "https://opac.perpusnas.go.id/DetailOpac.aspx?id=1101395", "title": "Sejarah", "coverUrl": "https://opac.perpusnas.go.id/uploaded_files/sampul_koleksi/original/Monograf/1101395.jpg", "recordId": "1101395", "callNumber": "900 SEJ", "publication": "CSIS,", "materialType": "Monograf teks volume", "digitalContent": "Tidak Tersedia" } ], "limit": 10, "match": "default", "query": "sejarah", "total": null, "hasMore": true, "nextPage": 2, "provider": "perpusnas", "materialType": "all" }, "timestamp": "2026-08-30T00:49:31Z" }
Frequently asked questions
How do I call the Perpusnas Opac Search API?
Send a GET request to https://api.zapi.ink/v1/indonesia:perpusnas/opac-search?query=sejarah with your Zapi key in the x-api-key header. Parameters — required: query; optional: field, match, materialType, page. The response is JSON in the { project, data, timestamp } envelope.
What does the Perpusnas Opac Search API return?
Perpusnas OPAC catalogue search (INLIS / ASP.NET WebForms). The example response has the fields page, count, field, items, limit, match, query, total. Each item in items has fields such as url, title, authors, coverUrl, recordId, callNumber, publication, materialType.
Is the Perpusnas Opac 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 Perpusnas Opac 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 "perpusnas" and endpoint "opac-search".
What other Perpusnas API endpoints are there?
It has 4 endpoints. Besides Opac Search: Article, Articles, Collection Stats.
