Is AI recommending you? Ask Contentstack Canoe for free
Is AI recommending your brand? Find out with Contentstack Canoe for free
Contentstack.comAcademyLogin
CS-log-dark.svgCS-log-dark.svg
  • Changelog
  • APIs
  • SDKs

Platform

  • Solution Center
  • Marketplace
  • Changelog
  • Developers & IT
  • Business users
  • Digital leaders
  • Developer Fast Track
  • Plans & Pricing

Solutions

  • Retail
  • Travel and tourism
  • Financial services
  • Technology
  • Manufacturing
  • E-commerce
  • Localization
  • Personalization
  • Portals and knowledge bases

Resources

  • Academy
  • Docs
  • Contentstack for Developers
  • Product updates
  • Contentstack on Contentstack
  • Blog
  • Insights and analyst reports
  • The Forrester Wave™: Digital Experience Platforms, Q4 2025
  • Webinars
  • Podcasts
  • Glossary
  • Content generative library
  • Community
  • Headless CMS
  • Composable AXP
  • Personalization
  • CDP

Customers

  • Case Studies
  • Customer Care
  • Contentstack Experience Awards
  • Customer support

Partners

  • Overview
  • Find a partner
  • Login

Company

  • About us
  • News
  • Customer support portal
  • Contact

Social

  • Facebook
  • LinkedIn
  • Instagram
  • GitHub
  • YouTube
  • Discord
  • X
LegalTermsPrivacyTrust Center

Cookie settings

Copyright © 2026 Contentstack Inc. All rights reserved.
/
  1. Home
  2. APIs
  3. Assets API
  4. Search

Search

markdownView as Markdown

Search assets, folders, and other objects.

Search a specific object type

POSThttps://am-api.contentstack.com/api/{object_type}/search

The Search a specific object type request searches within one object type, such as assets or asset_types, using a query payload. Folders are not searchable here: use include_folders on the list endpoints instead.

Control text matching with search_text, the term to look for. Restrict it to a single field with search_field, which accepts all, title, name, url, or category, and choose how multiple terms combine with search_terms_operator, which accepts and or or.

For conditions that text alone cannot express, send query instead. It takes nested $and and $or clauses, so you can combine several conditions in one request.

Shape the results with asc or desc, each taking a field name to sort by, page through them with limit and skip, and trim the payload to the keys you need with fields.

Narrow the scope with spaces to search only specific spaces, or with contextual_locale and contextual_fallback_locales for locale-aware results.

Deleted items are excluded by default. Pass include_deleted_items to add them alongside live items, filter_only_deleted_items to return nothing else, or include_deleted_workspace to reach items whose workspace was deleted.

To avoid follow-up requests, set include_user_details or include_asset_type_schema and the related records arrive inline.

Restrict to titles and sort by newest:

{
  "desc": "created_at",
  "limit": 50,
  "search_field": "title",
  "search_text": "campaign",
  "skip": 0
}

undefined

Structured filter instead of text:

{
  "limit": 25,
  "query": {
    "$and": [
      {
        "$or": [
          {
            "category": "image"
          },
          {
            "category": "video"
          }
        ]
      }
    ]
  }
}

undefined

Restrict to specific spaces and trim the payload:

{
  "fields": [
    "uid",
    "title",
    "url"
  ],
  "search_text": "q4",
  "spaces": [
    "amaa28fea7d7447e71"
  ]
}

undefined

Only deleted items, for a restore workflow:

{
  "filter_only_deleted_items": true,
  "include_deleted_workspace": true,
  "search_text": "invoice"
}

undefined

Locale-aware search with fallbacks:

{
  "contextual_fallback_locales": [
    "en-us"
  ],
  "contextual_locale": "de-de",
  "search_text": "weihnachten"
}

undefined

Include user details and the asset type schema inline:

{
  "include_asset_type_schema": true,
  "include_user_details": true,
  "search_text": "hero"
}

undefined

Sample Request
123456
{
  "limit": 20,
  "search_field": "all",
  "search_terms_operator": "and",
  "search_text": "brand logo"
}
Sample Response
Status|200 OK
1
{}
Hide Parameters

URL Parameters

object_typerequiredstring

Enter the type of object to search. Folders are not supported here; use include_folders on the relevant list endpoints to retrieve folders.

Query Parameters

save_recent_searchoptionalstring

Set to true to save this query to the user's recent searches.

project_uidoptionalstring

Enter the uid of the project to scope the search to a specific project.

context_uidoptionalstring

Enter the uid of the context in which the search runs.

Headers

authorizationoptionalstring

OAuth access token authentication. Pass the token in the authorization header as Bearer . This header takes an OAuth access token. It does not take a management token, and management tokens are not supported by this API.

Authentication is required. Every request must carry either this header or the authtoken header; a request with neither is rejected.

authtokenoptionalstring

Contentstack authtoken authentication. Pass your Contentstack authtoken in the authtoken header.

This is your authtoken, not your stack api_key and not a management token. OpenAPI classifies any credential sent in a header as an API key, which is why some documentation viewers label this scheme apiKey. That label refers to the transport, not to a Contentstack API key.

Authentication is required. Every request must carry either this header or the authorization header; a request with neither is rejected.

x-cs-api-versionrequiredstring

Enter the Assets API version. Default is 4.

organization_uidoptionalstring

REQUIRED when using authtoken authentication. You must explicitly provide this header. It is optional with Authorization Bearer token authentication, where the organization_uid is derived from the token.