{"items":[{"type":"link","label":"Search","link":"/docs/realm/customization/search-api/openapi","routeSlug":"/docs/realm/customization/search-api/openapi","content":{"contentType":"overview","meta":{"name":"Search"},"children":[{"nodeType":"container","panels":[{"title":"Download OpenAPI description","titleTranslationKey":"download.description.title","children":[{"kind":"download","label":"openapi.json","url":"/_bundle/docs/realm/customization/search-api/openapi.json?download"},{"kind":"download","label":"openapi.yaml","url":"/_bundle/docs/realm/customization/search-api/openapi.yaml?download"}]},{"title":"Overview","titleTranslationKey":"info.title","children":[{"kind":"externallink","title":"License","titleTranslationKey":"info.license","label":"Redocly","url":"https://redocly.com/subscription-agreement"},{"kind":"externallink","label":"Terms of Service","labelTranslationKey":"info.termsOfService","url":"https://redocly.com/subscription-agreement"}]},{"title":"Languages","titleTranslationKey":"languages.title","children":[{"kind":"languages","options":[{"key":"curl","title":"curl","lang":"curl"},{"key":"javascript","title":"JavaScript","lang":"JavaScript"},{"key":"node","title":"Node.js","lang":"Node.js"},{"key":"python","title":"Python","lang":"Python"},{"key":"java","title":"Java","lang":"Java"},{"key":"csharp","title":"C#","lang":"C#"},{"key":"php","title":"PHP","lang":"PHP"},{"key":"go","title":"Go","lang":"Go"},{"key":"ruby","title":"Ruby","lang":"Ruby"},{"key":"r","title":"R","lang":"R"},{"key":"payload","title":"Payload","lang":"Payload"}]}]},{"title":"Servers","titleTranslationKey":"servers.title","children":[{"kind":"servers","servers":[{"url":"/_mock/docs/realm/customization/search-api/openapi","description":"Mock server","isMockServer":true},{"url":"https://{projectUrl}","description":"Project server","variables":{"projectUrl":{"default":"redocly.com","description":"Project URL (prepend your path prefix if applicable)."}}}],"mode":"default"}]}],"children":[{"nodeType":"overview-section-wrapper","children":[{"nodeType":"header","level":1,"label":"Search (1.0.0)","showPageActions":true},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Query your project's documentation and API reference content from external tools, scripts, or integrations (for example, MCP servers or custom search UIs)."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"strong","inline":true,"attributes":{"marker":"**"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Path prefix:"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" If your project is deployed with a path prefix (for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"https://docs.example.com/docs/"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), prepend that prefix to the API paths (for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"/docs/_search"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]},{"$$mdtype":"Node","type":"tag","tag":"admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"For path prefix configuration, see "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/realm/reunite/project/custom-domain#serve-from-a-subdirectory"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"custom domain configuration"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}],"sectionId":"/docs/realm/customization/search-api/openapi"}],"sectionId":"/docs/realm/customization/search-api/openapi"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/authentication"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Authentication"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"This API uses the same authentication as the project. Public projects (when "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"access.requiresLogin"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is not set or is "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"false"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"), don't require authentication when you call the API."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If the project is protected, ("},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"access.requiresLogin: true"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" or has "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/realm/access/rbac"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"RBAC"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" configuration), you must send the same cookie-based session that the browser uses after users logs in."},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"The API does not support API keys or bearer tokens; authentication is session (cookie) only. For unauthenticated requests to protected projects, both endpoints return empty results instead of errors."},"children":[]}]}]},{"$$mdtype":"Node","type":"tag","tag":"admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"To learn more about access and authentication options, see "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/realm/access"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Access control"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"."},"children":[]}]}]}]}]}],"sectionId":"/docs/realm/customization/search-api/openapi/section/authentication"},{"nodeType":"overview-section-wrapper","children":[{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"heading","attributes":{"level":2,"id":"section/cors-and-credentials"},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"CORS and credentials"},"children":[]}]}]},{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"When calling from a browser (for example, a custom search UI on another origin), the project must allow your origin in CORS. Send credentials (cookies) with "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"fetch(..., { credentials: 'include' })"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" so that session cookies are sent for protected projects."},"children":[]}]}]}]}],"sectionId":"/docs/realm/customization/search-api/openapi/section/cors-and-credentials"}]}]}},{"type":"link","label":"Authentication","link":"/docs/realm/customization/search-api/openapi/section/authentication","routeSlug":"/docs/realm/customization/search-api/openapi/section/authentication","content":null},{"type":"link","label":"CORS and credentials","link":"/docs/realm/customization/search-api/openapi/section/cors-and-credentials","routeSlug":"/docs/realm/customization/search-api/openapi/section/cors-and-credentials","content":null},{"type":"group","label":"Search","link":"/docs/realm/customization/search-api/openapi/search","routeSlug":"/docs/realm/customization/search-api/openapi/search","items":[{"label":"Get search results","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/realm/customization/search-api/openapi/search/search","routeSlug":"/docs/realm/customization/search-api/openapi/search/search","metadata":{"seo":{"title":"Get search results","description":"Run a full-text search and get results grouped by category (for example, Documentation, API Reference)."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"search","name":"Get search results","isWebhook":false,"pointer":"/paths/~1_search/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get search results","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":"Run a full-text search and get results grouped by category (for example, Documentation, API Reference).\n"},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SearchRequest","exampleIds":["paths/~1_search/post/requestBody/content/application~1json/example"]}},"schemaId":"components/schemas/SearchRequest","exampleIds":["paths/~1_search/post/requestBody/content/application~1json/example"],"pointer":"/paths/~1_search/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/_search","servers":[{"url":"/_mock/docs/realm/customization/search-api/openapi","description":"Mock server","isMockServer":true},{"url":"https://{projectUrl}","description":"Project server","variables":{"projectUrl":{"default":"redocly.com"}}}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"requestBody":{"application/json":{"schemaId":"components/schemas/SearchRequest","exampleIds":["paths/~1_search/post/requestBody/content/application~1json/example"]}},"responseCodes":["200","400"],"pointer":"/_search","href":"search/search","openApiOperationId":"search","summary":"Get search results"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/docs/realm/customization/search-api/openapi","description":"Mock server","isMockServer":true},{"url":"https://{projectUrl}","description":"Project server","variables":{"projectUrl":{"default":"redocly.com"}}}],"schemaId":"components/schemas/SearchRequest","exampleIds":["paths/~1_search/post/requestBody/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SearchRequest","exampleIds":["paths/~1_search/post/requestBody/content/application~1json/example"]}},"examples":[{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":"Search results grouped by category.","mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SearchResponse","exampleIds":["paths/~1_search/post/responses/200/content/application~1json/example"]}},"schemaId":"components/schemas/SearchResponse","exampleIds":["paths/~1_search/post/responses/200/content/application~1json/example"]},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Facet field name (for example: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_category"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_version"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"schema_40"}},"schemaId":"schema_40"}],"pointer":"/paths/~1_search/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"components/schemas/SearchResponse","exampleIds":["paths/~1_search/post/responses/200/content/application~1json/example"],"mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SearchResponse","exampleIds":["paths/~1_search/post/responses/200/content/application~1json/example"]}}},{"code":"400","schemaId":"schema_40","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"schema_40"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/search/search"}],"panels":[]}]},"httpPath":"/_search"},{"label":"Get search facets","deprecated":false,"httpVerb":"post","isAdditionalOperation":false,"isWebhook":false,"type":"link","link":"/docs/realm/customization/search-api/openapi/search/searchfacets","routeSlug":"/docs/realm/customization/search-api/openapi/search/searchfacets","metadata":{"seo":{"title":"Get search facets","description":"Get facet definitions and counts for building filter UIs or refining search. Facet counts are optionally computed in the context of a search query and applied filters. Facet type can be: multi-select, select, tags, and so on, as configured in search filters."}},"content":{"contentType":"item","itemVariant":"httpItem","meta":{"sourceId":"searchFacets","name":"Get search facets","isWebhook":false,"pointer":"/paths/~1_search-facets/post","hasSamples":true},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Get search facets","isWebhook":false,"showPageActions":true}],"panels":[]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Request","labelTranslationKey":"request","deepLinkSuffix":"request"},{"nodeType":"markdoc","content":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Get facet definitions and counts for building filter UIs or refining search. Facet counts are optionally computed in the context of a search query and applied filters. Facet "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"type"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" can be: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"multi-select"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"select"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"tags"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and so on, as configured in search filters."},"children":[]}]}]}]},{"nodeType":"item-content","variant":"body","label":"Request Body","labelTranslationKey":"body","required":true,"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SearchFacetsRequest","exampleIds":["paths/~1_search-facets/post/requestBody/content/application~1json/examples/allFacets","paths/~1_search-facets/post/requestBody/content/application~1json/examples/singleFacetWithQuery"]}},"schemaId":"components/schemas/SearchFacetsRequest","exampleIds":["paths/~1_search-facets/post/requestBody/content/application~1json/examples/allFacets","paths/~1_search-facets/post/requestBody/content/application~1json/examples/singleFacetWithQuery"],"pointer":"/paths/~1_search-facets/post/requestBody"}],"panels":[{"children":[{"kind":"code-sample","source":{"kind":"code-sample","operationType":"http","method":"POST","path":"/_search-facets","servers":[{"url":"/_mock/docs/realm/customization/search-api/openapi","description":"Mock server","isMockServer":true},{"url":"https://{projectUrl}","description":"Project server","variables":{"projectUrl":{"default":"redocly.com"}}}],"parameters":{"path":[],"query":[],"querystring":[],"header":[],"cookie":[]},"security":[],"requestBody":{"application/json":{"schemaId":"components/schemas/SearchFacetsRequest","exampleIds":["paths/~1_search-facets/post/requestBody/content/application~1json/examples/allFacets","paths/~1_search-facets/post/requestBody/content/application~1json/examples/singleFacetWithQuery"]}},"responseCodes":["200","400"],"pointer":"/_search-facets","href":"search/searchfacets","openApiOperationId":"searchFacets","summary":"Get search facets"},"isWebhook":false,"hideReplay":false,"servers":[{"url":"/_mock/docs/realm/customization/search-api/openapi","description":"Mock server","isMockServer":true},{"url":"https://{projectUrl}","description":"Project server","variables":{"projectUrl":{"default":"redocly.com"}}}],"schemaId":"components/schemas/SearchFacetsRequest","exampleIds":["paths/~1_search-facets/post/requestBody/content/application~1json/examples/allFacets","paths/~1_search-facets/post/requestBody/content/application~1json/examples/singleFacetWithQuery"],"mediaTypes":["application/json"],"mediaTypeSchemas":{"application/json":{"schemaId":"components/schemas/SearchFacetsRequest","exampleIds":["paths/~1_search-facets/post/requestBody/content/application~1json/examples/allFacets","paths/~1_search-facets/post/requestBody/content/application~1json/examples/singleFacetWithQuery"]}},"examples":[{},{}]}]}]},{"nodeType":"container","children":[{"nodeType":"header","level":4,"label":"Responses","labelTranslationKey":"responses","deepLinkSuffix":"responses"},{"nodeType":"item-content","variant":"responses","responses":[{"code":"200","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Facet definitions with values and counts. If "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"field"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" is set in the request, returns an array with a single facet object; otherwise returns all configured facets."},"children":[]}]}]}],"mediaType":"application/json","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SearchFacetsResponse"}},"schemaId":"components/schemas/SearchFacetsResponse"},{"code":"400","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Facet field name (for example: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_category"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_version"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}],"mediaType":"application/problem+json","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"schema_40"}},"schemaId":"schema_40"}],"pointer":"/paths/~1_search-facets/post/responses"}],"panels":[{"children":[{"kind":"response","headerTitle":"Response","responseCodes":[{"code":"200","schemaId":"components/schemas/SearchFacetsResponse","mediaTypes":["application/json"],"mediaTypeContent":{"application/json":{"schemaId":"components/schemas/SearchFacetsResponse"}}},{"code":"400","schemaId":"schema_40","mediaTypes":["application/problem+json"],"mediaTypeContent":{"application/problem+json":{"schemaId":"schema_40"}}}],"examples":[]}]}]},{"nodeType":"container","children":[{"nodeType":"feedback","pageSlug":"/search/searchfacets"}],"panels":[]}]},"httpPath":"/_search-facets"}],"content":{"contentType":"group","meta":{"name":"Search"},"children":[{"nodeType":"container","children":[{"nodeType":"header","level":2,"label":"Search","showPageActions":true},{"nodeType":"markdoc","content":"Full-text search and facet operations."}],"panels":[{"children":[{"kind":"group-items","title":"Operations","titleTranslationKey":"operations","items":[{"title":"/_search","summary":"Get search results","prefix":{"name":"post","color":"post"},"badges":[],"link":"/search/search","deprecated":false},{"title":"/_search-facets","summary":"Get search facets","prefix":{"name":"post","color":"post"},"badges":[],"link":"/search/searchfacets","deprecated":false}]}]}]}]}}],"store":{"schemaStore":{"components/schemas/FacetFilter":{"id":"components/schemas/FacetFilter","kind":"json-schema","title":"FacetFilter","data":{"type":"object","required":["field","values"],"properties":{"field":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Facet field name (for example: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_category"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_version"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}]},"values":{"type":"array","items":{"type":"string"},"description":"Selected facet values."}}}},"components/schemas/SearchRequest":{"id":"components/schemas/SearchRequest","kind":"json-schema","title":"SearchRequest","data":{"type":"object","required":["query","locale"],"properties":{"query":{"type":"string","description":"Full-text search query."},"locale":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Locale code for the content to search (for example, "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"en"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"default_locale"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]},{"$$mdtype":"Node","type":"softbreak","inline":true,"attributes":{},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Must match a locale configured in your project. Locales are set in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly.yaml"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" under the "},"children":[]},{"$$mdtype":"Node","type":"link","inline":true,"attributes":{"href":"/docs/realm/config/l10n"},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"l10n"},"children":[]}]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" option."},"children":[]}]}]}]},"filter":{"type":"array","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"List of facet filters. Omit or use [] for no filters."},"children":[]}]}]}],"items":{"$ref":"#/components/schemas/FacetFilter"}},"loadMore":{"type":"object","description":"For pagination within a result group.","properties":{"groupKey":{"type":"string","description":"Category key to load more results for."},"offset":{"type":"integer","description":"Offset for pagination within the group."}}}}}},"components/schemas/FacetValueCount":{"id":"components/schemas/FacetValueCount","kind":"json-schema","title":"FacetValueCount","data":{"type":"object","properties":{"value":{"type":"string","description":"Facet value (for example: a category or product name).\n"},"count":{"type":"integer","description":"Number of search results that match this facet value."}}}},"components/schemas/SearchDocument":{"id":"components/schemas/SearchDocument","kind":"json-schema","title":"SearchDocument","data":{"description":"Indexed document returned in search results.","properties":{"id":{"type":"string","description":"Unique identifier of the indexed document."},"url":{"type":"string","description":"URL of the document or API operation."},"title":{"type":"string","description":"Document or page title."},"text":{"type":"string","description":"Indexed text content used for search matching."},"path":{"type":"array","description":"Breadcrumb path (for example: section titles) leading to this document.\n","items":{"type":"string"}},"redocly_category":{"type":"string","description":"Documentation category (for example: Documentation, API Reference).\n"},"redocly_product":{"type":"string","description":"Product name when content is scoped by product."},"redocly_teams":{"type":"array","description":"Team names when content is scoped by team.","items":{"type":"string"}},"redocly_version":{"oneOf":[{"type":"object","properties":{"isDefault":{"type":"boolean","description":"Whether this is the default version."}}},{"type":"string"}],"description":"Version label or version object for versioned content."},"httpMethod":{"type":"string","description":"HTTP method (for example: GET, POST) for API reference items.\n"},"httpPath":{"type":"string","description":"HTTP path pattern for API reference items."},"apiTitle":{"type":"string","description":"Title of the API for API reference items."},"apiVersion":{"type":"string","description":"API version for API reference items."}}}},"components/schemas/SearchHighlight":{"id":"components/schemas/SearchHighlight","kind":"json-schema","title":"SearchHighlight","data":{"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Highlighted snippets; matched terms are wrapped in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"<mark>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" tags."},"children":[]}]}]}],"properties":{"id":{"type":"string","description":"Document ID matching the result document."},"title":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Highlighted title snippet with matched terms in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"<mark>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" tags."},"children":[]}]}]}]},"url":{"type":"string","description":"URL of the result (no highlighting)."},"text":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Highlighted content snippet with matched terms in "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"<mark>"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":" tags."},"children":[]}]}]}]},"redocly_category":{"type":"string","description":"Category value for this result (for example: Documentation, API Reference).\n"},"redocly_product":{"type":"string","description":"Product value for this result when applicable."},"parameters":{"type":"array","description":"Present in API reference items."}}}},"components/schemas/SearchItem":{"id":"components/schemas/SearchItem","kind":"json-schema","title":"SearchItem","data":{"type":"object","properties":{"document":{"type":"object","description":"The indexed document (metadata and content fields).","$ref":"#/components/schemas/SearchDocument"},"highlight":{"type":"object","description":"Highlighted snippets for this result.","$ref":"#/components/schemas/SearchHighlight"}}}},"components/schemas/SearchResponse":{"id":"components/schemas/SearchResponse","kind":"json-schema","title":"SearchResponse","data":{"type":"object","properties":{"facets":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/FacetValueCount"}},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Facet field names to arrays of value and count. Keys may include: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_category"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_product"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_version"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_teams"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"httpMethod"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"httpPath"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"apiTitle"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"apiVersion"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", and any custom facet fields."},"children":[]}]}]}]},"documents":{"type":"object","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/SearchItem"}},"description":"Category names (e.g. Documentation, API Reference) to arrays of search items."}}}},"components/schemas/SearchFacetsRequest":{"id":"components/schemas/SearchFacetsRequest","kind":"json-schema","title":"SearchFacetsRequest","data":{"type":"object","required":["locale"],"properties":{"locale":{"type":"string","description":"Locale code (same as search)."},"field":{"type":"string","description":"If set, returns only the facet for this field (with values and counts). If omitted, returns all configured facets."},"query":{"type":"string","description":"Search query; facet counts are computed in the context of this query."},"filter":{"type":"array","items":{"$ref":"#/components/schemas/FacetFilter"},"description":"Counts are computed with these filters applied."},"facetQuery":{"type":"string","description":"Filter facet values using this string (for type-ahead in facet controls)."}}}},"components/schemas/FacetObject":{"id":"components/schemas/FacetObject","kind":"json-schema","title":"FacetObject","data":{"type":"object","properties":{"name":{"type":"string","description":"Display name of the facet as shown in the UI."},"field":{"type":"string","description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"Facet field name (for example: "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_category"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":", "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"redocly_product"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":")."},"children":[]}]}]}]},"type":{"type":"string","description":"Facet type (for example: multi-select, select, tags) as configured in search filters.\n"},"values":{"type":"array","description":"Available facet values with their result counts.","items":{"$ref":"#/components/schemas/FacetValueCount"}}}}},"components/schemas/SearchFacetsResponse":{"id":"components/schemas/SearchFacetsResponse","kind":"json-schema","title":"SearchFacetsResponse","data":{"type":"array","items":{"$ref":"#/components/schemas/FacetObject"},"description":[{"$$mdtype":"Node","type":"paragraph","attributes":{},"children":[{"$$mdtype":"Node","type":"inline","attributes":{},"children":[{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":"If the request includes "},"children":[]},{"$$mdtype":"Node","type":"code","inline":true,"attributes":{"content":"field"},"children":[]},{"$$mdtype":"Node","type":"text","inline":true,"attributes":{"content":": array with a single facet. Otherwise all facet objects with their values."},"children":[]}]}]}]}},"schema_40":{"kind":"json-schema","data":{"type":"object","properties":{"type":{"type":"string","description":"URI reference that identifies the problem type.","example":"about:blank"},"title":{"type":"string","description":"Error title.","example":"Bad Request"},"status":{"type":"integer","description":"HTTP status code.","example":400},"detail":{"type":"string","description":"Human-readable message with additional error details.","example":"Invalid or missing required body fields."}},"required":["detail"]},"id":"schema_40"}},"exampleStore":{"paths/~1_search/post/requestBody/content/application~1json/example":{"value":{"query":"getting started","filter":[],"locale":"default_locale"},"id":"paths/~1_search/post/requestBody/content/application~1json/example"},"paths/~1_search/post/responses/200/content/application~1json/example":{"value":{"facets":{"redocly_category":[{"value":"Documentation","count":2},{"value":"API Reference","count":0}],"redocly_product":[],"redocly_version":[],"redocly_teams":[],"httpMethod":[],"httpPath":[],"apiTitle":[],"apiVersion":[]},"documents":{"Documentation":[{"document":{"id":"doc-1","url":"/guides/getting-started","title":"Getting started","text":"This guide walks you through the initial setup.","path":[],"redocly_category":"Documentation","redocly_product":"","redocly_teams":[],"redocly_version":{"isDefault":true}},"highlight":{"id":"doc-1","title":"Getting started","url":"/guides/getting-started","text":"This guide walks you through the <mark>getting</mark> <mark>started</mark> setup.","redocly_category":"Documentation","redocly_product":"","parameters":[]}}]}},"id":"paths/~1_search/post/responses/200/content/application~1json/example"},"paths/~1_search-facets/post/requestBody/content/application~1json/examples/allFacets":{"value":{"locale":"en"},"key":"allFacets","summary":"All facets","id":"paths/~1_search-facets/post/requestBody/content/application~1json/examples/allFacets"},"paths/~1_search-facets/post/requestBody/content/application~1json/examples/singleFacetWithQuery":{"value":{"locale":"en","field":"redocly_category","query":"api","filter":[{"field":"redocly_version","values":["v1"]}]},"key":"singleFacetWithQuery","summary":"One facet with query and filter","id":"paths/~1_search-facets/post/requestBody/content/application~1json/examples/singleFacetWithQuery"}},"securitySchemeStore":{},"servers":[{"url":"/_mock/docs/realm/customization/search-api/openapi","isMockServer":true,"description":"Mock server"},{"url":"https://{projectUrl}","description":"Project server","variables":{"projectUrl":{"default":"redocly.com","description":"Project URL (prepend your path prefix if applicable)."}}}]},"options":{"excludeFromSearch":true,"feedback":{"type":"sentiment","settings":{"comment":{"likeLabel":"What was most helpful?","dislikeLabel":"What can we improve?"},"label":"Was this section helpful?"}},"hideSidebar":true,"mockServer":{"url":"/_mock/docs/realm/customization/search-api/openapi","position":"first","description":"Mock server"},"disableRouter":true,"downloadUrls":[{"url":"/_bundle/docs/realm/customization/search-api/openapi.json?download"},{"url":"/_bundle/docs/realm/customization/search-api/openapi.yaml?download"}],"specType":"openapi","markdocOptions":{"tags":{},"nodes":{},"components":{}},"metadata":{"title":"Search","description":"Query your project's documentation and API reference content from external tools, scripts, or integrations (for example, MCP servers or custom search UIs).\n\n**Path prefix:** If your project is deployed with a path prefix (for example, `https://docs.example.com/docs/`), prepend that prefix to the API paths (for example, `/docs/_search`).\n\n{% admonition type=\"info\" %}\nFor path prefix configuration, see [custom domain configuration](../../reunite/project/custom-domain.md#serve-from-a-subdirectory).\n{% /admonition %}\n\n## Authentication\n\nThis API uses the same authentication as the project. Public projects (when `access.requiresLogin` is not set or is `false`), don't require authentication when you call the API. \nIf the project is protected, (`access.requiresLogin: true` or has [RBAC](../../access/rbac.md) configuration), you must send the same cookie-based session that the browser uses after users logs in. \n\nThe API does not support API keys or bearer tokens; authentication is session (cookie) only. For unauthenticated requests to protected projects, both endpoints return empty results instead of errors.\n{% admonition type=\"info\" %}\nTo learn more about access and authentication options, see [Access control](../../access/index.md).\n{% /admonition %}\n\n## CORS and credentials\n\nWhen calling from a browser (for example, a custom search UI on another origin), the project must allow your origin in CORS. Send credentials (cookies) with `fetch(..., { credentials: 'include' })` so that session cookies are sent for protected projects.\n"}},"baseSlug":"/docs/realm/customization/search-api/openapi","routesMapping":{}}