↑ ↓ to move ↵ to open

Collections

Collect many pages of results within limits you set.

A collection lets an AI agent gather many pages of results in the background, such as every pin on a large Pinterest board. You set the limits, mainly a total credit budget; the collection runs page by page until it has everything, hits a limit, or you stop it, and keeps what it saved.

Collections appear when you allow them while connecting: tick collections on the approval screen, or give an API key the collection permissions. They use the normal server address.

Start one

Only some endpoints can be collected, such as Pinterest's full board (pinterest.board-full.get). Search or describe an endpoint to check: those that can show managed_collection: true. Then call upscrape_collect:

JSON
{  "capability": "pinterest.board-full.get",  "input": {"url": "https://www.pinterest.com/pinterest/home-decor-ideas/"},  "operation_key": "home-decor-board-2026-10-16",  "limits": {    "max_credits": 10,    "max_records": 500,    "max_chunks": 10,    "max_duration_ms": 600000  }}
LimitWhat it caps
max_creditsRequired. The most the whole collection may spend.
max_recordsThe most records to save. Up to 50,000.
max_chunksThe most pages to fetch. Up to 100.
max_duration_msHow long it may keep starting pages. Up to an hour.

Each page is charged at the endpoint's price, and the collection itself costs nothing more. It stops before a page could take it over max_credits, so it may finish a little under budget. It can never raise its own budget.

The answer gives a collection_id. If it is lost, send the same request with the same operation_key to get the same collection; a different request with that key is refused.

Follow it

Call upscrape_get_collection with the collection_id. While state is collecting, wait the suggested time and check again. When it is finished, outcome says why: everything collected, a limit reached, or stopped. Progress shows the records saved, pages fetched and credits spent so far.

Reaching max_records means the collection saved that many, not that there were no more.

Read what it saved

Call upscrape_get_collection_records:

JSON
{"collection_id": "COLLECTION_ID", "limit": 50, "fields": ["/id", "/save_count", "/media_type"]}
  • Up to 100 records a page; follow next_cursor with the same collection and fields.

  • fields keeps only the fields you name, as JSON Pointers. A page may hold fewer records than you asked for if they are large; pick fewer fields to fit more.

  • delivery_complete: true means you have read every saved record of a finished collection.

You can read while it is still collecting; records can still change until it finishes.

Export it

upscrape_export_result turns a finished collection, or any completed job, into a JSON Lines or CSV file:

JSON
{"collection_id": "COLLECTION_ID", "format": "csv", "fields": ["/id", "/save_count", "/media_type"]}

It arrives in pieces of up to 16 KiB. Append each piece's text exactly as it comes, check it against its sha256, and continue with next_cursor, keeping everything else the same, until delivery_complete is true. A piece can end mid-line, so parse the whole file at the end.

  • JSON Lines keeps every value as it is: each row has id, group_ids and data.

  • CSV has one header row, with id, group_ids and your fields, or data. Nested values are JSON in a quoted cell, and text that a spreadsheet could read as a formula starts with an apostrophe.

Nothing is stored as a download and there is no public link; each piece is checked against your access as it is read.

Stop it

upscrape_cancel_collection stops it from starting new pages. What it saved and what it spent stay; a page already running can still finish and be charged.

A collection also stops starting pages if the key or app that started it loses access: the key is revoked or expires, the app is disconnected, or its permissions change. Connecting again doesn't restart it.

Who can read it

Anyone on the account allowed to read collections can read it, including from another app, within their platform limits. Saved collections are kept for 30 days.

Something missing or unclear? Ask the team that builds the endpoints.