Cloudinary Search API

APIs for searching resources using text and visual search capabilities

GitHub OpenAPI

Operations 2

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /v1_1/{cloud_name}/resources/search Search assets by field values · Provides a powerful query interface to filter and retrieve assets and their… #
Ask an LLM
“How do I find all images tagged with a certain keyword?”
“Can I sort my assets by upload date or width?”
Tell an agent
Search {cloud_name} assets for {expression}.
Find {cloud_name} assets matching {expression} sorted by {sort_by}.
POST /v1_1/{cloud_name}/resources/visual_search Find assets by visual similarity · Finds images in your asset library based on visual similarity or content #
Ask an LLM
“How do I find images visually similar to a given photo?”
“Can I upload an image or describe it to find similar assets?”
Tell an agent
Find images in {cloud_name} visually similar to this image.
Search {cloud_name} for assets matching a visual description.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cloudinary:cloudinary-search-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cloudinary-search-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Cloudinary Search API
  version: 0.7.10
  contact:
    name: Cloudinary Support
    email: support@cloudinary.com
    url: https://support.cloudinary.com
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  termsOfService: https://cloudinary.com/tou
  description: 'Operations tagged search across 3 of this provider''s published API definitions: cloudinary-api-schema.yml, cloudinary-asset-management-openapi.yml, cloudinary-platform-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{region}.cloudinary.com
  description: Regional API endpoints for optimal performance.
  variables:
    region:
      default: api
      description: Regional endpoint selection
      enum:
      - api
      - api-eu
      - api-ap
- url: https://{host}
  description: Custom domains for enterprise deployments.
  variables:
    host:
      default: api.cloudinary.com
      description: API host domain.
security:
- basicAuth: []
- oauth2:
  - asset_management
  - upload
  - media_generation
tags:
- name: Search
  description: APIs for searching resources using text and visual search capabilities
paths:
  /v1_1/{cloud_name}/resources/search:
    parameters:
    - $ref: '#/components/parameters/cloud_name'
    post:
      operationId: searchAssets
      summary: Provides a powerful query interface to filter and retrieve assets and their…
      description: 'Returns a list of resources matching the specified search criteria.


        Uses a Lucene-like query language to filter assets by descriptive attributes (`public_id`, `asset_id`, `filename`, `display_name`, `folder` / `asset_folder`, `tags`, `context.`), file details (`resource_type`, `type`, `format`, `bytes`, `width`, `height`, `duration`, `pages`, `aspect_ratio`, `transparent`, `grayscale`), lifecycle dates (`uploaded_at`, `created_at`, `taken_at`, `updated_at`, `last_updated.`), moderation and lifecycle state (`status`, `moderation_status`, `moderation_kind`), embedded data (`image_metadata.*`), structured metadata (`metadata.`), and analysis fields (`face_count`, `colors`, `quality_score`, `illustration_score`, `accessibility_analysis.*`). Supports sorting, aggregate counts, and complex boolean expressions.


        Examples: `tags:shirt AND uploaded_at>1d`, `resource_type:image AND bytes>1000000`, `folder:products OR context.category:electronics`. See the search expressions guide for the full syntax and field reference.'
      tags:
      - Search
      x-speakeasy-mcp:
        name: search-assets
        scopes:
        - librarian
        title: Search Assets
        readOnlyHint: true
        idempotentHint: true
      requestBody:
        description: The search query parameters.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/search_parameters'
      responses:
        '200':
          description: Successful search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/search_response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
    servers:
    - url: https://{region}.cloudinary.com
      description: Regional API endpoints for optimal performance.
      variables:
        region:
          default: api
          description: Regional endpoint selection
          enum:
          - api
          - api-eu
          - api-ap
    - url: https://{host}
      description: Custom domains for enterprise deployments.
      variables:
        host:
          default: api.cloudinary.com
          description: API host domain.
  /v1_1/{cloud_name}/resources/visual_search:
    parameters:
    - $ref: '#/components/parameters/cloud_name'
    post:
      operationId: visualSearchAssets
      summary: Finds images in your asset library based on visual similarity or content
      description: 'Returns a list of resources that are visually similar to a specified image. You can provide the source image for comparison in one of three ways:

        - Provide a URL of an image

        - Specify the asset ID of an existing image

        - Provide a textual description'
      tags:
      - Search
      x-speakeasy-mcp:
        name: visual-search-assets
        scopes:
        - librarian
        title: Visual Search Assets
        readOnlyHint: true
        idempotentHint: true
      requestBody:
        description: The visual search parameters.
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/visual_search_parameters'
      responses:
        '200':
          description: Successful visual search response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/search_response'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/api_error'
    servers:
    - url: https://{region}.cloudinary.com
      description: Regional API endpoints for optimal performance.
      variables:
        region:
          default: api
          description: Regional endpoint selection
          enum:
          - api
          - api-eu
          - api-ap
    - url: https://{host}
      description: Custom domains for enterprise deployments.
      variables:
        host:
          default: api.cloudinary.com
          description: API host domain.
components:
  schemas:
    access_control:
      type: array
      description: 'Restricts access to the asset by specifying one or more access types.

        The asset is restricted unless at least one listed access type is valid.

        '
      items:
        $ref: '#/components/schemas/access_control_item'
      example:
      - access_type: token
        key: prod2024
      - access_type: anonymous
        start: '2024-03-15T09:00:00Z'
        end: '2024-06-30T23:59:59Z'
    api_error:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
          - message
      required:
      - error
    direction_enum:
      type: string
      enum:
      - asc
      - desc
      description: Sort direction.
    asset_delivery_type:
      type: string
      enum:
      - asset
      description: Static asset delivery type.
    access_control_item:
      type: object
      description: Access control rule that defines when and how the asset can be accessed.
      required:
      - access_type
      properties:
        access_type:
          type: string
          enum:
          - token
          - anonymous
          description: The type of access control to apply to the asset.
        key:
          type: string
          pattern: ^[a-zA-Z0-9]+$
          description: The authentication key identifier for token-based access. Default key is used if not specified or if set to 'default'.
          example: prod2024
        start:
          oneOf:
          - type: string
          - type: integer
          description: The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp.
          example: '2024-03-15T09:00:00Z'
        end:
          oneOf:
          - type: string
          - type: integer
          description: The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp.
          example: '2024-06-30T23:59:59Z'
    context_response:
      type:
      - object
      - 'null'
      additionalProperties:
        type: string
      description: Contextual metadata as flat key-value pairs.
    managed_delivery_type:
      type: string
      enum:
      - upload
      - private
      - authenticated
      description: Managed delivery types for assets uploaded and stored by Cloudinary.
    generated_delivery_type:
      type: string
      enum:
      - multi
      - sprite
      - text
      - list
      description: Delivery types for assets generated by Cloudinary operations.
    search_response:
      type: object
      description: The response object returned by search operations.
      properties:
        total_count:
          type: integer
          description: The total number of resources matching the search criteria.
          example: 42
        time:
          type: integer
          description: The time taken to execute the search query in milliseconds.
          example: 42
        resources:
          type: array
          description: The list of resources matching the search criteria. Can be empty if no results found.
          items:
            type: object
            description: Resource fields that can be returned. All fields are optional and can be filtered using the fields parameter.
            properties:
              asset_id:
                type: string
                description: The unique identifier of the asset.
                example: 09169cf604b03521789d1b3b8cca53d1
              public_id:
                type: string
                description: The public identifier that is used to build the URL.
                example: blue_sweater
              asset_folder:
                type: string
                description: The folder where the asset is stored.
                example: Clothing Sale
              filename:
                type: string
                description: The original filename of the asset.
                example: blue_sweater
              display_name:
                type: string
                description: The display name of the asset.
                example: blue_sweater
              format:
                type:
                - string
                - 'null'
                description: The format of the asset. Null for raw assets, which have no format.
                example: jpg
              version:
                type: integer
                description: The version number of the asset.
                example: 1719316754
              resource_type:
                type: string
                description: The type of resource.
                enum:
                - image
                - video
                - raw
                example: image
              type:
                $ref: '#/components/schemas/delivery_type_all'
              created_at:
                type: string
                format: date-time
                description: The timestamp when the asset was created.
                example: '2024-06-25T11:59:14+00:00'
              uploaded_at:
                type: string
                format: date-time
                description: The timestamp when the asset was uploaded.
                example: '2024-06-25T11:59:14+00:00'
              bytes:
                type: integer
                description: The size of the asset in bytes.
                example: 71063
              backup_bytes:
                type: integer
                description: The size of the backup asset in bytes.
                example: 71063
              width:
                type:
                - integer
                - 'null'
                description: The width of the asset in pixels. Null for non-visual assets (e.g. raw, audio).
                example: 4800
              height:
                type:
                - integer
                - 'null'
                description: The height of the asset in pixels. Null for non-visual assets (e.g. raw, audio).
                example: 6400
              aspect_ratio:
                type:
                - number
                - 'null'
                format: float
                description: The aspect ratio of the asset (width/height). Null for non-visual assets (e.g. raw, audio).
                example: 0.75
              pixels:
                type:
                - integer
                - 'null'
                description: The total number of pixels in the asset. Null for non-visual assets (e.g. raw, audio).
                example: 307200
              url:
                type: string
                format: uri
                description: The HTTP URL for accessing the asset.
                example: http://res.cloudinary.com/demo/image/upload/v1719316754/blue_sweater.jpg
              secure_url:
                type: string
                format: uri
                description: The HTTPS URL for accessing the asset.
                example: https://res.cloudinary.com/demo/image/upload/v1719316754/blue_sweater.jpg
              status:
                type: string
                description: The current status of the asset.
                enum:
                - active
                - inactive
                - deleted
                - pending
                example: active
              access_mode:
                type:
                - string
                - 'null'
                description: The access mode of the asset. Null when not explicitly set.
                enum:
                - public
                - authenticated
                - null
                example: public
              access_control:
                anyOf:
                - $ref: '#/components/schemas/access_control'
                - type: 'null'
                description: The access control settings for the asset.
                example: null
              etag:
                type: string
                description: The ETag of the asset.
                example: 7242da7b353e7da2c3eb8c006165b385
              created_by:
                type:
                - object
                - 'null'
                description: Information about who created the asset.
                properties:
                  access_key:
                    type: string
                    description: The access key of the user who created the asset.
                    example: '614335564976464'
              uploaded_by:
                type:
                - object
                - 'null'
                description: Information about who uploaded the asset.
                properties:
                  access_key:
                    type: string
                    description: The access key of the user who uploaded the asset.
                    example: '614335564976464'
              context:
                allOf:
                - $ref: '#/components/schemas/context_response'
                description: Custom context metadata associated with the asset.
              tags:
                allOf:
                - $ref: '#/components/schemas/tags_response'
                description: Tags associated with the asset.
              image_metadata:
                type:
                - object
                - 'null'
                description: Technical metadata extracted from the image.
              image_analysis:
                type:
                - object
                - 'null'
                description: Results of image analysis.
              metadata:
                type:
                - object
                - 'null'
                description: Structured metadata associated with the asset.
              quality_analysis:
                type:
                - object
                - 'null'
                description: Results of quality analysis.
              accessibility_analysis:
                type:
                - object
                - 'null'
                description: Results of accessibility analysis.
        next_cursor:
          type:
          - string
          - 'null'
          description: A cursor for pagination. Only included when there are more results available.
          example: e4d03a236b27e306e56719f74d05cdef
        aggregations:
          type: object
          description: Aggregation results when the aggregate parameter is used in the request. Only included when aggregations are requested.
          properties:
            values:
              type: array
              description: Array of aggregation values when using simple aggregation (e.g., by format, resource_type, etc.)
              items:
                type: object
                properties:
                  value:
                    type: string
                    description: The value being aggregated
                    example: jpg
                  count:
                    type: integer
                    description: The count of resources with this value
                    example: 42
            ranges:
              type: array
              description: Array of range-based aggregation results when using range aggregation (e.g., bytes, width, height, etc.)
              items:
                type: object
                properties:
                  from:
                    type: number
                    description: Start of the range (inclusive)
                    example: 0
                  to:
                    type: number
                    description: End of the range (exclusive)
                    example: 1048576
                  count:
                    type: integer
                    description: The count of resources within this range
                    example: 17
    search_sort_by:
      type: array
      items:
        $ref: '#/components/schemas/search_sort_pair'
      description: 'An array of single-key objects mapping a field to a sort direction. Each object must contain exactly one field name mapped to ''asc'' or ''desc''.

        Default: [{"created_at": "desc"}].

        '
      example:
      - created_at: desc
      - public_id: asc
    fetch_delivery_type:
      type: string
      enum:
      - fetch
      - url2png
      description: Fetch-based delivery types for assets retrieved from remote URLs.
    social_delivery_type:
      type: string
      enum:
      - facebook
      - twitter
      - twitter_name
      - instagram
      - instagram_name
      - gravatar
      - youtube
      - hulu
      - vimeo
      - animoto
      - dailymotion
      - worldstarhiphop
      description: Delivery types for assets fetched from third-party platforms.
    delivery_type_all:
      anyOf:
      - $ref: '#/components/schemas/managed_delivery_type'
      - $ref: '#/components/schemas/asset_delivery_type'
      - $ref: '#/components/schemas/fetch_delivery_type'
      - $ref: '#/components/schemas/social_delivery_type'
      - $ref: '#/components/schemas/generated_delivery_type'
      - type: string
        enum:
        - media_optimization
      description: All supported delivery types.
    visual_search_parameters:
      description: Parameters for visual search operations
      oneOf:
      - type: object
        additionalProperties: false
        required:
        - image_url
        properties:
          image_url:
            type: string
            format: uri
            description: The URL of an image to use as the source for finding visually similar images
            example: https://res.cloudinary.com/demo/image/upload/sample.jpg
          threshold:
            type: number
            minimum: 0
            maximum: 1
            description: The minimum similarity score (between 0 and 1.0) that a resource must have to be included in the response
            example: 0.8
      - type: object
        additionalProperties: false
        required:
        - image_asset_id
        properties:
          image_asset_id:
            type: string
            description: The asset ID of an existing image to use as the source for finding visually similar images
            example: 09169cf604b03521789d1b3b8cca53d1
          threshold:
            type: number
            minimum: 0
            maximum: 1
            description: The minimum similarity score (between 0 and 1.0) that a resource must have to be included in the response
            example: 0.8
      - type: object
        additionalProperties: false
        required:
        - text
        properties:
          text:
            type: string
            description: A textual description to find visually similar images
            example: shirts
          threshold:
            type: number
            minimum: 0
            maximum: 1
            description: The minimum similarity score (between 0 and 1.0) that a resource must have to be included in the response
            example: 0.8
    search_parameters:
      type: object
      description: Common parameters for resource search operations.
      properties:
        expression:
          type: string
          description: 'The Lucene-like search expression. Supports token match (`field:value`), exact match (`field=value`), trailing `*` for prefix match, ranges (`[a TO b]`, `{a TO b}`), and comparisons (`>`, `<`, `>=`, `<=`). Combine terms with uppercase `AND`, `OR`, `NOT`, or `+`/`-`, and group with parentheses. Wrap values containing reserved characters (spaces, colons, etc.) in double quotes. See the [search expressions guide](https://cloudinary.com/documentation/search_expressions.md) for the full syntax and supported fields.

            '
          example: resource_type:image AND tags:kitten
          examples:
          - tags:shirt AND uploaded_at>1d
          - resource_type:image AND bytes>1000000 AND (format:png OR format:jpg)
          - folder:products AND context.category:electronics
          - tags:"service:mantels" AND -tags:discontinued
        sort_by:
          $ref: '#/components/schemas/search_sort_by'
        max_results:
          type: integer
          minimum: 0
          maximum: 500
          description: 'The maximum number of results to return. Default - 50. Maximum - 500.

            Set to `0` to get only `total_count` and `aggregations` without any resources in the response — useful for counting or aggregation-only queries.

            '
          example: 30
        next_cursor:
          type: string
          description: The cursor value to get the next page of results. Available when a previous search returned more results than max_results.
        aggregate:
          description: 'Fields or ranges to aggregate search results by. Requires a Tier 2 search plan; on Tier 1 the field is accepted but aggregations are omitted from the response.

            '
          oneOf:
          - type: array
            items:
              type: string
              enum:
              - format
              - resource_type
              - type
            description: The fields to aggregate results by. Simple aggregation by field name.
            example:
            - format
            - resource_type
          - type: array
            items:
              type: object
              properties:
                type:
                  type: string
                  enum:
                  - bytes
                  - image_pixels
                  - video_pixels
                  - duration
                ranges:
                  type: array
                  description: 'One or more ranges for the numeric field. Each range must include a `key` label and at least one of `from` / `to`.

                    '
                  items:
                    type: object
                    properties:
                      key:
                        type: string
                        minLength: 1
                        maxLength: 20
                        pattern: ^[a-zA-Z0-9_-]+$
                        description: A label for the bucket, returned in the aggregation response. 1–20 chars, alphanumeric plus `-` and `_`.
                        example: small
                      from:
                        type: number
                        description: Start of the range (inclusive). At least one of `from` / `to` is required.
                      to:
                        type: number
                        description: End of the range (exclusive). At least one of `from` / `to` is required.
                    required:
                    - key
              required:
              - type
              - ranges
            description: Range-based aggregations for numeric fields
            example:
            - type: bytes
              ranges:
              - key: small
                from: 0
                to: 10000
              - key: medium
                from: 10000
                to: 100000
        with_field:
          type: array
          items:
            type: string
            enum:
            - context
            - tags
            - image_metadata
            - image_analysis
            - metadata
            - quality_analysis
            - accessibility_analysis
            x-enum-descriptions:
            - Includes the `context` key-value pairs attached to each asset.
            - Includes the list of `tags` attached to each asset.
            - Includes embedded metadata extracted from the asset file (EXIF, IPTC, XMP under `image_metadata`). Tier 2 feature.
            - Includes analysis results such as `colors`, `face_count`, `illustration_score`, and `grayscale` under `image_analysis`. Tier 2 feature.
            - Includes values of structured metadata fields under `metadata`. Tier 2 feature.
            - Includes `quality_analysis.*` scores for assets analyzed at upload time.
            - Includes `accessibility_analysis.*` scores for assets analyzed at upload time.
          description: 'The additional asset attributes to include in each search result. The `fields` parameter takes precedence over this parameter. `image_metadata`, `image_analysis`, and `metadata` require a Tier 2 search plan.

            '
          example:
          - tags
          - context
        fields:
          type: string
          description: 'A comma-separated list of fields to include in the response.

            Notes:

            - This parameter takes precedence over the with_field parameter, so if you want any additional asset attributes returned, make sure to also include them in this list (e.g., tags or context).

            - The following fields are always included in the response: public_id, asset_id, asset_folder, created_at, status, type, and resource_type.

            '
          example: tags,context,metadata
    tags_response:
      type:
      - array
      - 'null'
      items:
        type: string
      description: Tag names assigned to the asset.
    search_sort_pair:
      type: object
      additionalProperties:
        $ref: '#/components/schemas/direction_enum'
      minProperties: 1
      maxProperties: 1
      description: A single field-to-direction mapping. The object must contain exactly one key with value 'asc' or 'desc'.
  parameters:
    cloud_name:
      name: cloud_name
      in: path
      required: true
      schema:
        type: string
      description: The cloud name of your product environment.
      example: my_cloud
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: Basic authentication using Cloudinary API Key and API Secret.
    oauth2:
      type: oauth2
      description: OAuth2 Authorization Code flow for user authentication
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.cloudinary.com/oauth2/auth
          tokenUrl: https://oauth.cloudinary.com/oauth2/token
          scopes:
            asset_management: Allows managing assets, including reading, updating, and deleting.
            upload: Allows uploading new assets.
            media_generation: Generate media
x-refined-from:
- cloudinary-api-schema.yml
- cloudinary-asset-management-openapi.yml
- cloudinary-platform-openapi.yml