Skip to content
scrapeatlas.Dashboard

Visual discovery

Cosmos API

Retrieve public Cosmos profiles, elements, collections and keyword search results.

7 endpointsx-api-key

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

Base URL · local workerhttp://localhost:3049Public API: https://api.scrapeatlas.com.
Authenticationx-api-keyCustomer key from your account. See Authentication.

Endpoints

GET/v1/cosmos/profile

Get a Cosmos profile

Retrieve a public profile’s identity, biography, image, links, audience counts and saved-element count.

Reference
GET/v1/cosmos/user/posts

Get 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
GET/v1/cosmos/user/clusters

Get 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
GET/v1/cosmos/post

Get 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
GET/v1/cosmos/cluster

Get 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
GET/v1/cosmos/cluster/posts

Get 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
GET/v1/cosmos/search

Search 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.

Reference

Quick start

Create an API key on your account page, then call the public API. Values below are placeholders.

Terminal
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.
Error codes
13
HTTPfailure.codeMeaning
200partialUsable data with media_incomplete, media_limit, restricted_subcollections_omitted, subcollections_incomplete, subcollection_limit or record_limit coverage warnings.
400invalid_requestMissing, duplicate, malformed, unsafe or unsupported request parameters.
401unauthorizedMissing or invalid service API key.
403restricted_pageThe requested Cosmos content is not publicly accessible.
404not_foundThe requested public profile, element or collection was not found.
429upstream_rate_limitedCosmos temporarily rate-limited retrieval.
502upstream_challengedCosmos challenged retrieval.
502upstream_errorSource retrieval could not complete.
502unsupported_pageThe source response was incomplete, mismatched or unsupported.
502response_too_large payload_too_complexSource data exceeded the byte or parsing limits.
502unsafe_redirect request_limitThe source redirect or request sequence exceeded the accepted contract.
503busyAll Cosmos retrieval slots are in use.
504timeoutThe total operation deadline expired.