Call it
curl https://api.peume.com/v1/call/crawl-resources \
-H "Authorization: Bearer $PEUME_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": {
"id": "07281559-0695-0216-0000-c269be8b7592",
"limit": 10,
"filters": [
[
"resource_type",
"=",
"image"
],
"and",
[
"size",
">",
100000
]
],
"order_by": [
"size,desc"
]
}
}'const res = await fetch("https://api.peume.com/v1/call/crawl-resources", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.PEUME_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": {
"id": "07281559-0695-0216-0000-c269be8b7592",
"limit": 10,
"filters": [
[
"resource_type",
"=",
"image"
],
"and",
[
"size",
">",
100000
]
],
"order_by": [
"size,desc"
]
}
}),
});
const { output, cost_usd } = await res.json();import os, requests
res = requests.post(
"https://api.peume.com/v1/call/crawl-resources",
headers={"Authorization": f"Bearer {os.environ['PEUME_API_KEY']}"},
json={
"input": {
"id": "07281559-0695-0216-0000-c269be8b7592",
"limit": 10,
"filters": [
[
"resource_type",
"=",
"image"
],
"and",
[
"size",
">",
100000
]
],
"order_by": [
"size,desc"
]
}
},
)
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: crawl-resources.
Parameters
idstringID of the task required field you can get this ID in the response of the Task POST endpoint example: “07131248-1535-0216-1000-17384017ad04”
Example: 07281559-0695-0216-0000-c269be8b7592
urlstringpage URL optional field specify this field if you want to get the resources for a specific page note that to obtain resource’s meta from a particular URL, you should specify the URL in this field; if you do not indicate a url when setting a task, resource’s meta in the results will be returned based
limitintegerthe maximum number of returned resources optional field default value: 100 maximum value: 1000
Example: 10
offsetintegeroffset in the results array of returned resources optional field default value: 0 maximum value: 2000000 if you specify the 10 value, the first ten resources in the results array will be omitted and the data will be provided for the successive resources
filtersarrayarray of results filtering parameters optional field you can add several filters at once (8 filters maximum) you should set a logical operator and, or between the conditions the following operators are supported: regex, not_regex, <, <=, >, >=, =, <>, in, not_in, like, not_like you can use the % ope
Example: [["resource_type","=","image"],"and",["size",">",100000]]
relevant_pages_filtersarrayfilter the resources by relevant pages optional field you can use this field to obtain resources from pages matching to the defined parameters you can apply the same filters here as available for the pages endpoint you can add several filters at once (8 filters maximum) you should set a logical oper
order_byarrayresults sorting rules optional field you can use the same values as in the filters array to sort the results possible sorting types: asc – results will be sorted in the ascending order desc – results will be sorted in the descending order you should use a comma to set up a sorting type example: ["si
Example: ["size,desc"]
search_after_tokenstringtoken for subsequent requests optional field provided in the identical filed of the response to each request; use this parameter to avoid timeouts while trying to obtain over 20,000 results in a single request; by specifying the unique search_after_token value from the response array, you will get t
tagstringuser-defined task identifier optional field the character limit is 255 you can use this parameter to identify the task and match it with the result you will find the specified tag value in the data object of the response
