快速开始
serp.cheap 通过单一的 HTTPS 端点将 Google 搜索转换为干净的 JSON。
- 基础 URL:
https://api.serp.cheap - 端点:
POST /v1/search - 认证: 一个
x-api-key头部
1. 获取 API 密钥
Section titled “1. 获取 API 密钥”在 app.serp.cheap 登录并创建密钥。每个新账户都会获赠 免费额度。
2. 发起请求
Section titled “2. 发起请求”将你的查询作为 JSON 发送,并在 x-api-key 头部中携带你的密钥。
curl -X POST https://api.serp.cheap/v1/search \ -H "x-api-key: YOUR_API_KEY" \ -H "content-type: application/json" \ -d '{ "q": "best running shoes", "gl": "us" }'import { SerpCheap } from "@serpcheap/sdk";
const client = new SerpCheap("YOUR_API_KEY");const res = await client.search({ q: "best running shoes", gl: "us" });console.log(res.organic[0].title);from serpcheap import SerpCheap
client = SerpCheap("YOUR_API_KEY")res = client.search(q="best running shoes", gl="us")print(res.organic[0].title)3. 读取响应
Section titled “3. 读取响应”返回的结果已经排序,并附带可选的知识图谱和计费统计。
{ "search": "best running shoes", "page": 1, "organic": [ { "position": 1, "title": "The 10 Best Running Shoes of 2026", "link": "https://example.com/best-running-shoes", "snippet": "Our running experts tested 40+ pairs…" } ], "knowledgeGraph": { "title": "Running shoe", "description": "…" }, "stats": { "balance": 9994, "cost": 6, "cached": false }}