Call it
curl https://api.peume.com/v1/call/queue-a-chatgpt-answer-scrape-read-it-when-ready \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"taskType": "CHATGPT",
"payload": {
"prompt": "best running shoes for flat feet",
"country": "US"
}
}
}'const res = await fetch("https://api.peume.com/v1/call/queue-a-chatgpt-answer-scrape-read-it-when-ready", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"taskType": "CHATGPT",
"payload": {
"prompt": "best running shoes for flat feet",
"country": "US"
}
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/queue-a-chatgpt-answer-scrape-read-it-when-ready",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"taskType": "CHATGPT",
"payload": {
"prompt": "best running shoes for flat feet",
"country": "US"
}
}
},
)
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: queue-a-chatgpt-answer-scrape-read-it-when-ready.
Parameters
taskTypeRequiredstringCHATGPT
Example: CHATGPT
payloadRequiredobjectthe body of.ai-search.chatgpt.scrape: prompt (a string, or an array of up to 5 for a multi-turn conversation) and country are required
Example: {"prompt":"best running shoes for flat feet","country":"US"}
