> ## Documentation Index
> Fetch the complete documentation index at: https://docs.parsagon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve advanced search

> Retrieve the current state of a previously created Advanced Search, including raw results and the AI-generated report.

Retrieve the current state of a previously created Advanced Search. Poll this endpoint after creating a search to check whether processing is complete.

<Info>
  Searches typically complete within **1–5 minutes**. Poll approximately **once every 15 seconds** until `search_results`, `edited_results`, and/or `error` are non-null.
</Info>

## Path parameters

<ParamField path="search_id" type="string" required>
  The `id` returned when the Search was created.
</ParamField>

## Response

Returns a JSON object representing the Search, including metadata, raw `search_results`, and `edited_results` when available.

<Info>
  For Advanced Search requests created with `is_test: true`, this endpoint returns the dummy `search_results` and `edited_results` stored at creation time.
</Info>

<ResponseField name="id" type="number | string">
  Unique identifier for the Search.
</ResponseField>

<ResponseField name="categories" type="array">
  Array of category IDs used in the search.
</ResponseField>

<ResponseField name="context" type="string">
  Context provided in the request.
</ResponseField>

<ResponseField name="filter_prompt" type="string">
  Filter prompt provided in the request.
</ResponseField>

<ResponseField name="edit_prompt" type="string">
  Edit prompt provided in the request.
</ResponseField>

<ResponseField name="labels" type="object">
  Labels provided in the request.
</ResponseField>

<ResponseField name="is_test" type="boolean">
  Whether the Search was created in test mode.
</ResponseField>

<ResponseField name="date_range" type="object">
  The date range used, containing either `start_date` and `end_date`, or `duration_seconds`.
</ResponseField>

<ResponseField name="created_at" type="string">
  Timestamp when the Search was created (ISO 8601, UTC).
</ResponseField>

<ResponseField name="search_results" type="array | null">
  Raw search results when processing is complete, `null` otherwise. Each item has the same fields as [Quick Search](/api-reference/endpoint/quick-search) results.
</ResponseField>

<ResponseField name="edited_results" type="any | null">
  AI-generated report when processing is complete, `null` otherwise. For test searches, this is the value provided in `test_data.edited_results`, if any.
</ResponseField>

<ResponseField name="error" type="string | null">
  Error message if the search failed; otherwise `null`.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://parsagon.io/api/events/v1/search/12345/" \
    -H "Authorization: Token YOUR_API_KEY_HERE"
  ```
</RequestExample>
