# Stack Overflow โ€” Zapi reference > Stack Overflow & Stack Exchange search โ€” Q&A programming dengan tags, score, view count. Support stackoverflow/superuser/serverfault/askubuntu. **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/search-tools/stackoverflow - Endpoint catalog: https://zpi.web.id/category/search-tools - Concise index: https://zpi.web.id/llms.txt - Full reference: https://zpi.web.id/llms-full.txt --- ## Stack Overflow **Category:** search-tools ยท **Slug:** `stackoverflow` **Detail page:** https://zpi.web.id/api/search-tools/stackoverflow Stack Overflow & Stack Exchange search โ€” Q&A programming dengan tags, score, view count. Support stackoverflow/superuser/serverfault/askubuntu. **Tags:** search, code, programming, qa ### Search Cari hasil pencarian berdasarkan keyword dengan pagination. - **Method:** `GET` - **Endpoint:** `https://api.zpi.web.id/v1/search-tools:stackoverflow/search` - **Cache TTL:** 180s **Parameters:** | Name | Type | Location | Required | Description | |------|------|----------|----------|-------------| | `query` | string | query | yes | Search keyword | | `page` | number | query | no | Result page (default 1, max 50) | | `site` | enum(stackoverflow|superuser|serverfault|askubuntu) | query | no | Stack Exchange site (default stackoverflow) | **cURL:** ```bash curl "https://api.zpi.web.id/v1/search-tools:stackoverflow/search?query=python&page=1&site=stackoverflow" \ -H "x-api-key: YOUR_API_KEY" ``` **JavaScript / TypeScript:** ```javascript const res = await fetch("https://api.zpi.web.id/v1/search-tools:stackoverflow/search?query=python&page=1&site=stackoverflow", { 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/search-tools:stackoverflow/search?query=python&page=1&site=stackoverflow", headers={"x-api-key": "YOUR_API_KEY"}) data = r.json() ``` **Example response:** ```json { "page": 1, "count": 15, "items": [ { "url": "https://stackoverflow.com/questions/32308370/what-is-the-syntax-for-typescript-arrow-functions-with-generics", "tags": [ "typescript" ], "score": 825, "title": "What is the syntax for Typescript arrow functions with generics?", "author": "Andreas Frische", "source": "stackoverflow.com", "createdAt": "2015-08-31T09:46:38.000Z", "viewCount": 524972, "isAnswered": true, "answerCount": 18 }, { "url": "https://stackoverflow.com/questions/12710905/how-do-i-dynamically-assign-properties-to-an-object-in-typescript", "tags": [ "typescript" ], "score": 900, "title": "How do I dynamically assign properties to an object in TypeScript?", "author": "Peter Olson", "source": "stackoverflow.com", "createdAt": "2012-10-03T14:42:54.000Z", "viewCount": 1084771, "isAnswered": true, "answerCount": 31 }, { "url": "https://stackoverflow.com/questions/33535879/how-to-run-typescript-files-from-command-line", "tags": [ "node.js", "typescript" ], "score": 831, "title": "How to run TypeScript files from command line?", "author": "Gunchars", "source": "stackoverflow.com", "createdAt": "2015-11-05T02:54:39.000Z", "viewCount": 1282643, "isAnswered": true, "answerCount": 29 }, { "url": "https://stackoverflow.com/questions/14425568/interface-type-check-with-typescript", "tags": [ "javascript", "typescript", "interface" ], "score": 723, "title": "Interface type check with Typescript", "author": "lhk", "source": "stackoverflow.com", "createdAt": "2013-01-20T14:37:38.000Z", "viewCount": 986629, "isAnswered": true, "answerCount": 30 }, { "url": "https://stackoverflow.com/questions/58469229/react-with-typescript-generics-while-using-react-forwardref", "tags": [ "reactjs", "typescript", "generics" ], "score": 175, "title": "React with Typescript -- Generics while using React.forwardRef", "author": "Primm", "source": "stackoverflow.com", "createdAt": "2019-10-20T00:58:22.000Z", "viewCount": 81791, "isAnswered": true, "answerCount": 7 }, { "url": "https://stackoverflow.com/questions/59988667/typescript-react-fcprops-confusion", "tags": [ "javascript", "reactjs", "typescript", "react-functional-component" ], "score": 257, "title": "TypeScript React.FC confusion", "author": "Kuldeep Bora", "source": "stackoverflow.com", "createdAt": "2020-01-30T14:52:54.000Z", "viewCount": 423457, "isAnswered": true, "answerCount": 5 }, { "url": "https://stackoverflow.com/questions/17655607/defining-typescript-generics-with-type-safety", "tags": [ "generics", "typescript" ], "score": 45, "title": "Defining typescript generics with type safety", "author": "Tim", "source": "stackoverflow.com", "createdAt": "2013-07-15T13:37:06.000Z", "viewCount": 17891, "isAnswered": true, "answerCount": 2 }, { "url": "https://stackoverflow.com/questions/56843790/typescript-generic-type-with-equal-operator-means", "tags": [ "typescript" ], "score": 85, "title": "typescript generic type with equal operator means?", "author": "Bill", "source": "stackoverflow.com", "createdAt": "2019-07-02T00:02:44.000Z", "viewCount": 18613, "isAnswered": true, "answerCount": 1 } ], "hasMore": true, "nextPage": 2 } ``` --- _Generated: 2026-08-02T14:21:11.571Z_