People Search (Group) Query

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

People Search queries help find people who share something in common - an event they all do or a trait they all share. People Searches can return both groups of people and individual people. This section of the reference docs outlines the former (see People Search (Identity) Query for the latter).

To run an ad-hoc People Search query against the Kissmetrics REST API, you will need to generate query params that contain the query filter and result columns. In general, a People Search (Group Search) query is of the form:

  • Find people who did "all of these":
    • Has done event "Visited site" at least 1 time today
  • Add columns to results:
    • Latest "KM Browser" property value today

Here's how we break the above query down into filter and calculation properties:

"query_params": {
  // Find people who
  "type": "group",
  
  // did "all of these"
  "filter": {
    "type": "and",
    "operands": [{
      "negate": false,
      "type": "event",
      "event": 2,
      "frequency_occurence": "at_least",
      "frequency_value": 1,
      "date_range": {
        "type": "preset",
        "preset": "today"
      }
    }]
  },
  
  // and add these columns to the result
  "calculations": [{
    "type": "last_value_in_range",
    "subject": {
      "negate": false,
      "type": "property",
      "comparison_mode": "any_value",
      "property": 755,
      "date_range": {
        "type": "preset",
        "preset": "today"
      }
    }
  }]
}
Body Params
int32
required

The unique identifier of the product to query.

string
required

The type of query to run, in this case it's people_search.

string

The field to sort the results by

string

string The sort order if sort parameter is provided. One of asc or desc.

query_params
object
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json