---
title: "POST /search/query"
method: POST
path: "/search/query"
---

# POST /search/query

`POST /search/query`

Get data using search.

## Query parameters

- `api-version` string, required

## Request body

- QueryOptions — The search query of advanced search request.
  - `keywords` string — The keywords applied to all searchable fields.
  - `limit` integer — The limit of the number of the search result. default value is 50; maximum value is 1000.
  - `continuationToken` string — The token used to get next batch of data. Default 'Null' to get the first batch, and will return new token in each response unless there's no more data.
  - `orderby` unknown[] — The sort order of search results, can specify multiple fields.
    - unknown
  - `filter` unknown
  - `facets` SearchFacetItem[] — The facets for search. See examples for the usage of supported facets.
    - `count` integer — The count of the facet item.
    - `facet` string — The name of the facet item.
    - `sort` SearchFacetSort — The sorting criteria
      - `count` 'asc' | 'desc' — Search sort order
      - `value` 'asc' | 'desc' — Search sort order
  - `taxonomySetting` SearchTaxonomySetting — Taxonomy setting for search request
    - `assetTypes` string[] — Asset types
    - `facet` SearchFacetItem — The content of a search facet result item.
      - `count` integer — The count of the facet item.
      - `facet` string — The name of the facet item.
      - `sort` SearchFacetSort — The sorting criteria
        - `count` 'asc' | 'desc' — Search sort order
        - `value` 'asc' | 'desc' — Search sort order

## Response `200`

The request has succeeded.

- QueryResult — The result of the search result.
  - `@search.count` integer — The total number of search results (not the number of documents in a single page).
  - `@search.count.approximate` boolean — 'True' if the '@search.count' is an approximate value and vise versa.
  - `continuationToken` string — The token used to get next batch of data. Absent if there's no more data.
  - `@search.facets` SearchFacetResultValue — A facet list that consists of index fields assetType ,classification, contactId, and label. When the facet is specified in the request, the value of the facet is returned as an element of @search.facets.
    - `entityType` SearchFacetItemValue[] — Entity type
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `assetType` SearchFacetItemValue[] — Asset type
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `classification` SearchFacetItemValue[] — Classification
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `term` SearchFacetItemValue[] — Term
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `contactId` SearchFacetItemValue[] — Contact id
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `contactType` SearchFacetItemValue[] — Contact type
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `label` SearchFacetItemValue[] — Label
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `glossaryType` SearchFacetItemValue[] — Glossary type
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `termStatus` SearchFacetItemValue[] — Term status
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
    - `termTemplate` SearchFacetItemValue[] — Term template
      - `count` integer — The count of the facet item.
      - `value` string — The name of the facet item.
  - `value` SearchResultValue[] — Search result value
    - `@search.score` number, float — The search score calculated by the search engine. The results are ordered by search score by default.
    - `@search.highlights` SearchHighlights — A highlight list that consists of index fields id ,qualifiedName, name, description, entityType. When the keyword appears in those fields, the value of the field, attached with emphasis mark, is returned as an element of @search.highlights.
      - `id` string[] — Id
      - `qualifiedName` string[] — Qualified name
      - `name` string[] — Name
      - `description` string[] — Description
      - `entityType` string[] — Entity type
    - `objectType` string — The object type of the record. Object type is the top-level property to distinguish whether a record is an asset or a term.
    - `createTime` integer — The create time of the record. The Unix epoch format.
    - `updateTime` integer — The last update time of the record. The Unix epoch format.
    - `id` string — The GUID of the record.
    - `name` string — The name of the record.
    - `qualifiedName` string — The qualified name of the record.
    - `entityType` string — The type name of the asset.
    - `description` string — The description of the asset.
    - `endorsement` string[] — The endorsement of the asset.
    - `owner` string — The owner of the record.
    - `classification` string[] — The classifications of the record.
    - `label` string[] — The labels of the asset.
    - `term` TermSearchResultValue[] — The terms assigned to the asset.
      - `name` string — The name of the term.
      - `glossaryName` string — The name of the glossary which contains the term.
      - `guid` string — The GUID of the term.
    - `contact` ContactSearchResultValue[] — The contacts of the asset.
      - `id` string — The GUID of the contact.
      - `info` string — The description of the contact.
      - `contactType` string — The type of the contact. It can be Expert or Owner for an entity. It can be Expert or Steward for a glossary term.
    - `assetType` string[] — The asset types of the asset.
    - `glossaryType` string — The type name of the term. Could be AtlasGlossary, AtlasGlossaryTerm or AtlasGlossaryCategory.
    - `glossary` string — The glossary name of the term.
    - `termStatus` string — The status of the term.
    - `termTemplate` string[] — The term template names used by the term.
    - `longDescription` string — The definition of the term.

## Other responses

- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/purview-datamap.md) · [All operations](https://skmtc.net/azure/apis/purview-datamap/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/purview-datamap/versions/442226cb14a9/schema)
