Search a specific object type
https://am-api.contentstack.com/api/{object_type}/searchThe 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
{
"limit": 20,
"search_field": "all",
"search_terms_operator": "and",
"search_text": "brand logo"
}{}