Querying Data
Once you’ve synced a data source, you can query it with max search. All queries run against your local store - they’re fast, free, and you can run as many as you want.
Basic search
max search linear-1 LinearIssue --limit 5LinearIssue: 5 results, more available
_id identifier title state 001b2c.. ATL-811 Validate TinyBird POC Done 00482b.. MET-3898 Delete redshift cluster 1 Done 005610.. FEA-98 Feature Improvement: FP... Canceled 007a12.. ATL-455 Update staging config In Progress 009f3e.. BUG-221 Fix login redirect loop Todo
Next page: --after ein:LinearIssue:009f3e...By default, search returns _id plus all schema-defined fields in a table format.
Filtering results
Use --filter (or -f) to narrow results with boolean expressions:
# Exact matchmax search linear-1 LinearIssue -f 'state=Done'
# Comparisonmax search linear-1 LinearIssue -f 'priority > 2'
# Pattern match (substring)max search linear-1 LinearIssue -f 'title~="Zendesk"'
# Compound filtersmax search linear-1 LinearIssue -f 'state=Done AND priority > 2'
# Grouped conditionsmax search linear-1 LinearIssue -f '(state=Todo OR state="In Progress") AND priority >= 3'Filter operators
| Operator | Meaning |
|---|---|
= | Equals |
!= | Not equals |
> | Greater than |
>= | Greater than or equal |
< | Less than |
<= | Less than or equal |
~= | Pattern match (substring) |
Combine expressions with AND and OR. Use parentheses to control grouping.
Quote the filter string to prevent shell interpretation. Use inner quotes for values with spaces: --filter 'state="In Progress"'.
Choosing fields
Use --fields to control which columns appear in output:
# Specific fields onlymax search linear-1 LinearIssue --fields="title,state,assignee"
# All schema properties (no meta fields)max search linear-1 LinearIssue --fields=".props"
# All meta fields (_id, _ref)max search linear-1 LinearIssue --fields=".meta"
# Everythingmax search linear-1 LinearIssue --fields=".all"
# Mix named fields with selectorsmax search linear-1 LinearIssue --fields="_id,title,.meta"When you omit --fields, you get _id plus all schema properties - equivalent to --fields="_id,.props".
See Field Selection for the full guide on selectors and namespaces.
Ordering
Sort results with --order-by:
# Ascending (default)max search linear-1 LinearIssue --order-by priority
# Descendingmax search linear-1 LinearIssue --order-by priority:desc
# Explicit ascendingmax search linear-1 LinearIssue --order-by identifier:ascOutput formats
Max supports three output formats. See Output and Pagination for full details.
text (default) - human-readable table, good for exploration.
json - single JSON object with a data array and pagination metadata:
max search linear-1 LinearIssue --limit 2 -o json{ "type": "LinearIssue", "data": [ { "_id": "001b...", "identifier": "ATL-811", "title": "...", "state": "Done" }, { "_id": "004b...", "identifier": "MET-3898", "title": "...", "state": "Done" } ], "hasMore": true, "cursor": "ein:LinearIssue:00482baa-..."}ndjson - one JSON object per line, with a _meta line at the end. Good for piping:
max search linear-1 LinearIssue --limit 2 -o ndjson{"_id":"001b...","identifier":"ATL-811","title":"...","state":"Done"}{"_id":"004b...","identifier":"MET-3898","title":"...","state":"Done"}{"_meta":{"type":"LinearIssue","hasMore":true,"cursor":"ein:LinearIssue:00482baa-..."}}Discovering your schema
Use max schema to see what entity types and fields are available for a connector:
max schema @max/connector-linearTo find out which connector an installation uses, check its status:
max -t my-project/linear-1 statusComposing with shell tools
Machine-readable output formats make it easy to pipe Max output into other tools:
# Count open issuesmax search linear-1 LinearIssue -f 'state=Todo' --all -o ndjson | wc -l
# Extract titles with jqmax search linear-1 LinearIssue --limit 10 -o json | jq '.data[].title'
# Export to CSVmax search linear-1 LinearIssue --all -o json \ | jq -r '.data[] | [.identifier, .title, .state] | @csv'
# Find issues mentioning a keywordmax search linear-1 LinearIssue --all -f 'title~="migration"' --fields="identifier,title" -o jsonUse --all to auto-paginate and stream all results. There’s no practical cost to large result sets since everything runs locally.
What’s next
- Field Selection - group selectors and field namespaces
- Meta Fields - built-in fields like
_idand_ref - Output and Pagination - formats, pagination, and piping
- Agent Integration - using Max with AI agents