Skip to Content
Docs

Search

Find conversions, programs, brands, links, connections, sites, tags, payouts and deals by name or ID with one API request.

GET /v1/search?q=<text> searches your workspace in one request. Use it to find an object when you know a part of its name or its ID. The dashboard command menu uses the same endpoint.

curl "https://api.example.com/v1/search?q=summer" \
  -H "Authorization: Bearer sk_test_..."
{
  "object": "search_results",
  "livemode": false,
  "query": "summer",
  "data": [
    {
      "object": "program",
      "id": "prog_0Yx3kqW7sRzL1nH8aBcD4e",
      "title": "Summer Shop",
      "subtitle": "awin"
    },
    {
      "object": "tag",
      "id": "tag_0Yx3kqW7sRzL1nH8aBcD5f",
      "title": "Summer sale",
      "subtitle": null
    }
  ]
}

What the search finds

Object typeThe text matchestitlesubtitle
conversionThe order ID or the external IDThe order IDThe amount and the network
programThe nameThe nameThe network
brandThe name or the domainThe nameThe domain
linkThe code or the destinationThe codeThe destination
connectionThe labelThe labelThe network
siteThe name or the domainThe nameThe domain
tagThe nameThe nameNone
payoutThe invoice reference or the external IDThe invoice referenceThe amount and the network
dealThe title or the codeThe titleThe code, or the network

The search ignores the case of letters. The characters % and _ have no special meaning. The search ignores objects in the Trash. A search in a test key finds test data only. A search in a live key finds live data only.

The order of the answer

The answer has one group for each object type, in the order of the table. Inside a group, the order is:

  1. The objects with an ID that starts with the text. The text must have an underscore (_), for example prog_0Yx3.
  2. The objects with a name, a label, a code or a title that contains the text. For a conversion, this is the order ID.
  3. In each of these parts, the newest object is first.

Use limit to set the number of matches for each type. The default is 5. The maximum is 10. Use the ID of a match to read the object with its own endpoint, for example GET /v1/programs/{id}.

Scopes

The request needs no scope. The answer has only the types that the key can read. For example, a key with the scope programs:read and no other read scope gets programs only. A key that can read none of the types gets an empty list.

The search has the rate limits of the other endpoints.

On this page