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

# Export

> Export stored NearIQ data by dashboard tab.

Export account data from stored NearIQ rows. Export reads do not trigger provider lookups or paid data refreshes. Public v1 exports return raw stored facts and reject generated scores, classifications, recommendations, valuations, projections, and other dashboard-only intelligence fields.

<ParamField header="X-NearIQ-Key" type="string" required>
  Your API key from Settings > API Keys. Required scope: `export`.
</ParamField>

<ParamField query="tab" type="string" default="overview">
  One or more comma-separated tabs: `competitors`, `reviews`, `ranks`, `alerts`, `content`, `ai-visibility`, `signals`, `gap-analysis`, `citations`, `gbp-insights`, `market`, `reports`, `agents`, `jobs`, `overview`, or `map`.
</ParamField>

<ParamField query="format" type="string" default="json">
  Response format: `json`, `csv`, `xlsx`, or `gsheets`.
</ParamField>

<ParamField query="dateRange" type="string" default="90d">
  Time range: `7d`, `14d`, `30d`, `90d`, `1y`, or `all`.
</ParamField>

<ParamField query="fields" type="string">
  Optional comma-separated metric registry keys such as `competitor.name,competitor.rating`. Redacted intelligence fields are rejected before data is loaded.
</ParamField>

<ParamField query="competitorId" type="string">
  Optional competitor UUID for detail exports. Detail exports include snapshots, review breakdown, products, hiring rows, ad rows, and tech stack rows for that competitor.
</ParamField>

Exports are limited to 10 exports per hour per account. Use `fields` when you only need specific metric registry columns.

## Single Export

<RequestExample>
  ```bash cURL theme={null}
  curl "https://app.neariq.io/api/v1/export?tab=competitors&format=xlsx&fields=competitor.name,competitor.rating" \
    -H "X-NearIQ-Key: niq_your_key_here"
  ```

  ```javascript JavaScript theme={null}
  const neariq = new NearIQ({ apiKey: 'niq_your_key_here' })
  const data = await neariq.export.get({
    tab: 'competitors',
    format: 'json',
    fields: ['competitor.name', 'competitor.rating']
  })
  ```
</RequestExample>

## Full Account Bundle

`GET /api/v1/export/all?format=zip` bundles JSON, CSV, and Excel files for every export tab into one ZIP.

```bash theme={null}
curl "https://app.neariq.io/api/v1/export/all?format=zip" \
  -H "X-NearIQ-Key: niq_your_key_here" \
  --output neariq-export.zip
```

## Google Sheets

Use `format=gsheets` to create a spreadsheet from the export. If Google Sheets authorization is missing or the existing Google connection lacks Sheets scope, the response returns `google_sheets_authorization_required` with a one-time consent URL. Visit that URL while signed in, approve the added Sheets scope, then retry the export.
