# Search images


[API catalog](/reference/api/) · [Docker Engine overview](/reference/api/engine/version/v1.57/) · [Product manual](https://docs.docker.com/engine/) · [OpenAPI specification](/reference/api/engine/version/v1.57.yaml)

API version: 1.57





`GET /images/search`

Search for an image on Docker Hub.

## Connection and access

[API connection and authentication guidance](/reference/api/engine/version/v1.57/#connection)


Server: `/v1.57`

Effective security: alternatives are OR; schemes within an alternative are AND. An empty array declares no HTTP authentication requirement.

```json
null
```

## Example request

Replace placeholders and provide the required credentials or request body.

```console
curl \
  --request GET \
  --unix-socket "${DOCKER_SOCKET:-/var/run/docker.sock}" \
  --header 'Accept: application/json' \
  'http://localhost/v1.57/images/search?term=%3CTERM%3E'
```



## Parameters

### term

Location: query. Required: yes.

Term to search

```json
{
  "description": "Term to search",
  "in": "query",
  "name": "term",
  "pointer": "/paths/~1images~1search/get/parameters/0",
  "required": true,
  "schema": {
    "type": "string"
  }
}
```

### limit

Location: query. Required: no.

Maximum number of results to return

```json
{
  "description": "Maximum number of results to return",
  "in": "query",
  "name": "limit",
  "pointer": "/paths/~1images~1search/get/parameters/1",
  "schema": {
    "type": "integer"
  }
}
```

### filters

Location: query. Required: no.

A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:

- `is-official=(true|false)`
- `stars=<number>` Matches images that has at least 'number' stars.


```json
{
  "description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:\n\n- `is-official=(true|false)`\n- `stars=\u003cnumber\u003e` Matches images that has at least 'number' stars.\n",
  "in": "query",
  "name": "filters",
  "pointer": "/paths/~1images~1search/get/parameters/2",
  "schema": {
    "type": "string"
  }
}
```

## Request and responses

### Response 200 application/json

No error


Schema:

```json
{
  "items": {
    "properties": {
      "description": {
        "type": "string"
      },
      "is_automated": {
        "description": "Whether this repository has automated builds enabled.\n\n\u003cp\u003e\u003cbr /\u003e\u003c/p\u003e\n\n\u003e **Deprecated**: This field is deprecated and will always be \"false\".\n",
        "example": false,
        "type": "boolean"
      },
      "is_official": {
        "type": "boolean"
      },
      "name": {
        "type": "string"
      },
      "star_count": {
        "type": "integer"
      }
    },
    "title": "ImageSearchResponseItem",
    "type": "object"
  },
  "type": "array"
}
```









Example:
```json
[
  {
    "description": "A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!",
    "is_automated": false,
    "is_official": true,
    "name": "alpine",
    "star_count": 10093
  },
  {
    "description": "Busybox base image.",
    "is_automated": false,
    "is_official": true,
    "name": "Busybox base image.",
    "star_count": 3037
  },
  {
    "description": "The PostgreSQL object-relational database system provides reliability and data integrity.",
    "is_automated": false,
    "is_official": true,
    "name": "postgres",
    "star_count": 12408
  }
]
```


### Response 500 application/json

Server error


Schema:

```json
{
  "$ref": "#/components/schemas/ErrorResponse"
}
```









Schema example:
```json
{
  "message": "Something went wrong."
}
```


## Complete operation contract

```json
{
  "description": "Search for an image on Docker Hub.",
  "operationId": "ImageSearch",
  "parameters": [
    {
      "description": "Term to search",
      "in": "query",
      "name": "term",
      "required": true,
      "schema": {
        "type": "string"
      }
    },
    {
      "description": "Maximum number of results to return",
      "in": "query",
      "name": "limit",
      "schema": {
        "type": "integer"
      }
    },
    {
      "description": "A JSON encoded value of the filters (a `map[string][]string`) to process on the images list. Available filters:\n\n- `is-official=(true|false)`\n- `stars=\u003cnumber\u003e` Matches images that has at least 'number' stars.\n",
      "in": "query",
      "name": "filters",
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "content": {
        "application/json": {
          "example": [
            {
              "description": "A minimal Docker image based on Alpine Linux with a complete package index and only 5 MB in size!",
              "is_automated": false,
              "is_official": true,
              "name": "alpine",
              "star_count": 10093
            },
            {
              "description": "Busybox base image.",
              "is_automated": false,
              "is_official": true,
              "name": "Busybox base image.",
              "star_count": 3037
            },
            {
              "description": "The PostgreSQL object-relational database system provides reliability and data integrity.",
              "is_automated": false,
              "is_official": true,
              "name": "postgres",
              "star_count": 12408
            }
          ],
          "schema": {
            "items": {
              "properties": {
                "description": {
                  "type": "string"
                },
                "is_automated": {
                  "description": "Whether this repository has automated builds enabled.\n\n\u003cp\u003e\u003cbr /\u003e\u003c/p\u003e\n\n\u003e **Deprecated**: This field is deprecated and will always be \"false\".\n",
                  "example": false,
                  "type": "boolean"
                },
                "is_official": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "star_count": {
                  "type": "integer"
                }
              },
              "title": "ImageSearchResponseItem",
              "type": "object"
            },
            "type": "array"
          }
        }
      },
      "description": "No error"
    },
    "500": {
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ErrorResponse"
          }
        }
      },
      "description": "Server error"
    }
  },
  "summary": "Search images",
  "tags": [
    "Image"
  ]
}
```

## Referenced schemas

- [#/components/schemas/ErrorResponse](/reference/api/engine/version/v1.57/schemas/ErrorResponse/)




