Operation

GET /search

Searches every primary record type (advertisers, publishers, agencies, deals, contacts, and — for admin callers — users) in a single call. Powered entirely by Elasticsearch/Searchkick; results are scoped to the caller's Pundit policy scope so non-admin users never see records they are not allowed to view. If Elasticsearch is temporarily unavailable the endpoint returns empty result arrays with `meta.searchkick_available: false` so search bars can degrade gracefully.

Operation ID: universalSearch · Tags: Search

Parameters

Name In Required Type Description
q query Yes string Free-form query. Matches on names, domains, emails, slugs, tags and other indexed fields depending on the record type.
per_type_limit query No integer Maximum number of rows returned per record type.
types query No array Optional comma-separated list of record types to include. Unknown slugs are ignored; `users` is silently dropped for non-admin callers.

Request Body

No request body is defined for this operation.

Responses

Content Types

  • application/json
{
  "description": "Grouped search results keyed by record type",
  "content": {
    "application/json": {
      "schema": {
        "$ref": "#/components/schemas/UniversalSearchResponse"
      },
      "example": {
        "query": "alo yoga",
        "results": {
          "advertisers": {
            "data": [
              {
                "id": 42,
                "type": "advertiser",
                "title": "Alo Yoga",
                "subtitle": "Awin · HiEnergy",
                "slug": "alo-yoga",
                "domain": "aloyoga.com",
                "status": "approved"
              }
            ],
            "total": 1
          },
          "publishers": {
            "data": [],
            "total": 0
          },
          "agencies": {
            "data": [],
            "total": 0
          },
          "deals": {
            "data": [],
            "total": 0
          },
          "contacts": {
            "data": [],
            "total": 0
          }
        },
        "meta": {
          "per_type_limit": 10,
          "types": [
            "advertisers",
            "publishers",
            "agencies",
            "deals",
            "contacts"
          ],
          "searchkick_available": true
        }
      }
    }
  }
}

{
  "$ref": "#/components/responses/BadRequest"
}

{
  "$ref": "#/components/responses/Unauthorized"
}

API Playground

Run this GET request with your API key, or open it in a new tab. Path uses sample IDs where the OpenAPI path has {parameters}. Sign in to enable live testing with your API key.

Action Method Endpoint Description
Universal Searchkick-backed omnibox search GET /api/v1/search OpenAPI operationId: universalSearch.
GET /api/v1/search OpenAPI

Universal Searchkick-backed omnibox search


    
Ask Dex AIIntegration help

If this page feels TLDR, ask Dex AI.

Dex AI speaks your language, and all the other languages you may not. It will write the integration for you with the right endpoint and headers in one plain-English answer.