Call it
curl https://api.peume.com/v1/call/search-google-images-2 \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"queries": [],
"maxResultsPerQuery": 100,
"gl": "us",
"hl": "en",
"reuseOlderResults": false
}
}'const res = await fetch("https://api.peume.com/v1/call/search-google-images-2", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"queries": [],
"maxResultsPerQuery": 100,
"gl": "us",
"hl": "en",
"reuseOlderResults": false
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/search-google-images-2",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"queries": [],
"maxResultsPerQuery": 100,
"gl": "us",
"hl": "en",
"reuseOlderResults": False
}
},
)
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: search-google-images-2.
Parameters
queriesRequiredarrayProvide one or more image search queries, for example 'golden retriever puppy' or 'eiffel tower at night'. Each query is searched independently and billed per image returned.
maxResultsPerQueryintegerSet how many images to return per query. Default 100. Values below 50 are raised to 50, the smallest page the upstream API bills as a single unit, so you receive 50 images rather than paying the same for fewer. The Actor pulls just enough pages to reach this count, then stops early when a query runs out of images.
Example: 100
glstringSet the two-letter country code for result localization, for example 'us', 'gb', 'de'. Defaults to 'us'.
Example: us
hlstringSet the two-letter interface language code for results, for example 'en', 'es', 'de'. Defaults to 'en'.
Example: en
reuseOlderResultsbooleanEvery run reuses an identical search (same query, country and language) made in the last 48 hours instead of running it again. Turn this on to also reuse searches up to 30 days old: faster, and a good fit for stable queries. Reused images cost the same per image, and every row carries cached, fetchedAt and (when reused) cacheAgeDays.
Example: false
