Cloudinary

Search

Endpoints and supported behavior.

Guide →

Only the following expression subset is supported. Unsupported syntax or fields return HTTP 400 INVALID_EXPRESSION; compatible errors contain only the message. Tags and context are omitted by default; request them with with_field.

SyntaxMeaning
AND / OR / NOT / - / ( )Boolean combinations; adjacent terms imply AND
field:value / field=valueField match
bytes > 1000 / width >= 160Numeric comparisons; also height and duration
created_at >= 2026-01-01 / uploaded_at > 7dDates or relative time, d/w/m/y
tags:docs / context.alt:"sample image"Tags and custom text
public_id:docs*Trailing wildcard only
"sample image"Phrase
sunsetBare word: full-text match over public_id, display_name, tags, context, and understood captions, image text, and transcripts; case-insensitive
~ / ^ / [a TO z] / prefix / abUnsupported; returns 400

Field names are case-insensitive (RESOURCE_TYPE:image equals resource_type:image). Values of resource_type, type, and format are case-insensitive; values of tags, context, and other fields are case-sensitive. An empty expression returns every asset; an expression that cannot be parsed returns 400 INVALID_EXPRESSION.

Queryable fields: asset_id, resource_type, type, format, public_id, asset_folder, display_name, tags, bytes, width, height, duration, created_at, uploaded_at, context.<key>.

Sort fields: created_at, public_id, display_name, bytes, uploaded_at.

Aggregate fields: resource_type, format, asset_folder, processing_state. Guide →

Base URL and authentication

GET /cloudinary/v1_1/{library_id}/resources/visual_search

ParameterLocationTypeDescription
library_idpathstringLibrary ID
image_asset_idquerystringAsset ID in this library
image_urlquerystringOnly delivery URLs from this library; external URLs are not fetched
textquerystringNatural-language query using semantic search
max_resultsqueryintegerUp to 500; Search defaults to 100, Admin to 10
filterquerystringExpression filter

Returns: VisualResources.

Available when library search.image is true; unsupported libraries return LIBRARY_INVALID_STATE. JPEG, PNG, WebP and GIF are accepted, with a maximum decoded size of 10 MiB. Each asset returns its highest-scoring match; videos identify the best frame. qwen3-vl-embedding uses 0.35 for image similarity. Measurements on 2026-10-10: variants of the same image scored 0.82–0.96, similar scenes 0.38–0.66, and unrelated images at most 0.34.

Provide exactly one of image_asset_id, multipart image_file, image_url, or text. Text uses semantic-only search; the response is { "resources": [...] }. image_url accepts only this library’s delivery URLs. External URLs are never fetched and return 400 with “不支持抓取外部 URL”.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
resourcesarray<object>
resources[].asset_idstring
resources[].public_idstring
resources[].display_namestring
resources[].asset_folderstring
resources[].resource_typestring
resources[].typestring
resources[].formatstring
resources[].versionnumber
resources[].version_idstring
resources[].bytesnumber
resources[].etagstring
resources[].widthnumber
resources[].heightnumber
resources[].durationnumber
resources[].pagesnumber
resources[].is_audioboolean
resources[].original_filenamestring
resources[].tagsarray<string>
resources[].contextobject
resources[].created_atstring
resources[].urlstring
resources[].secure_urlstring
resources[].placeholderboolean
resources[].existingboolean
resources[].processingobject

Visual search

POST /cloudinary/v1_1/{library_id}/resources/visual_search

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Request body

FieldTypeRequiredDescription
image_asset_idstringnoAsset ID in this library
image_urlstringnoOnly delivery URLs from this library; external URLs are not fetched
image_filestringnoJPEG, PNG, WebP or GIF file, at most 10 MiB
textstringnoNatural-language query using semantic search
max_resultsintegernoUp to 500; Search defaults to 100, Admin to 10
filterstringnoExpression filter

Returns: VisualResources.

Available when library search.image is true; unsupported libraries return LIBRARY_INVALID_STATE. JPEG, PNG, WebP and GIF are accepted, with a maximum decoded size of 10 MiB. Each asset returns its highest-scoring match; videos identify the best frame. qwen3-vl-embedding uses 0.35 for image similarity. Measurements on 2026-10-10: variants of the same image scored 0.82–0.96, similar scenes 0.38–0.66, and unrelated images at most 0.34.

Provide exactly one of image_asset_id, multipart image_file, image_url, or text. Text uses semantic-only search; the response is { "resources": [...] }. image_url accepts only this library’s delivery URLs. External URLs are never fetched and return 400 with “不支持抓取外部 URL”.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
resourcesarray<object>
resources[].asset_idstring
resources[].public_idstring
resources[].display_namestring
resources[].asset_folderstring
resources[].resource_typestring
resources[].typestring
resources[].formatstring
resources[].versionnumber
resources[].version_idstring
resources[].bytesnumber
resources[].etagstring
resources[].widthnumber
resources[].heightnumber
resources[].durationnumber
resources[].pagesnumber
resources[].is_audioboolean
resources[].original_filenamestring
resources[].tagsarray<string>
resources[].contextobject
resources[].created_atstring
resources[].urlstring
resources[].secure_urlstring
resources[].placeholderboolean
resources[].existingboolean
resources[].processingobject

GET /cloudinary/v1_1/{library_id}/resources/search

ParameterLocationTypeDescription
library_idpathstringLibrary ID
expressionquerystringStructured query expression; an empty expression returns every asset
sort_byquerystringSort fields and directions
max_resultsqueryintegerUp to 500; Search defaults to 100, Admin to 10
next_cursorquerystringNext-page cursor; null or absent at the end
with_fieldquerystring[]Include tags or context
aggregatequerystring[]Aggregation fields

Returns: CompatExpressionSearchResult.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
total_countnumber
timenumber
next_cursorstring
resourcesarray<object>
resources[].asset_idstring
resources[].public_idstring
resources[].display_namestring
resources[].asset_folderstring
resources[].resource_typestring
resources[].typestring
resources[].formatstring
resources[].versionnumber
resources[].version_idstring
resources[].bytesnumber
resources[].etagstring
resources[].widthnumber
resources[].heightnumber
resources[].durationnumber
resources[].pagesnumber
resources[].is_audioboolean
resources[].original_filenamestring
resources[].tagsarray<string>
resources[].contextobject
resources[].created_atstring
resources[].urlstring
resources[].secure_urlstring
resources[].placeholderboolean
resources[].existingboolean
resources[].processingobject
aggregationsobject
curl -X GET "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/resources/search?expression=tags%3Adocs" \
  -H "Authorization: Bearer $PRAXIS_API_KEY"

HTTP 200

{
  "total_count": 1,
  "time": 0,
  "resources": [
    {
      "asset_id": "9339cdae93804c0c8c65d5189ef1f646",
      "public_id": "docs/pixel",
      "display_name": "Sample image",
      "asset_folder": "examples",
      "resource_type": "image",
      "type": "upload",
      "format": "png",
      "version": 1791538418,
      "version_id": "35848c1529994e338e7aa634a1c13d9c",
      "bytes": 70,
      "etag": "b357a19c87624c7c4d131aeeb4ae677f",
      "width": 1,
      "height": 1,
      "original_filename": "file",
      "created_at": "2026-10-09T09:33:38.899Z",
      "url": "https://media-develop.praxisusercontent.com/lib_77374d4ee73b4ae79c4aa430f3ba3885/image/upload/v1791538418/docs/pixel.png",
      "secure_url": "https://media-develop.praxisusercontent.com/lib_77374d4ee73b4ae79c4aa430f3ba3885/image/upload/v1791538418/docs/pixel.png",
      "placeholder": false
    }
  ]
}

Search

POST /cloudinary/v1_1/{library_id}/resources/search

ParameterLocationTypeDescription
library_idpathstringLibrary ID

Request body

FieldTypeRequiredDescription
expressionstringnoStructured query expression; an empty expression returns every asset
sort_byobject[]noSort fields and directions
max_resultsintegernoUp to 500; Search defaults to 100, Admin to 10
next_cursorstringnoNext-page cursor; null or absent at the end
with_field"tags" / "context"[]noInclude tags or context
aggregateAggregateField[]noAggregation fields

Returns: CompatExpressionSearchResult.

Response

HTTP 200

Successful response.

application/json

NameTypeDescription
total_countnumber
timenumber
next_cursorstring
resourcesarray<object>
resources[].asset_idstring
resources[].public_idstring
resources[].display_namestring
resources[].asset_folderstring
resources[].resource_typestring
resources[].typestring
resources[].formatstring
resources[].versionnumber
resources[].version_idstring
resources[].bytesnumber
resources[].etagstring
resources[].widthnumber
resources[].heightnumber
resources[].durationnumber
resources[].pagesnumber
resources[].is_audioboolean
resources[].original_filenamestring
resources[].tagsarray<string>
resources[].contextobject
resources[].created_atstring
resources[].urlstring
resources[].secure_urlstring
resources[].placeholderboolean
resources[].existingboolean
resources[].processingobject
aggregationsobject
curl -X POST "https://api.deepraxis.ai/cloudinary/v1_1/${LIBRARY_ID}/resources/search" \
  -H "Authorization: Bearer $PRAXIS_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{"expression":"tags:docs"}'

HTTP 200

{
  "total_count": 2,
  "time": 0,
  "resources": [
    {
      "asset_id": "9dfa312ef9bc4b00816339b598b1152c",
      "public_id": "walk-lib-r1-MDP-1791733789929-tagged",
      "display_name": "walk-lib-r1-MDP-1791733789929-tagged",
      "asset_folder": "",
      "resource_type": "image",
      "type": "upload",
      "format": "png",
      "version": 1791733815,
      "version_id": "26cb8171caa5431b8373ad417fd71e32",
      "bytes": 70,
      "etag": "b357a19c87624c7c4d131aeeb4ae677f",
      "width": 1,
      "height": 1,
      "original_filename": "file",
      "processing": {
        "state": "processing",
        "kinds": {
          "embedding": "running",
          "visual": "failed",
          "tagging": "failed"
        },
        "updated_at": "2026-10-11T15:50:21.512Z"
      },
      "created_at": "2026-10-11T15:50:15.996Z",
      "url": "https://media-develop.praxisusercontent.com/lib_d3881a2f54a34cd79121b9d659e8378c/image/upload/v1791733815/walk-lib-r1-MDP-1791733789929-tagged.png",
      "secure_url": "https://media-develop.praxisusercontent.com/lib_d3881a2f54a34cd79121b9d659e8378c/image/upload/v1791733815/walk-lib-r1-MDP-1791733789929-tagged.png",
      "placeholder": false
    },
    {
      "asset_id": "85b7ef616a8b4719a41777a036ebc1d2",
      "public_id": "walk-lib-r1-MDP-1791733789929-plain",
      "display_name": "walk-lib-r1-MDP-1791733789929-plain",
      "asset_folder": "",
      "resource_type": "image",
      "type": "upload",
      "format": "png",
      "version": 1791733810,
      "version_id": "fdf3c8cd40c2424d86e8397425a69857",
      "bytes": 70,
      "etag": "b357a19c87624c7c4d131aeeb4ae677f",
      "width": 1,
      "height": 1,
      "original_filename": "file",
      "created_at": "2026-10-11T15:50:10.842Z",
      "url": "https://media-develop.praxisusercontent.com/lib_d3881a2f54a34cd79121b9d659e8378c/image/upload/v1791733810/walk-lib-r1-MDP-1791733789929-plain.png",
      "secure_url": "https://media-develop.praxisusercontent.com/lib_d3881a2f54a34cd79121b9d659e8378c/image/upload/v1791733810/walk-lib-r1-MDP-1791733789929-plain.png",
      "placeholder": false
    }
  ]
}

VisualResources

FieldTypeRequiredDescription
resourcesCloudinaryResource[]yesAssets in this page

CompatExpressionSearchResult

FieldTypeRequiredDescription
total_countnumberyesMatching count
timenumberyesSearch time in whole milliseconds, measured by the service
next_cursorstringnoNext-page cursor; null or absent at the end
resourcesSearchResource[]yesAssets in this page
aggregationsobjectnoCounts by requested fields

SearchResource

FieldTypeRequiredDescription
asset_idAssetIdyesAsset ID
public_idstringyesAsset name in delivery URLs; may contain path segments
display_namestringyesDisplay name
asset_folderstringyesOrganizational folder; does not change public_id. Listing by it matches that level only, not subfolders; an empty string is the root
resource_typeResourceTypeyesimage, video (including audio), or raw; auto applies to uploads only, and listing with auto or any other value returns 400
typeDeliveryTypeyesResource or event type
formatstringyesFile format
versionnumberyesDelivery version
version_idstringyesVersion identifier
bytesnumberyesFile size in bytes
etagstringyesFile checksum
widthnumbernoWidth in pixels
heightnumbernoHeight in pixels
durationnumbernoDuration in seconds
pagesnumbernoDocument pages
is_audiobooleannoWhether this is audio
original_filenamestringnoOriginal file name
tagsstring[]noAsset tags. Uploads accept a comma-separated string (items trimmed, empty items dropped), an array, or repeated tags fields; PATCH accepts an array only and replaces the whole list
contextobjectnoCustom text key/value pairs; PATCH replaces the whole map, {} clears it
created_atIsoTimestampyesCreation time
urlstringyesOriginal-file URL
secure_urlstringyesHTTPS delivery URL
placeholderfalseyesAlways false
existingbooleannoWhether an existing asset was returned without overwrite
processingProcessingnoOverall and per-kind processing states
Export

On this page