Call it
curl https://api.peume.com/v1/call/chatgpt-search \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"country": "US",
"requireShoppingCards": false,
"requirePlaces": false,
"webSearch": "force",
"requireEntities": false,
"prompt": "your prompt"
}
}'const res = await fetch("https://api.peume.com/v1/call/chatgpt-search", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"country": "US",
"requireShoppingCards": false,
"requirePlaces": false,
"webSearch": "force",
"requireEntities": false,
"prompt": "your prompt"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/chatgpt-search",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"country": "US",
"requireShoppingCards": False,
"requirePlaces": False,
"webSearch": "force",
"requireEntities": False,
"prompt": "your prompt"
}
},
)
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: chatgpt-search.
Parameters
countrystringISO-3166 alpha-2 country to ask from, e.g. US, GB, DE. ChatGPT localizes both the pages it retrieves and the answer it writes, so this is the difference between what a US buyer and a UK buyer are told.
Example: US
requireShoppingCardsbooleanServe only from a source that can return shopping cards shown with the answer. Leaving this off still returns shopping cards whenever the source that answered can. Turning it on selects the single source that guarantees them, which costs more and has nothing to fall back to if it is unavailable.
Example: false
requirePlacesbooleanServe only from a source that can return places shown with the answer. Leaving this off still returns places whenever the source that answered can. Turning it on selects the single source that guarantees them, which costs more and has nothing to fall back to if it is unavailable.
Example: false
routestringUpstream source to run on; omit for "pelican". koala ($0.0018 per call, 59.4% uptime); pelican ($0.0024 per call, 98.2% uptime). Output fields only some routes return: answerPosition (koala); category (koala); cited (koala); createdUtc (koala); description (koala); name (koala); phone (koala); places (koala); position (koala); reviewCount (koala); webSearchTriggered (koala); websiteUrl (koala). A route can refuse an input it cannot apply with a 400 source_unknown (not charged): retry on another route, or omit that input.
koala · pelican
webSearchstringWhether to insist ChatGPT browses the web. force instructs it to search and is the default; auto lets ChatGPT decide, which is cheaper and answers from memory roughly half the time. Check webSearchTriggered for what actually happened - an answer written without a search is not web-grounded.
force · auto
Example: force
requireEntitiesbooleanServe only from a source that can return brands and other named entities recognized in the answer. One source currently qualifies, so the request cannot fall back when it is unavailable.
Example: false
promptRequiredstringQuestion or research prompt for ChatGPT to answer using web search.
requireAdsbooleanServe only from a source that can return sponsored placements shown with the answer. One source currently qualifies, so the request cannot fall back when it is unavailable.
Example: false
