Call it
curl https://api.peume.com/v1/call/google-organic-search-results-for-a-query \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"engine": "google",
"q": "coffee",
"gl": "us",
"hl": "en",
"start": 0
}
}'const res = await fetch("https://api.peume.com/v1/call/google-organic-search-results-for-a-query", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"engine": "google",
"q": "coffee",
"gl": "us",
"hl": "en",
"start": 0
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/google-organic-search-results-for-a-query",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"engine": "google",
"q": "coffee",
"gl": "us",
"hl": "en",
"start": 0
}
},
)
print(res.json()["output"])Answer: {"id": "run_…", "status": "completed", "cost_usd": …, "output": {…}}. Long jobs answer 202 with a run id to read later. From an AI agent, connect the MCP server and ask for this by name: google-organic-search-results-for-a-query.
Parameters
engineRequiredstringthe engine selector — must be this literal string
Example: google
qRequiredstringthe search query; Google search operators work here
Example: coffee
locationstringcity-level origin of the search, e.g. "Austin, Texas, United States". Mutually exclusive with uule and with lat/lon
uulestringGoogle's encoded location, as an alternative to `location`
latnumberlatitude; requires lon and a matching gl
lonnumberlongitude; requires lat
radiusintegermetres around lat/lon; 1-199 on desktop, 1-1000 on mobile
google_domainstringdefault google.com; e.g. google.co.uk
glstringcountry code for the search, e.g. us, uk
Example: us
hlstringinterface language code, e.g. en
Example: en
crstringrestrict to countries, e.g. countryUS; multiple joined by |
lrstringrestrict to languages, e.g. lang_en; multiple joined by |
devicestringdesktop (default) | tablet | mobile
startintegerresult offset for pagination — 0, 10, 20 … This is how you page; see the note about `num`
Example: 0
tbmstringswitches the Google vertical: isch (images), vid, nws, shop, lcl, pts
tbsstringadvanced Google filters, e.g. date range
safestringactive | off
nfprstring1 disables Google's auto-correction to a different spelling
filterstring0 turns off Google's similar-results and omitted-results filters
Other ways to do it
Same job, other sources, cheapest first.
