---
title: "Search for artifacts by content"
method: POST
path: "/search/artifacts"
tags: ["Search", "Artifacts"]
---

# Search for artifacts by content

`POST /search/artifacts`

## Request

- The document declares no server URL.
- Auth: none declared

Returns a paginated list of all artifacts with at least one version that matches the
posted content.

## Query parameters

- `canonical` boolean
- `artifactType` string
- `offset` integer
- `limit` integer
- `order` 'asc' | 'desc'
- `orderby` 'name' | 'createdOn'

## Request body `*/*`

- string, binary

## Response `200`

On a successful response, returns a result set of artifacts - one for each artifact
in the registry that matches the criteria.

- ArtifactSearchResults: Describes the response received when searching for artifacts.
  - `artifacts` SearchedArtifact[], required: The artifacts returned in the result set.
    - `id` string, required: The ID of a single artifact.
    - `name` string
    - `description` string
    - `createdOn` string, date-time, required
    - `createdBy` string, required
    - `type` string, required
    - `labels` string[]
    - `state` 'ENABLED' | 'DISABLED' | 'DEPRECATED', required: Describes the state of an artifact or artifact version. The following states are possible: * ENABLED * DISABLED * DEPRECATED
    - `modifiedOn` string, date-time
    - `modifiedBy` string
    - `groupId` string: An ID of a single artifact group.
  - `count` integer, required: The total number of artifacts that matched the query that produced the result set (may be more than the number of artifacts in the result set).

## Other responses

- `401`: Common response for all operations that can return a `401` error indicating authentication is required.
- `403`: Common response for all operations that can return a `403` error indicating the user is authenticated but not authorized.
- `500`: Common response for all operations that can fail with an unexpected server error.

## Changes

> 65 revisions in range; 1 not diffed.

- **2022-11-24** (v2) `29b79a1c2c74`: 10 breaking, 10 info
  - removed the enum value `ASYNCAPI` from the `query` request parameter `artifactType`
  - removed the enum value `AVRO` from the `query` request parameter `artifactType`
  - removed the enum value `GRAPHQL` from the `query` request parameter `artifactType`
  - removed the enum value `JSON` from the `query` request parameter `artifactType`
  - …16 more
- **2021-03-25** (v2) `e26e4a280eb6`: 1 breaking, 1 info
  - removed the enum value `PROTOBUF_FD` from the `query` request parameter `artifactType`
  - removed the `PROTOBUF_FD` enum value from the `artifacts/items/type` response property for the response status `200`
- **2021-03-03** (v2) `ece570c4317f`: 2 info
  - added the new optional `query` request parameter `artifactType`
  - added the new optional `query` request parameter `canonical`

[Operation history](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v2/changes/search/artifacts/post.md)

---

[API](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v2.md) - [All operations](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v2/llms.txt) - [OpenAPI document](https://skmtc.dev/apicurio/apis/apicurio-registry-api-v2/revisions/8c48f413fa1f?raw)
