---
title: "Queue a raw export job"
method: POST
path: "/search/raw/export"
tags: ["Raw Search"]
---

# Queue a raw export job

`POST /search/raw/export`

Queue an asynchronous export job for raw search results. Mode 'rows' exports a CSV of matching lines, mode 'parts' exports a text snapshot of matching parts.

**Important**: This export only includes results that have been previously unlocked via Mass Unlock. No points are consumed during export. Use `/search/raw/unlock/task` to unlock results first.

## Query parameters

- `export` string, required — Export mode: `rows` (CSV of matching lines) or `parts` (text snapshot of matching parts).
- `dedup` boolean — Deduplicate the export. `rows`: drop duplicate lines (whitespace-normalized, case-insensitive). `parts`: drop blocks with identical content.

## Request body

- RawSearchRequest
  - `q` string, nullable — Optional full text query to match within raw blocks. Quotes are ignored for the length check. When omitted or empty, you must provide at least one filter among container_id, exts, categories, file_name.
  - `container_id` integer, nullable — Restrict the search to a specific container id.
  - `exts` string[], nullable — List of file extensions to include (case-insensitive, without leading dot).
  - `exts_not` string[], nullable — List of file extensions to exclude (case-insensitive, without leading dot).
  - `categories` string[], nullable — Filter results by raw file category. Applied after the search query.
  - `categories_not` string[], nullable — Exclude these raw file categories. Applied after the search query.
  - `file_name` string[], nullable — Case-insensitive wildcards that must match the entry name (OR by default, AND if force_and=true).
  - `file_name_not` string[], nullable — Case-insensitive wildcards that must NOT match the entry name.
  - `folder_name` string[], nullable — Case-insensitive match on the folder holding the block (OR by default, AND if force_and=true). By default the value must appear anywhere in the folder path; with folder_name_exact=true it must be a whole folder at any depth. Leading and trailing slashes are ignored.
  - `folder_name_not` string[], nullable — Folders to exclude, same matching rules as folder_name. Not a standalone selector: a search using only folder_name_not is rejected, provide q or another positive filter.
  - `force_and` boolean, nullable — When true, require all file_name values to match, and all folder_name values to match (AND instead of OR within each list).
  - `file_name_exact` boolean, nullable — When true, file_name / file_name_not match the entry name exactly (case-insensitive) instead of as a 'contains' wildcard.
  - `folder_name_exact` boolean, nullable — When true, folder_name / folder_name_not must match a whole folder at any depth: 'data' matches 'a/b/data' but not 'a/b/database'. A value containing slashes matches a whole run of folders ('b/data' matches 'a/b/data/c'). Without it the value is matched as a substring of the folder path.
  - `q_exact` boolean, nullable — When true, the q term must match on word boundaries: '4.4.4.4' will not match '4.4.4.400'. Applied as a content post-filter (no effect without q).
  - `exclude_terms` string[], nullable — Content terms to exclude: any block whose content contains one of these (substring, case-insensitive) is removed from the results. Min 4 characters per term, max 20 terms. Not a standalone selector: a search using only exclude_terms is rejected, provide q or another positive filter.
  - `ingested_at_min` string, date-time, nullable — Filter results ingested on or after this datetime (inclusive).
  - `ingested_at_max` string, date-time, nullable — Filter results ingested on or before this datetime (inclusive).

## Response `200`

Export job queued successfully.

- ExportResponse
  - `status` string, required — Export job status: 'queued', 'processing', 'completed', or 'failed'.
  - `message` string, required — Human-readable status message.
  - `export_id` integer, required — ID of the export job. Use this to check status or download the result.

## Other responses

- `400` — Invalid query (too short, too long, or empty with no filters), maximum concurrent exports reached.
- `401` — Authentication required, or invalid/expired API key.
- `403` — Raw export requires an active raw plan, search blocked, account banned, or pending email verification.
- `409` — An identical export is already queued/running, or an identical Raw Export is still in its quarantine cooling-off period.
- `422` — Validation Error
- `429` — Rate limit exceeded. See Retry-After / X-RateLimit-* headers.
- `500` — Error while creating the export job.
- `503` — Raw search under maintenance, or public API temporarily disabled.

---

[API](https://skmtc.dev/leakradar/apis/leakradar-io-api.md) · [All operations](https://skmtc.dev/leakradar/apis/leakradar-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/leakradar/leakradar-io-api/revisions/82a99c608e1a/schema)
