Endpoints
Create advanced search
Create a persistent Search object processed asynchronously, with results and an AI-generated report available via polling.
The Advanced Search endpoint creates a persistent Search object. The server processes the search asynchronously. Use the returned
The create response contains the dummy Search object’s
id to poll for completion.
Unlike Quick Search, Advanced Search supports date ranges up to 90 days and produces an AI-generated report alongside raw results.
Request body
Array of category IDs to include in the search results.
Additional context for the AI to tailor the search and reporting (for example, your organization or focus area). Maximum 1000 characters.
A list of policy topics to search for, one per line. Longer, descriptive phrases work best. Maximum 5000 characters.
Optional instructions for formatting or transforming the search results into
edited_results. Omit this field if you only need raw search_results. Maximum 5000 characters.A dictionary of string key-value pairs for your own record keeping. Use this to attach metadata to the search, such as the project or team it belongs to (for example,
{"project": "tax-reform", "team": "policy"}).Set to
true to validate the request and create a Search with example data without running a source search. Required fields such as categories, filter_prompt, and date_range are still validated normally.Custom dummy data to store when
is_test is true. Use this to test downstream handling of search_results or custom edited_results formats.Time period to search within. May cover up to 90 days — use either
start_date/end_date or duration_seconds ≤ 7776000.Response
On success, returns the created Search object. The create response does not includesearch_results or edited_results. Use the returned id to retrieve the Search and read results.
Unique identifier for the Search. Use this to retrieve results.
Array of category IDs used in the search.
Context provided in the request.
Filter prompt provided in the request.
Edit prompt provided in the request.
Labels provided in the request.
Whether the Search was created in test mode.
The date range used, containing either
start_date and end_date, or duration_seconds.Timestamp when the Search was created (ISO 8601, UTC).
Estimated number of candidate results to process.
Number of candidate results processed so far.
Internal pagination position for additional result pages.
Public UUID for the Search.
Error message if an error occurred; otherwise
null.Test mode
Useis_test: true to test your integration without running a source search. The endpoint still validates the request body the same way it does for a normal Advanced Search request.
In test mode, POST /search/ returns a dummy Search object with an id. Retrieve that Search with Get Search to read the dummy search_results and edited_results. The API does not run edit_prompt in test mode. If you include test_data.edited_results, that value is stored exactly as provided.
Example test request body
id. Use that id to retrieve the stored dummy data:
Retrieve test Search
Example test retrieval response