Discover/Cosmos API
live

Cosmos APIcosmos.so

Search the Cosmos curated visual database via 3 endpoints. Filter elements by type, color, and keyword. Browse collections with follower and element counts.

This API takes change requests — .
Endpoints
3
Updated
26d ago

What is the Cosmos API?

The Cosmos.so API exposes 3 endpoints for querying a curated database of visual content including images, videos, links, notes, and products. search_elements returns up to 40 results per page with media URLs, captions, source attribution, and owner details. search_collections surfaces curated groups with follower counts and cover images. search_category_images lets you browse named category feeds with extracted caption tags.

This call costs1 credit / call— charged only on success
Try it
Filter results by color (hex color code without # prefix, e.g. 'FF0000' for red). Omitted returns all colors.
Sort order for results. Omitted defaults to relevance sorting.
Search term to find elements (e.g. 'architecture', 'nature', 'minimalist design').
Pagination cursor from a previous response's next_page_cursor field. Omitted returns the first page.
Filter by content type. Omitted returns all content types.
api.parse.bot/scraper/518f0113-a227-49a8-95cf-31124444fa1e/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X POST 'https://api.parse.bot/scraper/518f0113-a227-49a8-95cf-31124444fa1e/search_elements' \
  -H 'X-API-Key: $PARSE_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "order": "RELEVANT",
  "query": "architecture",
  "content_type": "IMAGE"
}'
Python SDK · recommended

Typed, relational, agent-ready

A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.

  • Fully typed · autocompletes
  • Objects link to objects
  • Typed errors & pagination

Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:

uv add parse-sdk
uv run parse init
uv run parse add --marketplace cosmos-so-api

uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.

"""Cosmos Image Search API — bounded, re-runnable; every call capped."""
from parse_apis.Cosmos_Image_Search_API import Cosmos, Category, ContentType, ElementOrder, CollectionSort, ParseError

cosmos = Cosmos()

# Browse fashion category images
for img in cosmos.category_images.search(category=Category.FASHION, limit=3):
    print(img.image_url, img.caption, img.tags)

# Filter architecture category by keyword
item = cosmos.category_images.search(category=Category.ARCHITECTURE, keyword="bridge", limit=1).first()
if item:
    print(item.author, item.source_url, item.share_url)

# Search elements with content type filter
for element in cosmos.elements.search(query="minimalist design", content_type=ContentType.IMAGE, order=ElementOrder.POPULAR, limit=3):
    print(element.id, element.caption, element.share_url)

# Search collections
try:
    for coll in cosmos.collections.search(query="typography", sort=CollectionSort.LARGEST, limit=3):
        print(coll.name, coll.number_of_elements, coll.followers_count)
except ParseError as e:
    print(f"error: {e.code}")

print("exercised: category_images.search, elements.search, collections.search")
All endpoints · 3 totalmissing one? ·

Full-text search over Cosmos elements (images, videos, links, notes, products). Matches query against captions and metadata. Returns up to 40 results per page. Each element includes media URLs, captions, source attribution, and owner details. Paginate via the next_page_cursor returned in each response. Color filtering accepts a hex code; content_type and order restrict or reorder results server-side.

Input
ParamTypeDescription
colorstringFilter results by color (hex color code without # prefix, e.g. 'FF0000' for red). Omitted returns all colors.
orderstringSort order for results. Omitted defaults to relevance sorting.
queryrequiredstringSearch term to find elements (e.g. 'architecture', 'nature', 'minimalist design').
page_cursorstringPagination cursor from a previous response's next_page_cursor field. Omitted returns the first page.
content_typestringFilter by content type. Omitted returns all content types.
Response
{
  "type": "object",
  "fields": {
    "items": "array of element objects with id, type, created_at, share_url, owner, caption, source, media, and type-specific fields",
    "total_count": "integer total number of matching results",
    "next_page_cursor": "string cursor for fetching the next page, null if no more pages"
  },
  "sample": {
    "data": {
      "items": [
        {
          "id": 2019059012,
          "type": "MediaElementTile",
          "media": {
            "url": "https://cdn.cosmos.so/c39f5bbd-3155-44f8-aadf-2ce88422d7c3",
            "width": 1200,
            "height": 1600,
            "mediaId": "c39f5bbd-3155-44f8-aadf-2ce88422d7c3",
            "blurHash": "00PjAI",
            "__typename": "StaticImage",
            "aiGenerated": false,
            "notSafeForWorkStatus": "SAFE"
          },
          "owner": {
            "username": "papillon",
            "__typename": "UserPublicProfile",
            "verifiedProfile": null,
            "isVerifiedProfile": false
          },
          "source": {
            "url": "https://baukobox.de/projekte/366",
            "author": null,
            "__typename": "ElementSource",
            "isEditable": false,
            "isPublicDomain": false
          },
          "caption": "The facade of the Bestseller Office Complex in Aarhus.",
          "share_url": "https://www.cosmos.so/e/2019059012",
          "created_at": "2024-09-27T16:02:40.934003Z",
          "is_featured": false,
          "multiple_media": []
        }
      ],
      "total_count": 500,
      "next_page_cursor": "cursor://api_gateway/element_search?query=architecture&last=39&count=500"
    },
    "status": "success"
  }
}

About the Cosmos API

What the API Covers

The Cosmos.so API gives programmatic access to a curated database of visual and multimedia elements organized into elements and collections. The three endpoints — search_elements, search_collections, and search_category_images — cover full-text search and category browsing. Each element returned by search_elements includes an id, type (image, video, link, note, or product), created_at timestamp, share_url, caption, source attribution, media URLs, and owner identity fields.

Filtering and Sorting

search_elements accepts a color parameter (hex code without the # prefix, e.g. FF0000) to narrow results by dominant color, a content_type filter to restrict to a single media type, and an order parameter for sort direction. Pagination is cursor-based: pass the next_page_cursor value from one response as page_cursor in the next request. search_collections supports a sort parameter with POPULAR (by followers descending), LARGEST (by element count descending), and a NEW option, plus a configurable page_size between 1 and 100.

Collections and Category Feeds

search_collections returns collection objects with name, slug, cover image, owner details, number_of_elements, and followers_count. search_category_images takes a category slug and an optional keyword string for caption-level filtering. Each result from that endpoint includes image_url, caption, a tags array of named entities extracted from the caption, author username, source_url, and share_url. The total_count field is present across all three endpoints, giving the full result set size before pagination.

Reliability & maintenance

The Cosmos API is a managed, monitored endpoint for cosmos.so — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when cosmos.so changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.

This isn't an official cosmos.so API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.

Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a visual mood-board tool by querying search_elements for a theme keyword and displaying returned media URLs with caption text.
  • Identify trending visual topics by sorting search_collections by POPULAR and surfacing collections with the highest followers_count.
  • Create a color-palette-driven image browser using the color hex filter in search_elements to match brand guidelines.
  • Aggregate source attribution data by extracting the source field from element results for content provenance tracking.
  • Enumerate the content of a specific design category by paginating through search_category_images with a category slug and scanning returned tags arrays.
  • Filter a category feed to a specific concept by passing a keyword to search_category_images for caption-level text matching.
  • Rank collections by size for a visual reference library by sorting search_collections with LARGEST and reading number_of_elements.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 req/min

Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.

Frequently asked questions
Does Cosmos.so have an official developer API?+
Cosmos.so does not publish an official public developer API or documented REST endpoints. This Parse API provides structured access to the Cosmos content database.
What does `search_elements` return beyond the image URL?+
Each element object includes id, type, created_at, share_url, owner identity fields, caption, source attribution, and media URLs. Type-specific fields may also be present depending on whether the element is an image, video, link, note, or product.
Can I retrieve the individual elements inside a collection by collection ID?+
Not currently. The API returns collection metadata — name, slug, cover, owner, number_of_elements, and followers_count — but does not expose an endpoint to list the elements contained within a specific collection. You can fork this API on Parse and revise it to add that endpoint.
How does pagination work across the three endpoints?+
search_elements and search_category_images both return a next_page_cursor string in each response. Pass that value as page_cursor in the next request to get the following page. A null value for next_page_cursor indicates no further pages. search_collections follows the same pattern and additionally accepts a page_size parameter (1–100) to control how many results are returned per call.
Does the API expose user profile data or a user's personal boards?+
Not currently. The API returns owner identity fields attached to elements and collections, but there is no dedicated endpoint for querying a specific user's profile or retrieving all boards belonging to a given account. You can fork this API on Parse and revise it to add a user-profile or user-collections endpoint.
Page content last updated . Spec covers 3 endpoints from cosmos.so.
Related APIs in OtherSee all →
cos.com API
Search and browse COS fashion products by name or category to instantly access pricing, product images, and direct links to items. Retrieve detailed information about specific products including descriptions, availability, and pricing to compare styles and make informed shopping decisions.
pexels.com API
Search and browse millions of free stock photos and videos on Pexels. Access trending content, photographer galleries, photo/video challenges, and search suggestions via a clean API.
elements.envato.com API
Search and browse millions of creative assets from Envato Elements, including stock photos, videos, music, fonts, and templates across all categories. Get detailed information about specific items, pricing plans, and discover new content through keyword search and category browsing.
textures.com API
Search and browse millions of textures by category or keyword to find high-resolution texture maps with detailed pricing and specifications. Discover the latest content additions, explore free samples, and access complete metadata including available resolutions and texture maps for your projects.
images.nasa.gov API
images.nasa.gov API
opensea.io API
Search NFT collections and discover detailed stats, browse individual items, and track collection activity all in one place. Get real-time insights into collection performance and find the NFTs you're looking for on OpenSea.
coloso.global API
Discover and browse Coloso's entire course catalog by searching products, filtering by categories, and viewing details on new releases, best sellers, and free classes. Get insights into promotional events, trending keywords, and personalized recommendations to find the perfect creative courses.
unsplash.com API
Search Unsplash photos by keyword and retrieve image URLs, photographer info, and detailed photo metadata such as tags, EXIF, location, and related collections.