索
SERP API
5 operationsserp:writeserp:read
Search Google, Bing and DuckDuckGo by country, language, location and device, with AI Overview citations, and track where a domain ranks for a keyword.
| POST | /serp/search | Search Google, Bing or DuckDuckGo and get normalised results, with AI Overview citations. |
| GET | /serp/checks | List rank checks. |
| POST | /serp/checks | Check where a domain or URL ranks for a keyword. |
| GET | /serp/checks/{serpCheckId} | Get a rank check. |
| GET | /serp/locations | List the locations a search can target. |
Search Google, Bing or DuckDuckGo and get normalised results, with AI Overview citations.
POST
/v1/serp/searchscope serp:write
Bills 60 units per started 10 results (60 × ceil(depth / 10)), where depth 0 means 20, plus 60 when aiOverview is set.
Request body
aiOverviewboolean | |
countrystring | |
depthinteger (int32) | |
devicestring | |
enginestring required | |
languagestring | |
locationstring | |
providerstring | |
querystring required | |
tunnelstring |
Response
12 fields
engine | string |
items | SerpItem[] |
domain | string |
rankAbsolute | integer (int32) |
rankGroup | integer (int32) |
snippet | string |
title | string |
type | string |
url | string |
provider | string |
query | string |
searchedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/serp/search" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "aiOverview": false, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }'
const res = await fetch("https://api.hoshime.com/v1/serp/search", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "aiOverview": false, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/serp/search", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "aiOverview": False, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }, ) body = res.json()
{ "engine": "…", "items": [ { "domain": "…", "rankAbsolute": 0, "rankGroup": 0, "snippet": "…", "title": "…", "type": "…", "url": "https://…" } ], "provider": "…", "query": "…", "searchedAt": 0 }
List rank checks.
GET
/v1/serp/checksscope serp:read
Parameters
pageinteger | |
limitinteger | |
withTotalboolean | |
statusstring | |
clientRefstring |
Response
44 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | SerpCheck[] |
attempt | integer (int32) |
clientRef | string |
createdAt | integer (int64) |
error | string |
finishedAt | integer (int64) | null |
idempotencyKey | string | null |
items | SerpItem[] |
domain | string |
rankAbsolute | integer (int32) |
rankGroup | integer (int32) |
snippet | string |
title | string |
type | string |
url | string |
matchedUrl | string |
maxAttempts | integer (int32) |
metadata | map |
nextAttemptAt | integer (int64) |
provider | string |
rank | integer (int32) | null |
rankAbsolute | integer (int32) | null |
request | SearchInput | null |
aiOverview | boolean |
country | string |
depth | integer (int32) |
device | string |
engine | string |
language | string |
location | string |
provider | string |
query | string |
tunnel | string |
serpCheckId | string |
status | string |
targetFeatures | string[] |
targetType | string |
targetValue | string |
ttl | integer (int64) |
updatedAt | integer (int64) |
curl "https://api.hoshime.com/v1/serp/checks" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/serp/checks", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/serp/checks", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "attempt": 0, "clientRef": "…", "createdAt": 0, "error": "…", "finishedAt": null, "idempotencyKey": null, "items": [ { "domain": null, "rankAbsolute": null, "rankGroup": null, "snippet": null, "title": null, "type": null, "url": null } ], "matchedUrl": "https://…", "maxAttempts": 0, "metadata": {}, "nextAttemptAt": 0, "provider": "…", "rank": null, "rankAbsolute": null, "request": null, "serpCheckId": "abc123", "status": "…", "targetFeatures": [ "…" ], "targetType": "…", "targetValue": "…", "ttl": 0, "updatedAt": 0 } ] }
Check where a domain or URL ranks for a keyword.
POST
/v1/serp/checksscope serp:write
Bills the same units as a search, recorded when the check succeeds.
Request body
asyncboolean | |
idempotencyKeystring | |
metadatamap | |
searchSearchInput | null required | |
aiOverviewboolean | |
countrystring | |
depthinteger (int32) | |
devicestring | |
enginestring required | |
languagestring | |
locationstring | |
providerstring | |
querystring required | |
tunnelstring | |
targetTypestring required | |
targetValuestring required |
Response
39 fields
attempt | integer (int32) |
clientRef | string |
createdAt | integer (int64) |
error | string |
finishedAt | integer (int64) | null |
idempotencyKey | string | null |
items | SerpItem[] |
domain | string |
rankAbsolute | integer (int32) |
rankGroup | integer (int32) |
snippet | string |
title | string |
type | string |
url | string |
matchedUrl | string |
maxAttempts | integer (int32) |
metadata | map |
nextAttemptAt | integer (int64) |
provider | string |
rank | integer (int32) | null |
rankAbsolute | integer (int32) | null |
request | SearchInput | null |
aiOverview | boolean |
country | string |
depth | integer (int32) |
device | string |
engine | string |
language | string |
location | string |
provider | string |
query | string |
tunnel | string |
serpCheckId | string |
status | string |
targetFeatures | string[] |
targetType | string |
targetValue | string |
ttl | integer (int64) |
updatedAt | integer (int64) |
curl -X POST "https://api.hoshime.com/v1/serp/checks" \ -H "Authorization: Bearer $HOSHIME_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "async": false, "idempotencyKey": "…", "metadata": {}, "search": { "aiOverview": false, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }, "targetType": "…", "targetValue": "…" }'
const res = await fetch("https://api.hoshime.com/v1/serp/checks", { method: "POST", headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, "Content-Type": "application/json", }, body: JSON.stringify({ "async": false, "idempotencyKey": "…", "metadata": {}, "search": { "aiOverview": false, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }, "targetType": "…", "targetValue": "…" }), }); const { data, meta } = await res.json();
import os, requests res = requests.post( "https://api.hoshime.com/v1/serp/checks", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, json={ "async": False, "idempotencyKey": "…", "metadata": {}, "search": { "aiOverview": False, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }, "targetType": "…", "targetValue": "…" }, ) body = res.json()
{ "attempt": 0, "clientRef": "…", "createdAt": 0, "error": "…", "finishedAt": 0, "idempotencyKey": "…", "items": [ { "domain": "…", "rankAbsolute": 0, "rankGroup": 0, "snippet": "…", "title": "…", "type": "…", "url": "https://…" } ], "matchedUrl": "https://…", "maxAttempts": 0, "metadata": {}, "nextAttemptAt": 0, "provider": "…", "rank": 0, "rankAbsolute": 0, "request": { "aiOverview": false, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }, "serpCheckId": "abc123", "status": "…", "targetFeatures": [ "…" ], "targetType": "…", "targetValue": "…", "ttl": 0, "updatedAt": 0 }
Get a rank check.
GET
/v1/serp/checks/{serpCheckId}scope serp:read
Parameters
serpCheckIdstring · path required |
Response
39 fields
attempt | integer (int32) |
clientRef | string |
createdAt | integer (int64) |
error | string |
finishedAt | integer (int64) | null |
idempotencyKey | string | null |
items | SerpItem[] |
domain | string |
rankAbsolute | integer (int32) |
rankGroup | integer (int32) |
snippet | string |
title | string |
type | string |
url | string |
matchedUrl | string |
maxAttempts | integer (int32) |
metadata | map |
nextAttemptAt | integer (int64) |
provider | string |
rank | integer (int32) | null |
rankAbsolute | integer (int32) | null |
request | SearchInput | null |
aiOverview | boolean |
country | string |
depth | integer (int32) |
device | string |
engine | string |
language | string |
location | string |
provider | string |
query | string |
tunnel | string |
serpCheckId | string |
status | string |
targetFeatures | string[] |
targetType | string |
targetValue | string |
ttl | integer (int64) |
updatedAt | integer (int64) |
curl "https://api.hoshime.com/v1/serp/checks/{serpCheckId}" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/serp/checks/{serpCheckId}", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/serp/checks/{serpCheckId}", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "attempt": 0, "clientRef": "…", "createdAt": 0, "error": "…", "finishedAt": 0, "idempotencyKey": "…", "items": [ { "domain": "…", "rankAbsolute": 0, "rankGroup": 0, "snippet": "…", "title": "…", "type": "…", "url": "https://…" } ], "matchedUrl": "https://…", "maxAttempts": 0, "metadata": {}, "nextAttemptAt": 0, "provider": "…", "rank": 0, "rankAbsolute": 0, "request": { "aiOverview": false, "country": "…", "depth": 0, "device": "…", "engine": "…", "language": "…", "location": "…", "provider": "…", "query": "…", "tunnel": "…" }, "serpCheckId": "abc123", "status": "…", "targetFeatures": [ "…" ], "targetType": "…", "targetValue": "…", "ttl": 0, "updatedAt": 0 }
List the locations a search can target.
GET
/v1/serp/locationsscope serp:read
Parameters
enginestring required | |
countrystring required | |
querystring | |
pageinteger | |
limitinteger | |
withTotalboolean |
Response
8 fields
pageOptions | PageResult | null |
hasNext | boolean |
page | integer (int32) |
total | integer (int64) |
results | Location[] |
code | string |
name | string |
type | string |
curl "https://api.hoshime.com/v1/serp/locations?engine=value&country=value" \ -H "Authorization: Bearer $HOSHIME_TOKEN"
const res = await fetch("https://api.hoshime.com/v1/serp/locations?engine=value&country=value", { headers: { Authorization: `Bearer ${process.env.HOSHIME_TOKEN}`, }, }); const { data, meta } = await res.json();
import os, requests res = requests.get( "https://api.hoshime.com/v1/serp/locations?engine=value&country=value", headers={"Authorization": f"Bearer {os.environ['HOSHIME_TOKEN']}"}, ) body = res.json()
{ "pageOptions": { "hasNext": false, "page": 0, "total": 0 }, "results": [ { "code": "…", "name": "…", "type": "…" } ] }