---
title: "Get an Archive Search"
method: GET
path: "/api/v2/logs/archive_searches/{archive_search_id}"
tags: ["Logs Archive Searches"]
---

# Get an Archive Search

`GET /api/v2/logs/archive_searches/{archive_search_id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/logs/archive_searches/{archive_search_id}`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/logs/archive_searches/:archive_search_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a single Archive Search, including its status and the amount of archive data scanned when the search finishes.

## Path parameters

- `archive_search_id` string, required

## Response `200`

OK

- ArchiveSearchResponse: Response containing a single Archive Search.
  - `data` ArchiveSearchResponseData, required: Archive Search object.
    - `attributes` ArchiveSearchResponseAttributes, required: Attributes of an Archive Search.
      - `archive_id` string, required: ID of the archive being searched.
      - `bytes_scanned` integer, required: Number of bytes read from the archive at the end of the search.
      - `completed_at` string, date-time: Time the Archive Search finished, as an ISO 8601 timestamp. Absent while the search is still running.
      - `created_at` string, date-time, required: Time the Archive Search was created, as an ISO 8601 timestamp.
      - `description` string: Free-text description of the Archive Search.
      - `events_scanned` integer, required: Number of events read from the archive at the end of the search.
      - `expected_duration` integer: Estimated time left before the Archive Search completes, in seconds.
      - `from` string, date-time, required: Start of the searched time range, as an ISO 8601 timestamp.
      - `name` string, required: Name of the Archive Search.
      - `query` string, required: Log search query used to filter the archived logs.
      - `rehydration` ArchiveSearchRehydration: Rehydration settings of the Archive Search. Absent when the search only scans the archive without indexing the results.
        - `max_rehydrated_events` integer, required: Maximum number of events to rehydrate.
        - `retention_days` integer, required: Number of days the rehydrated logs are retained for.
        - `tier` 'standard' | 'flex', required: Storage tier the matched logs are rehydrated into.
      - `status` 'RUNNING' | 'COMPLETED' | 'FAILED' | 'CANCELLED' | 'QUOTA_REACHED' | 'EXPIRED', required: Current state of an Archive Search.
      - `to` string, date-time, required: End of the searched time range, as an ISO 8601 timestamp.
    - `id` string, required: Unique identifier of the Archive Search.
    - `type` 'archive_search', required: Archive Search resource type.

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `404`: Not Found
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/c555647b183a?raw)
