---
title: "This route will search for individual records that match the given query. If you want to summarise records, use the report endpoint instead."
method: POST
path: "/search"
tags: ["Search"]
---

# This route will search for individual records that match the given query. If you want to summarise records, use the report endpoint instead.

`POST /search`

## Request

- Base URL: `https://api.streamtime.net/v2`
- URL: `https://api.streamtime.net/v2/search`
- Auth: HTTP bearer

Returns a paginated array of records that match the given search criteria. You need the information from getSearchSetup to construct a search request accurately, so ensure you have it before calling this route. getSearchSetup results are stable for the duration of a session (they only change when a new product release ships), so fetch it once and reuse it for subsequent searches rather than re-fetching before every call.

## Query parameters

- `search_view` 'jobs' | 'job_milestones' | 'job_phases' | 'job_items' | 'job_item_quote_line_items' | 'job_item_invoice_line_items' | 'job_item_users' | 'job_item_roles' | 'job_item_sub_items' | 'time' | 'expenses' | 'purchase_order_line_items' | 'logged_expense_quote_line_items' | 'logged_expense_invoice_line_items' | 'quotes' | 'quote_line_items' | 'quote_line_item_invoice_line_items' | 'invoices' | 'invoice_line_items' | 'job_groups' | 'job_group_periods' | 'companies' | 'contacts' | 'users', required: Which search context is being referred to.

## Request body

- object
  - `limit` integer: Number of records returned in this page. Defaults to 1000 if not provided, which is also the maximum allowed - requesting more will return an error. Use offset to paginate through larger result sets, and prefer the report endpoint when you only need aggregated totals rather than individual records.
  - `offset` integer: Offset of the first record in this page
  - `query` string, required: A formatted string that forms the basis of the filters to apply. You should use the selector for the relevant filter provided when running the setup route. Join multiple filters with AND or OR operators, and use parentheses to group filters. Available operators for filters are: =, !=, >, >=, <, <=, CONTAINS, NOT CONTAINS, IN, NOT IN. When passing an array of values, you can use the IN, NOT IN, CONTAINS or NOT CONTAINS operators and send values in a comma separated string surrounded by square brackets. Eg job_item_name contains ["Pitch", "account management"] Some sample filters are: job_status = "complete" and (job_name contains "Project Management" or job_item_estimated_start_date > "2025-01-01") (job_status = "paused" or job_status = "in play") and (job_name = "project management" or job_name = "account management") job_status in ["paused", "in play"] and billable = "true" job_item_name not contains ["Pitch", "account management"]
  - `sortColumn` string: Which column to sort the results by. Values should be selected from the sortColumns array returned by the setup route If not provided, the default sort column will be used.
  - `sortAscending` boolean: Sort direction for sortColumn. Defaults to true (ascending).
  - `additionalData` string[]: When performing a search, you can request additional related data to the record itself. For instance, if you're searching for jobs but also want information about the company, you can pass 'company' as an additional data option to get the company details for each job in the search results. Values should be selected from the additionalData array returned by the setup route

## Response `200`

A paginated array of records matching the search criteria. The shape of each record depends on the search_view you queried (for example a jobs search returns job records, a companies search returns company records). The available fields for a given view are the same selectors returned by getSearchSetup for that view, plus any additionalData objects you requested.

- object[]

---

[API](https://skmtc.dev/streamtime/apis/public-api.md) · [All operations](https://skmtc.dev/streamtime/apis/public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/streamtime/apis/public-api/revisions/cda8d1405534?raw)
