younifyd
Menu

Search with GET

Search with GET

GET/indexes/{index_uid}/search

Use it in a workflow

  1. Add a step and choose the Meilisearch connector.
  2. Pick the Search with GET action (under Search).
  3. Fill in the fields below, then reference the result from later steps as {{searchWithGet.response.data}}.

Request

Path parameters

index_uidstringrequired

Unique identifier of the index.

Query parameters

qstring

Sets the search terms. Meilisearch returns documents that match this query. The query supports [prefix search](https://www.meilisearch.com/docs/learn/engine/prefix) and [typo tolerance](https://www.meilisearch.com/docs/learn/relevancy/typo_tolerance_settings). Meilisearch only considers the first ten words; terms are normalized (lowercase, accents ignored). Omit or leave empty for a placeholder search: no query terms are applied, so Meilisearch returns all searchable documents in the index, ordered by [ranking rules](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules). Enclose terms in double quotes (`"`) for phrase search: only documents containing that exact sequence of words are returned (e.g. `"Winter Feast"`). Use a minus sign (`-`) before a word or phrase to exclude it from results.

offsetinteger

Number of documents to skip at the start of the results. Use together with `limit` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination) (e.g. offset=20 and limit=20 returns results 21–40). This parameter is ignored when `page` or `hitsPerPage` is set; in that case the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`.

Default 0

limitinteger

Maximum number of documents to return in the response. Use with `offset` for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination). This parameter is ignored when `page` or `hitsPerPage` is set. The value cannot exceed the index [maxTotalHits](https://www.meilisearch.com/docs/reference/api/settings/update-pagination#body-max-total-hits-one-of-0) setting.

Default 20

pageinteger

Request a specific results page (1-indexed). Use together with `hitsPerPage`. When this parameter is set, the response includes `totalHits` and `totalPages` instead of `estimatedTotalHits`. `page` and `hitsPerPage` take precedence over `offset` and `limit`.

hitsPerPageinteger

Maximum number of documents per page for [pagination](https://www.meilisearch.com/docs/guides/front_end/pagination). This value determines `totalPages`; use it together with `page`. When set, the response includes `totalHits` and `totalPages`. Set to 0 to obtain the exhaustive `totalHits` count without returning any documents.

attributesToRetrievearray<string>

List of attributes to include in each returned document. Use `["*"]` to return all attributes; if not set, the index [displayed attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list is used. Attributes that are not in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) are omitted from the response.

attributesToCroparray<string>

Attributes whose values should be cropped to a short excerpt. The cropped text appears in each hit's `_formatted` object. Length is controlled by `cropLength`, or you can override it per attribute with the `attribute:length` syntax. Use `["*"]` to crop all attributes in `attributesToRetrieve`. When possible, the crop is centered around the matching terms.

cropLengthinteger

Maximum number of words to include in cropped values. This parameter only applies when `attributesToCrop` is set. Both query terms and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0) count toward this length.

Default 10

cropMarkerstring

String used to mark crop boundaries in cropped text. If null or empty, no markers are inserted. Markers are only added where content was actually removed.

Default "…"

attributesToHighlightarray<string>

Attributes in which matching query terms should be highlighted. The highlighted text appears in each hit's `_formatted` object. Use `["*"]` to highlight in all attributes from `attributesToRetrieve`. By default, matches are wrapped in `<em>` and `</em>`; you can override this with `highlightPreTag` and `highlightPostTag`. Highlighting also applies to [synonyms](https://www.meilisearch.com/docs/learn/relevancy/synonyms) and [stop words](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-stop-words-one-of-0). Supported value types are string, number, array, and object. Note: highlights matches within all listed attributes, even those not in `searchableAttributes`.

highlightPreTagstring

String to insert before each highlighted term. Can be any string (e.g. `<strong>`, `*`). If null or empty, nothing is inserted at the start of a match.

Default "<em>"

highlightPostTagstring

String to insert after each highlighted term. Should be used together with `highlightPreTag` to avoid malformed output (e.g. unclosed HTML tags).

Default "</em>"

showMatchesPositionboolean

When true, each hit includes a `_matchesPosition` object with the byte offset (`start` and `length`) of each matched term. This is useful when you need custom highlighting. Note: reports match positions in all attributes, even non-searchable ones. Positions are measured in bytes, not characters.

filterstring

A [filter](https://www.meilisearch.com/docs/learn/filtering_and_sorting/filter_search_results) expression to narrow results. All attributes used in the expression must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). Pass a string (e.g. `"(genres = horror OR genres = mystery) AND director = 'Jordan Peele'"`). For [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoRadius(lat, lng, distance_in_meters)`, `_geoBoundingBox([lat,lng],[lat,lng])`, or `_geoPolygon([lat,lng], ...)` (GeoJSON only for polygon). GET route accepts a string only; the value must be URL-encoded.

sortstring

Sort results by one or more attributes and their order. Use the format `["attribute:asc", "attribute:desc"]`; only attributes in [sortableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-sortable-attributes-one-of-0) can be used. For [geo search](https://www.meilisearch.com/docs/learn/filtering_and_sorting/geosearch), use `_geoPoint(lat,lng):asc` or `:desc`; the response then includes `_geoDistance` in meters. The first attribute in the list has precedence. See [sorting search results](https://www.meilisearch.com/docs/learn/filtering_and_sorting/sort_search_results).

distinctstring

Return only one document per distinct value of the given attribute (e.g. deduplicate by product_id). The attribute must be in [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). This overrides the index [distinctAttribute](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-distinct-attribute-one-of-0) setting for this request. See [distinct attribute](https://www.meilisearch.com/docs/learn/relevancy/distinct_attribute).

facetsarray<string>

Return the count of matches per facet value for the listed attributes. The response includes `facetDistribution` and, for numeric facets, `facetStats` (min/max). This route also supports patterns, i.e., "title", "dogs.*", "*", which can match over the [filterableAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-filterable-attributes-one-of-0). The number of values returned per facet is limited by the index [maxValuesPerFacet](https://www.meilisearch.com/docs/reference/api/settings/update-faceting#body-max-values-per-facet-one-of-0) setting; attributes not in filterableAttributes are ignored. More info: [faceting](https://www.meilisearch.com/docs/learn/filtering_and_sorting/search_with_facet_filters).

matchingStrategystring

How to match query terms when there are not enough results to satisfy `limit`. **`last`**: Returns documents containing all query terms first. If there are not enough such results, Meilisearch removes one query term at a time, starting from the end of the query (e.g. for "big fat cat", then "big fat", then "big"). **`all`**: Only returns documents that contain all query terms. Meilisearch does not relax the query even if fewer than `limit` documents match. **`frequency`**: Returns documents containing all query terms first. If there are not enough, removes one term at a time starting with the word that is most frequent in the dataset, giving more weight to rarer terms (e.g. in "white cotton shirt", prioritizes documents containing "white" if "shirt" is very common). Default: `last`.

One oflastallfrequency

attributesToSearchOnarray<string>

Restrict the search to the listed attributes only. Each attribute must be in the index [searchable attributes](https://www.meilisearch.com/docs/learn/relevancy/displayed_searchable_attributes) list. The order of attributes in this parameter does not affect relevancy.

rankingScoreThresholdnumber (float)

Stop the search at the first document whose [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score) is below this value (between 0.0 and 1.0). All the documents after this document are excluded from the hits. Excluded hits do not count toward `estimatedTotalHits`, `totalHits`, or facet distribution. When used together with `page` and `hitsPerPage`, this parameter may reduce performance because Meilisearch must score all matching documents.

localesarray<string>

Explicitly specify the language(s) of the query. Pass an array of [supported ISO-639 locales](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-localized-attributes-one-of-0). This overrides auto-detection; use it when auto-detection is wrong for the query or the documents. See also the [localizedAttributes](https://www.meilisearch.com/docs/reference/api/settings/list-all-settings#response-localized-attributes-one-of-0) settings and [Language](https://www.meilisearch.com/docs/learn/resources/language).

hybridEmbedderstring

Name of the embedder for [hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search), which combines keyword and semantic search. Must match an embedder configured in the index settings. Required when `vector` or `hybridSemanticRatio` is set.

hybridSemanticRationumber (float)

Balance between keyword and semantic search: 0.0 means keyword-only results, 1.0 means semantic-only. When `q` is empty and this value is greater than 0, Meilisearch performs a pure semantic search. Requires `hybridEmbedder` when set.

vectorarray<number (float)>

Custom query vector for [vector or hybrid search](https://www.meilisearch.com/docs/learn/ai_powered_search/getting_started_with_ai_search). The array length must match the dimensions of the embedder configured in the index. This parameter is mandatory when using a [user-provided embedder](https://www.meilisearch.com/docs/learn/ai_powered_search/search_with_user_provided_embeddings). When used with `hybrid`, documents are ranked by vector similarity. You can also use it to override an embedder's automatic vector generation.

retrieveVectorsboolean

When true, the response includes document and query embeddings in each hit's `_vectors` field. The `_vectors` field must be listed in [displayedAttributes](https://www.meilisearch.com/docs/reference/api/settings/update-all-settings#body-displayed-attributes-one-of-0) for it to appear.

personalizeUserContextstring

For [personalized search](https://www.meilisearch.com/docs/learn/personalization/making_personalized_search_queries): a string describing the user (e.g. preferences or behavior). Results are then tailored to that profile. Personalization must be [enabled](https://www.meilisearch.com/docs/reference/api/experimental-features/configure-experimental-features) (e.g. Cohere key for self-hosted instances).

useNetworkboolean

When `true`, runs the query on the whole network (all shards covered, documents deduplicated across remotes). When `false` or omitted, the query runs locally. It also requires the `network` [experimental feature](http://localhost:3000/reference/api/experimental-features/configure-experimental-features). Values: `true` = use the whole network; `false` or omitted = local (default). When using the network, the index must exist with compatible settings on all remotes. Documents with the same id are assumed identical for deduplication.

showRankingScoreboolean

When true, each document includes a `_rankingScore` between 0.0 and 1.0; a higher value means the document is more relevant. See [ranking score](https://www.meilisearch.com/docs/learn/relevancy/ranking_score). The `sort` ranking rule does not affect the value of `_rankingScore`.

showRankingScoreDetailsboolean

When true, each document includes `_rankingScoreDetails`, which breaks down the score contribution of each [ranking rule](https://www.meilisearch.com/docs/learn/relevancy/ranking_rules). Useful for debugging relevancy.

showPerformanceDetailsboolean

When true, the response includes a `performanceDetails` object with a timing breakdown of the query processing.

Response

Returns 200 with a any. Read it in later steps with {{searchWithGet.response.data.<field>}}.

Need more? See the Meilisearch guide for connection setup and behaviour shared by every action.

Search with GET — Meilisearch — Documentation