Call it
curl https://api.peume.com/v1/call/download-an-run-s-results-by-dataset-id \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"limit": 100,
"offset": 0,
"fields": "adId,pageName,adText,snapshotUrl",
"format": "json",
"clean": true,
"dataset_id": "9RcGyLmzZm3nBWNsL"
}
}'const res = await fetch("https://api.peume.com/v1/call/download-an-run-s-results-by-dataset-id", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"limit": 100,
"offset": 0,
"fields": "adId,pageName,adText,snapshotUrl",
"format": "json",
"clean": true,
"dataset_id": "9RcGyLmzZm3nBWNsL"
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/download-an-run-s-results-by-dataset-id",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"limit": 100,
"offset": 0,
"fields": "adId,pageName,adText,snapshotUrl",
"format": "json",
"clean": True,
"dataset_id": "9RcGyLmzZm3nBWNsL"
}
},
)
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: download-an-run-s-results-by-dataset-id.
Parameters
limitintegeritems per page; default is everything, which can be a very large response
Example: 100
offsetintegerExample: 0
fieldsstringcomma-separated field allow-list — the fastest way to shrink an unwieldy scrape result
Example: adId,pageName,adText,snapshotUrl
formatstringjson (default) | jsonl | csv | xlsx | xml | rss
Example: json
cleanbooleantrue drops empty and hidden (#-prefixed) items
Example: true
outputFieldsstringomitstringcomma-separated fields to leave out of each item
unwindstringcomma-separated fields whose arrays or objects are unwound into separate items
flattenstringcomma-separated fields whose nested objects are flattened
descbooleantrue or 1 returns the items newest first
attachmentbooleantrue or 1 answers as a file download
delimiterstringthe csv field delimiter
bombooleantrue or 1 adds a UTF-8 byte order mark to csv
xmlRootstringthe xml root element name
xmlRowstringthe xml element name of each item
skipHeaderRowbooleantrue or 1 leaves out the csv header row
skipHiddenbooleantrue or 1 leaves out hidden (#-prefixed) fields
skipEmptybooleantrue or 1 leaves out empty items
simplifiedbooleanviewstringa view the dataset defines
skipFailedPagesbooleanfeedTitlestringthe rss feed title
feedDescriptionstringthe rss feed description
dataset_idRequiredstringdefaultDatasetId from the run
Example: 9RcGyLmzZm3nBWNsL
Other ways to do it
Same job, other sources, cheapest first.
