Discover/21st API
live

21st API21st.dev

Browse and filter UI components from the 21st.dev community marketplace. Returns component name, author, URL, CLI install command, and description.

This API takes change requests — .
Endpoint health
verified 3h ago
list_components
1/1 passing latest checkself-healing
Endpoints
1
Updated
3h ago

What is the 21st API?

The 21st.dev API provides a single endpoint, list_components, that returns up to 200 UI components from the 21st.dev community marketplace in one call, with 5 response fields per component including the CLI install command and direct component URL. Filter results by tag slugs like input, search-bar, or search to narrow down the component type you need, and check total_count to see how many matching components exist in the catalog.

This call costs3 credits / call— charged only on success
Try it
Maximum number of components to return. Clamped to 1-200.
Comma-separated list of tag slugs to filter components by. Common tag slugs include: input, search-bar, search-input, search, prompt, prompt-input, ai-prompt, ai-chat-input, chat-input, number-input, pin-input, date-input, file-input, tag-input, clearable-input.
api.parse.bot/scraper/ba9096ec-d34e-467f-9eae-770f58b08ac4/<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 GET 'https://api.parse.bot/scraper/ba9096ec-d34e-467f-9eae-770f58b08ac4/list_components?limit=10&tag_slugs=input%2Csearch-bar%2Csearch-input%2Cprompt%2Cprompt-input%2Cai-chat-input%2Cchat-input' \
  -H 'X-API-Key: $PARSE_API_KEY'
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 21st-dev-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.

"""Walkthrough: discover UI components on 21st.dev by tag slug."""
from parse_apis.api_21st_dev_api import TwentyFirstDev, InputFormatInvalid

client = TwentyFirstDev()

# Browse recommended input components (default tags), capped at 5 results.
for component in client.components.list(limit=5):
    print(component.name, "-", component.author)
    print(" ", component.description[:90])
    print("  Install:", component.install_command)

# Narrow to search-bar components specifically.
try:
    result = client.components.list(tag_slugs="search-bar", limit=1).first()
except InputFormatInvalid as e:
    print("Invalid tag_slugs filter:", e.message)
    result = None

if result is not None:
    print("\nFeatured search bar:", result.name)
    print("  URL:", result.url)

print("\nexercised: components.list")
All endpoints · 1 totalmissing one? ·

List UI components from the 21st.dev community marketplace filtered by tag slugs. Returns component metadata including name, author, direct URL, CLI install command, and description. Results are sorted by the site's recommendation algorithm. Useful for discovering input components, search bars, chat inputs, prompt containers, and other UI elements. The default tag_slugs cover input bars, search boxes, and prompt containers.

Input
ParamTypeDescription
limitintegerMaximum number of components to return. Clamped to 1-200.
tag_slugsstringComma-separated list of tag slugs to filter components by. Common tag slugs include: input, search-bar, search-input, search, prompt, prompt-input, ai-prompt, ai-chat-input, chat-input, number-input, pin-input, date-input, file-input, tag-input, clearable-input.
Response
{
  "type": "object",
  "fields": {
    "has_more": "boolean indicating if more results exist beyond the limit",
    "tag_slugs": "array of tag slug strings that were used for filtering",
    "components": "array of component objects with component_name, author, component_url, install_command, and description",
    "total_count": "integer total number of matching components available"
  },
  "sample": {
    "has_more": false,
    "tag_slugs": [
      "input",
      "search-bar",
      "search-input",
      "prompt",
      "prompt-input",
      "ai-chat-input",
      "chat-input"
    ],
    "components": [
      {
        "author": "preetsuthar17",
        "description": "An international phone input component with country selection, smart validation, country-specific placeholders, and visual feedback for global phone numbers.",
        "component_url": "https://21st.dev/@preetsuthar17/components/phone-input",
        "component_name": "Phone Input",
        "install_command": "npx @21st-dev/cli add preetsuthar17/phone-input"
      },
      {
        "author": "easemize",
        "description": "A modular, single-file React input bar designed for generative AI interfaces and agentic chat workloads, built on the shadcn/ui and Tailwind CSS architecture.",
        "component_url": "https://21st.dev/@easemize/components/ai-chat-input",
        "component_name": "Ai chat input",
        "install_command": "npx @21st-dev/cli add easemize/ai-chat-input"
      }
    ],
    "total_count": 287
  }
}

About the 21st API

What the API Returns

The list_components endpoint returns an array of component objects from the 21st.dev community marketplace. Each object includes component_name, author, component_url, install_command, and description. The install_command field is ready to paste directly into a terminal. Results are ordered by 21st.dev's own recommendation algorithm, so index position reflects the site's ranking, not alphabetical or recency order.

Filtering by Tag Slugs

The tag_slugs parameter accepts a comma-separated list of slugs. Known working values include input, search-bar, and search. The response echoes back the tag_slugs array that was applied, so you can confirm which filters were active. The has_more boolean tells you whether additional results exist beyond the requested limit, and total_count gives the full number of matching components regardless of limit.

Pagination and Limits

The limit parameter is clamped between 1 and 200. There is no offset or cursor parameter — the endpoint returns the top N results for the given filter. If has_more is true and you need all results, increasing limit toward 200 is the only way to capture more components in a single call.

Reliability & maintenanceVerified

The 21st API is a managed, monitored endpoint for 21st.dev — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when 21st.dev 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 21st.dev 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.

Last verified
3h ago
Latest check
1/1 endpoint passing
Maintenance
Monitored & self-healing
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 component discovery tool that filters 21st.dev results by tag slug and surfaces the install_command for one-click copying
  • Generate a curated component catalog page by pulling component_name, author, and component_url for a given tag
  • Automate dependency audits by listing all input or search components available and comparing against ones already in use
  • Populate a design system reference doc with description and component_url fields pulled for a specific tag
  • Track how many components match a tag slug over time using total_count to monitor marketplace growth
  • Find authored components from a specific contributor by filtering results by author after fetching from a relevant tag slug
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 21st.dev have an official developer API?+
21st.dev does not currently publish a documented public developer API for their marketplace.
What does the `install_command` field contain?+
It contains the CLI command string needed to install the component, as shown on the 21st.dev site. You can present this directly to users or pipe it into automation without further transformation.
Can I paginate through all components or retrieve components by a specific author?+
Not currently. The list_components endpoint supports tag-based filtering and a limit up to 200, but does not expose an offset, cursor, or author filter parameter. You can fork this API on Parse and revise it to add an author filter or pagination support.
Does the API return component source code or preview images?+
No. The response covers metadata: component_name, author, component_url, install_command, and description. Source code and preview images are not included. You can fork this API on Parse and revise it to add a detail endpoint that fetches those fields from the component's URL.
How current is the component data?+
Results reflect the state of the 21st.dev community marketplace at the time of the request. Newly published components should appear once they are indexed by the marketplace. There is no published_at or updated_at field in the response to confirm freshness of individual entries.
Page content last updated . Spec covers 1 endpoint from 21st.dev.
Related APIs in Developer ToolsSee all →
reactbits.dev API
Browse and search React component libraries from React Bits, then instantly retrieve component source code, installation commands, and prop definitions. Get organized access to all available components and their categories to speed up your development workflow.
shadcnregistry.com API
Search and discover shadcn/ui components across multiple registries. View detailed component information including source code and installation commands, browse component types and creators, bulk retrieve entire component collections, or inspect external registries by URL.
componentsearchengine.com API
Search for electronic components and access detailed specifications including pricing, datasheets, and 3D models from a comprehensive component database. Browse top trending components, retrieve in-depth metadata, and integrate real-time component information into your sourcing and design workflows.
parsepad.com API
Access data from parsepad.com.
toolify.ai API
Search and browse premium .ai domain names available on the Toolify marketplace, filtering by keywords, categories, prices, and domain attributes to find the perfect domain for your project. Explore curated domain listings organized by category to discover valuable .ai domains suited to your needs.
chatgpt.com API
Access data from chatgpt.com.
agent.ai API
Search and discover AI agents in the Agent.ai marketplace by filtering through categories and tags, then view detailed agent information and builder profiles. Find the perfect AI solution for your needs by browsing available agents, exploring builder credentials, and comparing agent capabilities across different categories.
comc.com API
Search and browse sports card listings from COMC's marketplace to find specific cards, compare prices, and discover available trading cards for sale. Filter through thousands of collectible card offerings to locate rare items and track inventory across the platform.