Visual discovery
Cosmos API
Retrieve public Cosmos profiles, elements, collections and keyword search results.
Read curator profiles and browse their saved elements and collections. Retrieve element media, source attribution, product metadata and save counts, inspect collection and subcollection details, and search for visual references with cursor pagination.
API availability: Available
http://localhost:3049Public API: https://api.scrapeatlas.com.Endpoints
/v1/cosmos/profileGet a Cosmos profile
Retrieve a public profile’s identity, biography, image, links, audience counts and saved-element count.
Reference/v1/cosmos/user/postsGet a user’s Cosmos elements
Browse a curator’s saved elements with media, captions, product metadata and source attribution. Choose a page size and continue with the returned cursor.
Reference/v1/cosmos/user/clustersGet a user’s Cosmos collections
Browse a curator’s public collections with names, descriptions, cover images, owners and element counts. Choose a page size and continue with the returned cursor.
Reference/v1/cosmos/postGet a Cosmos element
Retrieve element content, media, source attribution, product metadata and save count from a Cosmos element URL. Read media blur hashes, safety labels and the published source public-domain flag.
Reference/v1/cosmos/clusterGet a Cosmos collection
Retrieve a collection’s name, description, cover image, owner, element and follower counts, and subcollections. Accept a collection or subcollection URL.
Reference/v1/cosmos/cluster/postsGet a Cosmos collection’s elements
Browse elements saved in a collection with media, captions, source attribution and saved times. Choose a page size and continue with the returned cursor.
Reference/v1/cosmos/searchSearch Cosmos elements
Search for visual references by keyword and retrieve element content, media, product metadata and source attribution. Choose a page size and continue with the returned cursor.
ReferenceQuick start
Create an API key on your account page, then call the public API. Values below are placeholders.
curl "https://api.scrapeatlas.com/v1/cosmos/profile?handle=example" \
-H "x-api-key: YOUR_API_KEY"Coverage & limits
- Paged routes accept limit 1 to 40. User Collections defaults to 20 records; element feeds and search default to 40. Supply the returned cursor with the same endpoint and inputs to request another page. Request cursors contain 1 to 4,096 characters with no control characters.
- Usernames contain 1 to 64 letters, digits, underscores, dots or hyphens, begin with a letter, digit, underscore or hyphen, and contain no consecutive dots. Search text contains 1 to 300 characters after trimming and no control characters.
- Element and collection URLs are HTTPS cosmos.so or www.cosmos.so URLs with at most 1,500 characters. Element IDs are positive integers at most 2,147,483,647. Collection and optional subcollection slugs contain 1 to 120 letters, digits, underscores, dots or hyphens and no consecutive dots.
- Each operation has a 30-second deadline, a 4 MiB decoded-response budget and at most three upstream requests, including at most one transient retry. Parsing is bounded to depth 32 and 60,000 nodes.
- At most four requests run concurrently; excess requests receive busy.
- Each result page contains at most 40 records. Each element retains at most 40 media records and metadata records. Each collection retains at most 40 subcollections.
- Responses include status, coverage and accounting. Bounded media or subcollection truncation, omitted subcollections and an incomplete source media or subcollection result produce explicit coverage warnings. Ordinary cursor-paginated pages can report success with has_more true.
| HTTP | failure.code | Meaning |
|---|---|---|
| 200 | partial | Usable data with media_incomplete, media_limit, restricted_subcollections_omitted, subcollections_incomplete, subcollection_limit or record_limit coverage warnings. |
| 400 | invalid_request | Missing, duplicate, malformed, unsafe or unsupported request parameters. |
| 401 | unauthorized | Missing or invalid service API key. |
| 403 | restricted_page | The requested Cosmos content is not publicly accessible. |
| 404 | not_found | The requested public profile, element or collection was not found. |
| 429 | upstream_rate_limited | Cosmos temporarily rate-limited retrieval. |
| 502 | upstream_challenged | Cosmos challenged retrieval. |
| 502 | upstream_error | Source retrieval could not complete. |
| 502 | unsupported_page | The source response was incomplete, mismatched or unsupported. |
| 502 | response_too_large payload_too_complex | Source data exceeded the byte or parsing limits. |
| 502 | unsafe_redirect request_limit | The source redirect or request sequence exceeded the accepted contract. |
| 503 | busy | All Cosmos retrieval slots are in use. |
| 504 | timeout | The total operation deadline expired. |