SiftDocs
Developer

Query syntax

Choose the filter format for the surface you call. MCP uses structured filters. The web search bar and some REST fields accept filter text.

At a glance

SurfaceFilter input
Web SearchOperations DSL text in the search bar or ?f=
REST action listfullFilter for the complete Operations DSL
REST conversation searchfilter for the Advanced Search DSL
REST action-list legacy fieldsfilter / filterJson: responded flag only
MCP search and analyticsStructured filter tree; no DSL string
Organization-specific fieldsDiscover before use

What you're looking at

A filter selects records. Its field vocabulary depends on the data source. Do not copy a REST field into MCP or assume one source accepts another source's filter.

Filter text

PatternMeaning
field=value, field!=valueEquals or not equals
field>value, field>=value, field<value, field<=valueComparison
field~value, field!~valueContains or does not contain
field^=value, field$=valueStarts with or ends with
field=min..maxRange
field=v1,v2Any listed value
expr1+expr2AND
expr1|expr2OR
(expr)Group

Use these patterns only where that endpoint accepts the grammar. An X example for the REST action list is fullFilter=src=TWITTER+kw~refund. Use URL encoding to preserve operators and literal text. --data-urlencode handles this in curl.

Legacy action-list filters

GET /v0/action/list?filter=ro=true selects responded actions. filter=ro=false removes that responded restriction. The default is responded actions. Legacy filter and filterJson do not apply platform, queue, status, or other conditions. Use fullFilter for those conditions. Do not combine it with a legacy filter field.

In the full Operations DSL, ro means root record, not responded. Use the declared responded field when you mean an agent response.

Structured MCP filters

Read sift.spec("query.search.actions") before a new search. Send a tree in the operation's filter field:

{
  "filterType": "and",
  "filters": [
    { "filterType": "source", "operator": "in", "value": ["TWITTER"] },
    { "filterType": "status", "operator": "in", "value": ["OPEN"] }
  ]
}

Groups use filterType (and or or) and filters. Leaves use a supported filterType, operator, and a correctly typed value. For example, list comparisons use arrays; boolean comparisons use booleans. A custom-field leaf also names its registered field.

Dates and field discovery

Set dateRange and time.timezone explicitly when the task depends on dates. Use the field reference for the surface's inclusive or exclusive end-date rules. For a custom field, call query.search.custom_fields through execute; for an unknown dimension, read sift.spec("query.analytics.<source>"). Use the returned field name and operators. Read the values from the field's value list (query.search.<list>). Do not guess a custom field from a display label.

Tips

  • Keep filters fixed while following a cursor.
  • An invalid query fails with every problem and the closest valid values. An empty first page carries emptyReason.
  • Check empty results before removing a filter.
  • Use analytics for totals instead of counting search pages.

Read the Record field dictionary for pmid, prid, other short keys, and nested result fields.

On this page