Resolve a filter value

Turn a label into the numeric id a filter matches on, with a count of matching records. Resolve with the same fresh_only you will search with: the two corpora number their values differently, and an id from the wrong one silently matches nothing.

GEThttps://app.trygtm.com/api/v1/prospects/filters/{field}/values
Scope
read

Path parameters

fieldstringrequired
The axis to resolve on, e.g. job_title, company_industry, state, age_range.

Query parameters

querystringrequired
The label to look up, e.g. Texas or VP Sales. For a band axis, the range asked for, e.g. 18-25.
fresh_onlybooleanoptional
Which corpus to resolve in. Defaults true. Must match the search. Fresh-only axes are always resolved in the fresh corpus.
limitnumberoptional
How many candidate values to return. Defaults to 8.
offsetintegeroptional
Skip this many candidates, to page past the first ones on a long axis, as the Search screen's typeahead scrolls. Defaults to 0.

Request

curl -G https://app.trygtm.com/api/v1/prospects/filters/state/values \
  -H "Authorization: Bearer $TRYGTM_API_KEY" \
  --data-urlencode "query=Texas"

Response

{
  "data": {
    "values": [
      {
        "saved_value": 44,
        "label": "Texas",
        "count": 1820344
      }
    ]
  }
}

Was this page helpful?