Craft Documents icon

Craft Documents

Interact with Craft Multi-Document API - manage documents, blocks, collections, and search

Search → Search Across Documents

AI-generated

Summary

Search using plain text or regular expression patterns across multiple Craft documents, returning the top 20 results ranked by relevance.

Inputs

  • Search Type (required) — Choose whether to search by plain text terms or by RE2-compatible regular expression patterns.
  • Search Terms (required) — The plain text terms to include in the search query (used if Search Type is Plain Text).
  • Regex Pattern (required) — The RE2-compatible regex pattern to search for (used if Search Type is Regular Expression).
  • Filter by Documents — Toggle to restrict search to specific documents.
  • Document IDs — Comma-separated or JSON array of document IDs to include or exclude from the search, depending on Filter Mode.
  • Filter Mode — Specify whether to include only the listed documents or to exclude them from the search when filtering by documents.
  • Additional Options.Fetch Metadata — Include lastModifiedAt and createdAt metadata in the search results.

Output shape

a list of up to 20 search results ranked by relevance

Search returns the top 20 matches. Filtering by documents is optional. Results optionally include metadata if requested. Error responses include details if API request fails.

Links

Discussion