---
title: "Search query"
method: GET
path: "/6/{hashid}/_search"
tags: ["Search"]
---

# Search query

`GET /6/{hashid}/_search`

Search through indexed items of a search engine.

## Path parameters

- `hashid` string, required

## Query parameters

- `auto_filters` boolean
- `custom_results` boolean
- `excluded_results` boolean
- `exclude` string
- `facets` object
- `filter` string
- `filter_execution` 'and' | 'or'
- `grouping` boolean
- `with_variants` string[]
- `indices` string[]
- `page` integer
- `query` string
- `query_name` 'match_and' | 'match_or' | 'fuzzy'
- `rpp` integer
- `session_id` string — Identifier of search session
- `user_id` string — Identifier of user
- `stats` boolean
- `skip_auto_filters` string[]
- `skip_top_facet` string[]
- `sort` string
- `title_facet` boolean
- `top_facet` boolean

## Response `200`

OK

- SearchResponse — Search response. Some fields can not be included in the request if they have not data.
  - `banner` BannerResponse — Banner response for a query search.
    - `blank` boolean — Display the banner link in a new window.
    - `html_code` string — Html code to be used as banner instead of an image.
    - `id` integer — Banner identification.
    - `image` string — Image URL used as banner.
    - `link` string — URL to be redirected when click over banner.
    - `mobile_image` string — Image URL used as banner for mobile devices.
  - `count` integer — Total number of items found in the search engine for the searched term.
  - `custom_results_id` integer — Id of applied custom results. This field will not be included if none of the custom results apply.
  - `dynamic_boosting_rule_id` integer — Id of applied dynamic boosting rule. This field will not be included if none of the dynamic boosting rules apply.
  - `facets` union[] — Information about different groupings that can be made for certain fields in the search results.
    - union
      - TermFacetResponse — Facet terms search response. Used to aggregate a field by their values.
        - `key` string — Name of the aggregated field.
        - `terms` object — Facet terms list
          - `items` object[]
            - `count` integer — Number of elements
            - `name` string — Name of the term
          - `selected` object[] — Items that are selected as part of a filter.
            - `count` integer — Number of elements
            - `name` string — Name of the term
      - RangeFacetResponse — Facet range search response. Used to return the min and max values for the aggregated field.
        - `key` string — Name of the aggregated field.
        - `range` object
          - `from` number — Selected start point of the range.
          - `max` number — Maximum value of the field.
          - `min` number — Minimum value of the field.
          - `to` number — Selected end point of the range.
  - `query_name` string — In order to get the best possible results, Doofinder tries several types of querying. This is the type of the query Doofinder made to obtain these results.
  - `results` Item[]
    - `description` string — Item description.
    - `dfid` string, required — Doofinder result doofinder id. It comes in every Doofinder results for every item.
    - `id` string, required — Unique identification of an indexed item.
    - `image_url` string — Item image url.
    - `title` string, required — Item title.
    - `url` string — Item url.
  - `total` integer — Total number of items that can be fetched.

## Other responses

- `400` — Bad Request — invalid query parameters (invalid rpp, page, query_name, sort, filter_execution, session_id, or user_id).
- `403` — Forbidden — missing or invalid API token, client IP is blocked, or CORS `Origin` not allowed.
- `404` — Not Found — search engine mapping does not exist.

---

[API](https://skmtc.dev/doofinder/apis/recommendations-api.md) · [All operations](https://skmtc.dev/doofinder/apis/recommendations-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/doofinder/recommendations-api/revisions/50dc63ab0921/schema)
