Google SERP API
每个 Google 界面都只需一个端点即可访问。更改 engine 参数即可在 Search、Maps、Jobs、Shopping、Trends、Scholar 等之间切换。
Endpoint
Section titled “Endpoint” GET https://serp.shifter.io/v1?engine=<engine>&api_key=YOUR_API_KEY
Authentication
Section titled “Authentication”将您的 API 密钥作为 api_key 查询参数传递。密钥位于面板的 SERP API 下。
Common parameters
Section titled “Common parameters”这些参数适用于大多数 Google 引擎。每个引擎还有其各自的特定参数,记录在其对应页面中。
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key | string | yes | 您的 SERP API 密钥 |
engine | string | yes | 使用哪个 Google 界面(见下表) |
q | string | usually | 搜索查询(某些照片/作者端点不需要) |
location | string | no | 自由格式的位置(例如 "Chicago, Illinois") |
gl | ISO code | no | 国家过滤器(例如 us、de) |
hl | ISO code | no | 界面语言(例如 en、es) |
device | desktop | mobile | tablet | no | 模拟设备 |
start | integer | no | 分页偏移量 |
num | integer | no | 每页结果数 |
Engines
Section titled “Engines”engine | 返回内容 |
|---|---|
google | 包含广告、摘要、PAA、知识图谱的自然搜索结果页 |
google_autocomplete | 部分查询的建议 |
google_images | 图片搜索结果页 |
google_news | 带日期和来源的新闻 |
google_shopping | 商品列表 |
google_product | 单个商品详情 |
google_maps | Maps 上的地点、评论、照片 |
google_maps_reviews | 某地点的所有评论 |
google_maps_photos | 某地点的所有照片 |
google_jobs | 职位列表 |
google_jobs_listing | 单个职位详情 |
google_trends | 兴趣随时间变化的趋势 |
google_scholar | 学术论文 |
google_scholar_author | 作者简介 |
google_scholar_cite | 格式化的引用 |
google_scholar_profiles | 作者发现 |
google_finance | 股票和市场数据 |
google_events | 本地活动 |
google_play | Play 商店应用、图书、电影 |
google_reverse_image | 托管某图片的网页 |
google_local_services | 本地服务提供商 |
Endpoint pages
Section titled “Endpoint pages” Google Search engine=google
Google Maps engine=google_maps
Google Maps Reviews engine=google_maps_reviews
Google Maps Photos engine=google_maps_photos
Google Product engine=google_product
Google Jobs engine=google_jobs
Google Jobs Listing engine=google_jobs_listing
Google Autocomplete engine=google_autocomplete
Google Trends engine=google_trends
Google Scholar engine=google_scholar
Google Scholar Author engine=google_scholar_author
Google Scholar Cite engine=google_scholar_cite
Google Scholar Profiles engine=google_scholar_profiles
Google Finance engine=google_finance
Google Events engine=google_events
Google Play engine=google_play
Google Reverse Image engine=google_reverse_image
Google Local Services engine=google_local_services