---
title: "List Archive Searches"
method: GET
path: "/api/v2/logs/archive_searches"
tags: ["Logs Archive Searches"]
---

# List Archive Searches

`GET /api/v2/logs/archive_searches`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/logs/archive_searches`
- 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/get.ts> (a function with typed inputs; its response is checked against the schema)

List the organization's Archive Searches that haven't expired, up to 5,000. When more
exist, `meta.truncated` is `true`.

## Response `200`

OK

- ArchiveSearchListResponse: Response containing multiple Archive Searches.
  - `data` ArchiveSearchResponseData[], required: Array of Archive Searches.
    - `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.
  - `meta` ArchiveSearchListResponseMeta: Metadata of the Archive Searches response.
    - `truncated` boolean: Whether more Archive Searches exist beyond the ones returned.

## Other responses

- `403`: Forbidden
- `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/3f70db624329?raw)
