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

# Export Data

> Stream dataset exports across rank tracking, GSC, Bing, analytics, AI visibility, on-page SEO, and outreach.

Streams complete datasets for selected source sections using newline-delimited JSON (`application/x-ndjson`).

Periodic heartbeat events `{ "type": "heartbeat" }` are sent while the export prepares, followed by a `{ "type": "complete", "data": ... }` or `{ "type": "error", "message": string }` event.

### Supported Sources and Sections

| Source | Allowed Sections |
| - | - |
| `gsc` | `overview`, `summary`, `topPages`, `searchQueries`, `devices`, `countries` |
| `bing` | `overview`, `summary`, `topPages`, `searchQueries` |
| `analytics` | `trend`, `pages`, `sources`, `devices`, `countries` |
| `rank-tracking` | `trackedKeywords`, `topKeywords`, `keywordChanges`, `distributionTrend` |
| `ai-visibility` | `promptResponses`, `sources`, `brandMentions`, `promptsSummary` |
| `outreach` | `prospects`, `contacts`, `people`, `pages`, `emails` |
| `on-page-seo` | `seoPages`, `pageSpeed`, `geoPages`, `linkPages` |

`provider` applies to the `analytics` source only and defaults to `ga`.

### Validation Errors

Requests are validated before streaming starts, so these failures return a plain JSON `400`, not an NDJSON event:

* `Invalid export sections or date range.` - a section is not allowed for the source, `startDate` is after `endDate`, `selection.section` is not allowed for the source, or a `selection` has no `section` (only `ai-visibility` and `outreach` may omit it).
* `This export section does not support row selection.`

### Row Selection

`selection` limits the export to chosen rows. These sections accept it:

| Source | Selectable Sections |
| - | - |
| `gsc` | `topPages`, `searchQueries`, `devices`, `countries` |
| `bing` | `topPages`, `searchQueries` |
| `analytics` | `pages`, `sources`, `countries` |
| `rank-tracking` | `trackedKeywords`, `topKeywords`, `keywordChanges` |
| `ai-visibility`, `outreach` | Selection without a `section` |

### Response Keys

The keys inside `complete.data` are not always the section names.

| Source | Section | Key in `data` |
| - | - | - |
| `gsc`, `bing` | `overview`, `summary` | `stats` |
| `analytics` | `trend` | `chart` |
| `analytics` | `devices` | `devices`, `browsers`, `os` |
| `on-page-seo` | `seoPages` | `crawledPages` |
| `on-page-seo` | `pageSpeed` | `crawledPages`, `crawledPagesDesktop` |
| `on-page-seo` | `geoPages` | `geoPages` |
| `on-page-seo` | `linkPages` | `linkGraph` |
| `ai-visibility` | all sections | `prompts`, plus `details` for `promptResponses`, `sources`, and `brandMentions` |
| `outreach` | `emails` | `emails`, `messages` |
| `outreach` | `contacts` | No key of its own (rows come from `prospects`) |

Other sections use their own name as the key.

If a source returns truncated data, the stream ends with an `error` event instead of partial data.


## OpenAPI

````yaml POST /v3/exports/data
openapi: 3.0.0
info:
  title: SnowSEO API
  description: API documentation for SnowSEO
  version: 1.0.0
servers:
  - url: https://api.snowseo.com
    description: Production server
security:
  - bearerAuth: []
  - apiKey: []
externalDocs:
  url: https://snowseo.com/docs
  description: Find more info here
paths:
  /v3/exports/data:
    post:
      tags:
        - Exports
      summary: Export complete datasets for selected source sections
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              additionalProperties: false
              required:
                - teamId
                - source
                - sections
                - endDate
              properties:
                teamId:
                  type: string
                  minLength: 1
                  description: Team ID.
                source:
                  type: string
                  enum:
                    - gsc
                    - bing
                    - analytics
                    - rank-tracking
                    - ai-visibility
                    - outreach
                    - on-page-seo
                  description: Which product's data to export.
                sections:
                  type: array
                  minItems: 1
                  uniqueItems: true
                  items:
                    type: string
                  description: >-
                    Sections of the source to include. Each source allows its
                    own set.
                startDate:
                  type: string
                  format: date
                  description: >-
                    Start of the period. Omit for All Time (from the first
                    data). on-page-seo ignores it and exports the current audit.
                endDate:
                  type: string
                  format: date
                  description: End of the period.
                provider:
                  type: string
                  enum:
                    - ga
                    - posthog
                    - plausible
                    - snow
                  description: Analytics provider for the analytics source.
                filters:
                  type: object
                  additionalProperties: false
                  description: >-
                    Source-specific filters, the same ones the matching table
                    applies.
                  properties:
                    outreachView:
                      type: string
                      enum:
                        - prospects
                        - people
                    peopleStage:
                      type: string
                      enum:
                        - all
                        - needs-email
                        - ready
                        - emailed
                    search:
                      type: string
                    keywords:
                      type: array
                      items:
                        type: string
                    groups:
                      type: object
                      additionalProperties:
                        type: array
                        items:
                          type: string
                    tab:
                      type: string
                      enum:
                        - Top
                        - Growing
                        - Decaying
                        - Long Tail
                        - Questions
                    positionBand:
                      type: string
                      enum:
                        - top3
                        - 4-10
                        - 11-20
                        - 21-49
                        - 50-100
                        - 100+
                    country:
                      type: string
                    device:
                      type: string
                    type:
                      type: string
                    scope:
                      type: string
                      enum:
                        - all
                        - ranked
                        - tracked
                    sortBy:
                      type: string
                    sortDir:
                      type: string
                      enum:
                        - asc
                        - desc
                    intent:
                      type: string
                    promptTypes:
                      type: array
                      items:
                        type: string
                        enum:
                          - branded
                          - unbranded
                selection:
                  description: Export only these row IDs, or every row except these.
                  oneOf:
                    - type: object
                      additionalProperties: false
                      required:
                        - mode
                        - ids
                      properties:
                        section:
                          type: string
                        mode:
                          type: string
                          enum:
                            - ids
                        ids:
                          type: array
                          items:
                            type: string
                    - type: object
                      additionalProperties: false
                      required:
                        - mode
                        - excludedIds
                      properties:
                        section:
                          type: string
                        mode:
                          type: string
                          enum:
                            - all
                        excludedIds:
                          type: array
                          items:
                            type: string
      responses:
        '200':
          description: Default Response
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Your SnowSEO API key (sk_...).
    apiKey:
      type: apiKey
      name: x-api-key
      in: header

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.