Advanced search
The advanced search feature enables you to search for media assets in your account by specifying a large variety of filtering criteria to help you find assets that meet the design and content needs of your application. To open the advanced search form, click the arrow to the right of the Search bar. As you select search criteria, each one is added to the search bar at the top.
Search tips and guidelines
- You can perform a 'global' search by entering open text in the search bar. In this case, assets with the searched value in fields such as asset name and tags, are included in the results. A Cloudinary master admin can expand the fields that are included in global (open text) searches, by selecting relevant options in the Search section of the Media Library Preferences. For example, structured or embedded metadata fields (such as
exif
andiptc
fields) can be set to be included in these searches. - By default, searches find assets in all folders. To search for results only within a specific folder (and its subfolders), specify the Folder in the Advanced Search General tab.
- You can filter the results you see by selecting the media type: Images, Video & Audio, or Others (Raw), from the Asset type filter, located at the left edge of the Search bar, or select All to include all media types.
- To view all assets, from all folders in your account, in a single display, make sure All is selected in the Asset type filter, keep the Search box empty and click Search.
- If your Cloudinary user is defined as a Media Library user role, you will only see results within folders where you have Can view (or higher) permissions.
- When you select multiple different criteria, they are treated as 'AND' statements, and the results will include only assets that meet all of the different criteria specified. Within an individual criterion that supports multiple values (tags, metadata, predominant colors, etc), entering multiple values is treated as an 'OR' statement within that criterion, so the results will include assets with any of the specified values.
For example:
If you specify bothUpload
andFetched URL
in the Type criteria, results with either of these types are included in the results. But if you specifyUpload
for Type andcats
for Tags, then only assets that meet BOTH of those criteria are included in the results. - You can also search for the prefix (first part) of the entire value or the prefix of any token (distinct element) within a value (where the token is separated by a space, hyphen, or underscore). However, you cannot search for the middle or end of a word or token.
For example, enteringcat
in the main search bar or in a text search field:- Returns assets where the name or one of its attributes has values such as:
cat
,cats
,dogs and cats
,1-cat
,dog_cat
. - Will not return assets with values such as
scat
orscatter
, because in these cases, the searched term is not a prefix of either the entire value or of a token (distinct element).
- Returns assets where the name or one of its attributes has values such as:
- In fields where you can select between equal to and contains, selecting contains follows the clarifications above, meaning it will find assets where the value you specified is a prefix of any of the tokens in the whole value. But also in this case, it will not find assets where the value you specified comes in the middle or end of the value. Equal to will search only assets where the value you specified is the entire value.
- If you need to perform a more complex search or with different AND or OR rules than described above, you can paste a search expression into the Search bar using the Search API expression syntax. Examples:
- Find assets with a name that starts with 2019 (but not assets that contain
2019
in another token within the name):filename=2019*
(The equal sign forces exact search rather than searching within any token, while the asterisk indicates any number of characters after the defined string) - Find all image assets with a width between 800 and 1028 pixels, a 16:9 aspect ratio, and that has BOTH 'sale' and 'shoe' as tag values (where
sale
must be an exact tag value, whileshoe
can match any token within a tag value (dress-shoe
as a tag will match):
resource_type=image AND width:{800 TO 1028} AND aspect_ratio="16:9" AND tags="sale" AND tags:"shoe"
- Find assets with a name that starts with 2019 (but not assets that contain
Advanced Search tabs
The Advanced Search form contains several tabs with a variety of search criteria. You can select criteria from all tabs for your search.
- All of the search capabilities available in these tabs (and more), are also available for developers via the Search API.
- By default, the Media Library Search capabilities (and corresponding Search API methods) are enabled only for accounts with up to 10 million assets. If your account already has, or is approaching 10 million assets, contact support.
- The Image Analysis search capabilities are a premium feature. If these capabilities are not activated for your account, the tab is not available.
General
This tab enables a search based on basic criteria such as delivery type, time, asset tags, and the folder where the asset is stored.
The Time criterion can be based on the date when it was: created (first uploaded to Cloudinary), uploaded (most recently uploaded), or taken (as per the asset's Exif data).
When you specify a Folder, the results will be for any matching asset in the selected folder or any of its subfolders.
Metadata
The Metadata tab enables you to search by custom metadata, including both structured and contextual metadata.
You can include as many metadata fields as you like in your search. Each time you specify a metadata field to search for, an additional empty field gets added to that section so that you can specify another field.
- When searching for contextual metadata, enter the full expected value for each field.
- When searching for structured metadata, your searches can include value conditions such as 'equals, less than' or 'greater than' for numbers, 'contains' for text values, or 'is', 'before' or 'after' for dates.
All contextual metadata for an asset is stored as a single data entry for that asset, while the individual fields of structured metadata are stored as separate data entries for that asset. Therefore:
- If you enter multiple contextual metadata fields in a search, they are considered multiple values of a single OR search condition. In the Contextual metadata search image above, your search results would include any assets that have campaign =
ABC
OR discount_code =blue
OR aaa =aaa
. If you enter multiple structured metadata fields in a search, they are considered separate AND search conditions. However, if you enter more than one value WITHIN a multi-select field when searching, those are treated as OR conditions. In the Structured metadata search image above, your search results would include only assets where Product ID is less than
12345
AND Publish Date is beforeAug 1, 2019
AND Categories contains eitherShoes
ORGifts
.For more details on Advanced Search AND | OR rules and other general search rules, see Search guidelines above.
- If you enter multiple contextual metadata fields in a search, they are considered multiple values of a single OR search condition. In the Contextual metadata search image above, your search results would include any assets that have campaign =
Format & Size
Use this tab to add search criteria such as file format, file size, resolution, and orientation.
- Landscape orientation finds assets with aspect ratios wider than 1:1, but less than 2:1.
- Panorama orientation finds assets with aspect ratios that are at least 2:1
Image Analysis (Premium feature)
Search for images based on advanced image analysis including the style of the image, the predominant colors of the image, the number of faces (as determined by Cloudinary's built-in face detection algorithm), or the location of a photo. These criteria are valuable for helping you search for assets that will fit design or content requirements. If this tab is not available in your Advanced Search, contact us for information on upgrading your account to include Tier 2 search capabilities.