OpenSearch icon

OpenSearch

Consume the OpenSearch API

Document → Get Many

AI-generated

Summary

Retrieve documents from a required OpenSearch index, optionally applying an OpenSearch Query DSL query and search options. Return up to the configured limit or all matching hits, with simplified hit data by default.

Inputs

  • Index ID (required) — ID of the index to retrieve documents from.
  • Return All — When enabled, fetch all hits; otherwise, return up to Limit (default 50). Fetching more than 10,000 hits requires Sort unless Use Scroll is enabled.
  • Limit — Maximum number of hits when Return All is disabled; defaults to 50.
  • Simplify — Defaults to true. Simplified output includes each hit's _id and _source fields; disable to return the raw hit objects.
  • Options — Optional search settings, including a Query DSL JSON object, sort, source field filters, routing, and other OpenSearch search parameters. Use Scroll and Scroll Time to paginate with the scroll API when Return All is enabled.

Output shape

A list of n8n items, one per matching document hit.

With Simplify enabled, each item's JSON contains _id and the hit's _source fields. With Simplify disabled, each item's JSON is the raw OpenSearch hit. An empty Query option retrieves documents without a query filter. Return All without Scroll uses the normal search request unless Sort is set, in which case it paginates with a point-in-time search; its pagination is capped at 10,000 hits otherwise.

Links

Discussion