v45

latestOpenAPI 3.0.0raw.githubusercontent.com2026-08-01165164.7 KB
Search

Search

Search your organization's connected content and return ranked document results with cursor pagination. Use GET /api/search/filters to discover datasource identifiers and common filter fields. Built-in filter names are validated; other field names are accepted as custom filters and behavior depends on your Glean configuration and connected sources. Errors: HTTP 422 unprocessable_query returns no results or next_cursor. See warnings on the response for non-blocking issues such as partially available results. Not every query issue produces a warning or error.

post/api/search

Request body

querystring required

The search query string. Supports inline operators such as from:jane type:document app:confluence. Inline operators are AND'd with structured filters.

page_sizeinteger

Number of results to return per page.

cursorstring nullable

Opaque pagination token from a previous response's next_cursor field. Omit on the first request.

datasourcesstring[]

Restrict results to specific datasource identifiers returned by GET /api/search/filters. Scopes by datasource type and may include results from multiple instances of that type.

Example request

{
  "query": "quarterly planning 2026",
  "datasources": [
    "confluence",
    "google_drive"
  ],
  "filters": [
    {
      "field": "type",
      "values": [
        "spreadsheet",
        "presentation"
      ]
    }
  ]
}

Response

Successful response.

has_moreboolean required

Indicates whether additional pages of results are available.

next_cursorstring nullable required

Opaque token to pass as cursor in the next request.

request_idstring required

Platform-generated request ID for support correlation.

Example response

{
  "results": [
    {
      "url": "https://company.atlassian.net/wiki/spaces/ENG/pages/12345",
      "title": "Q2 2026 Platform Roadmap",
      "snippets": [
        "The platform team will focus on API stability and..."
      ],
      "datasource": "confluence",
      "document_type": "page"
    }
  ],
  "warnings": [
    {
      "code": "results_incomplete"
    }
  ]
}