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

# Get saved query

> Retrieve one saved people-search query by its UUID.

Returns one saved query belonging to the authenticated organization. The ID is the UUID returned by [Save query](/api-reference/queries/save) or [List saved queries](/api-reference/queries/list); it is not a name lookup.

<ParamField path="id" type="string" required>
  Saved-query UUID. There is no alternate name form and no pagination parameter.
</ParamField>

## Response schema

`data` contains:

| Field        | Type                        | Nullability and meaning                                                                                                 |
| ------------ | --------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `id`         | string (UUID)               | Never null.                                                                                                             |
| `name`       | string                      | Never null.                                                                                                             |
| `query`      | object                      | Never null; compacted allowlisted people-search object, possibly `{}`. Null and empty-string nested values are omitted. |
| `created_at` | string (ISO 8601 timestamp) | Never null.                                                                                                             |

See [Save query](/api-reference/queries/save) for the exact allowlisted nested keys, types, enums, and the distinction between save-route behavior and `GET /people` validation.

<ResponseExample>
  ```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
  {
    "data": {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "name": "Palantir FDE leavers",
      "query": {
        "company": "palantir",
        "role_family": "forward-deployed-engineer",
        "company_left_min_months_ago": 18,
        "open_to_work": true
      },
      "created_at": "2026-09-07T10:00:00.000Z"
    }
  }
  ```
</ResponseExample>

<RequestExample>
  ```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
  curl --fail-with-body --max-time 30 "https://api.freshtalent.ai/v1/queries/550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer $FRESHTALENT_API_KEY"
  ```

  ```js JavaScript (native fetch) theme={"theme":{"light":"github-light","dark":"github-dark"}}
  const id = "550e8400-e29b-41d4-a716-446655440000";
  const response = await fetch(`https://api.freshtalent.ai/v1/queries/${id}`, {
    signal: AbortSignal.timeout(30_000), headers: { Authorization: `Bearer ${process.env.FRESHTALENT_API_KEY}` },
  });
  if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`);
  const { data } = await response.json();
  console.log(data.name, data.query);
  ```

  ```python Python (stdlib) theme={"theme":{"light":"github-light","dark":"github-dark"}}
  import json
  import os
  from urllib.parse import quote
  from urllib.request import Request, urlopen

  query_id = "550e8400-e29b-41d4-a716-446655440000"
  request = Request(
      "https://api.freshtalent.ai/v1/queries/" + quote(query_id, safe=""),
      headers={"Authorization": f"Bearer {os.environ['FRESHTALENT_API_KEY']}"},
  )
  with urlopen(request, timeout=30) as response:
      saved = json.load(response)["data"]
  print(saved["name"], saved["query"])
  ```
</RequestExample>

## Errors and recovery

* `400` (`invalid_request`): when using the platform API key, provide a valid `X-FreshTalent-Org-Id` UUID.
* `401` (`unauthorized`): provide a valid API key.
* `402` (`payment_required`): restore entitlement.
* `404` (`not_found`): the ID is not a saved query in this organization. Check [List saved queries](/api-reference/queries/list); do not assume a missing record is transient.
* `429` or `5xx`: retry with backoff. This read is safe to repeat.

This endpoint is not paginated and has no `next` link. The returned `query` can be reused on people search. It is not directly compatible with Target `app_query`; review [Search query compatibility](/api-reference/targets/create#search-query-compatibility). Retrieving it does not execute the search or create a Target.

## Related

| Method   | Path           | Purpose                                           |
| -------- | -------------- | ------------------------------------------------- |
| `GET`    | `/queries`     | [List saved queries](/api-reference/queries/list) |
| `POST`   | `/queries`     | [Save query](/api-reference/queries/save)         |
| `DELETE` | `/queries/:id` | Delete the saved query; returns `204`.            |

**Next:** [List saved queries](/api-reference/queries/list) or [Save query](/api-reference/queries/save).
