Skip to main content
SearchVersion: v3

Search Opportunities

POST/opportunities/search

Search Opportunities based on combinations of advanced filters, with sorting and pagination. Send filters (each with field, operator and value, or a group of AND/OR filters) and sort (field and direction); the request body fields below list every supported filter field, operator and sort field, with examples. page starts at 1 (0 is treated as 1) and works with limit; page * limit cannot exceed 10,000, so use searchAfter without page to read further.

⚠️ Because of the advanced filtering, changes can take a few seconds to appear in the search results.

Authorizations

Authorizationstringheaderrequired

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Scope:opportunities.readonly
Auth methods:OAuthPrivate Integration
Token type:Sub-Account Token

Request​

Headers

Versionstringrequired

API Version. Send v3.

Available optionsv3
Example:v3

Body

locationIdstringrequired

Location ID in which the search needs to be performed

Example:i2SpAtBVHSVea1sL6oah
querystring

Text to search for within your opportunities. It is matched against the opportunity fields marked searchable in the location's settings. Maximum 75 characters.

Possible values: <= 75 characters

limitnumberrequired

Number of opportunities per page. Minimum 1, maximum 500.

Possible values: >= 1 and <= 500

Example:20
pagenumber

Page number for standard pagination, starting at 1 (0 is treated as 1).

  • Standard pagination returns up to 10,000 records in total: page × limit must not exceed 10,000. For example, page: 20 with limit: 500 returns the last set.
  • To go past 10,000 records, use searchAfter.
  • ⚠️ When you use searchAfter, do not send page: it is ignored for the results but still counts toward the 10,000 limit.

Possible values: >= 0

Example:1
searchAfterobject[]

Use this to get the next page of results (cursor-based pagination).

• Copy the sort value from the last opportunity in the previous response and send it here unchanged. Its values can be numbers or strings.

• You need it to go past the first 10,000 opportunities.

• Do not send page with it.

• To start from the first page, leave it out or send an empty list ([]).

• If the response has no opportunities, you have reached the end.

Example:[1625203104328,"yWQobCRIhRguQtD2llvk"]
filtersobject[]

Filters, or groups of filters, to narrow the results. Each filter has three parts:

  1. Field: the opportunity attribute the filter applies to, e.g. status.
  2. Operator: the comparison to run on the field, e.g. eq or range.
  3. Value: the value the field is compared with; a string, number or other type that fits the field.
  • Each item is either a filter (field, operator, value) or a group (group: AND / OR, with nested filters). Groups can be nested.
  • ⚠️ By default every filter in the filters array is combined with AND.
  • Results can take a few seconds to reflect recent changes.

Example: open opportunities worth 1,000 to 5,000, assigned to a user or with a source set

[
{
"group": "AND",
"filters": [
{
"field": "status",
"operator": "eq",
"value": "open"
},
{
"field": "monetary_value",
"operator": "range",
"value": {
"gte": 1000,
"lte": 5000
}
}
]
},
{
"group": "OR",
"filters": [
{
"field": "assigned_to",
"operator": "eq",
"value": "082goXVW3lIExEQPOnd3"
},
{
"field": "source",
"operator": "exists"
}
]
}
]

Opportunities changed since a time (incremental sync): filter date_updated with range and gte set to the time of your last sync, sort by date_updated asc, and page with searchAfter. Start each sync a little before the previous one ended, so changes still being indexed are not missed. Deleted opportunities are not returned.

Example
[
  {
    "field": "status",
    "operator": "eq",
    "value": "open"
  },
  {
    "field": "date_updated",
    "operator": "range",
    "value": {
      "gte": "2026-11-01T00:00:00Z"
    }
  },
  {
    "group": "OR",
    "filters": [
      {
        "field": "pipeline_id",
        "operator": "eq",
        "value": "bCkKGpDsyPP4peuKowkG"
      },
      {
        "field": "pipeline_stage_id",
        "operator": "eq",
        "value": "7915dedc-8f18-44d5-8bc3-77c04e994a10"
      }
    ]
  }
]
sortobject[]

Sort order, applied in the order given. Without sort, the newest opportunities come first (date_added desc). Opportunities that tie are ordered by id, so searchAfter paging is stable.

Example
[
  {
    "field": "date_added",
    "direction": "desc"
  }
]
additionalDetailsobject

Related data to include with each opportunity: notes, tasks and calendar events

Example
{
  "notes": false,
  "tasks": false,
  "calendarEvents": false
}

Response

Not returned: the API answers 201. Kept so clients generated from earlier docs keep working.

opportunitiesobject[]

List of opportunities matching the search criteria

Example:[]
totalnumberrequired

Total number of opportunities matching the query

Example:100
stageAggregationsobject[]

Per-stage totals when pipeline filter is present

Example:[]
aggregationsobject

Aggregation results keyed by aggregation name