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

# Export URL Data

> This endpoint allows you to export comprehensive data of your shortened URL in multiple formats. The response contains raw data in the specified format.



## OpenAPI

````yaml /openapi-v0.json post /export/{shortCode}/{exportFormat}
openapi: 3.0.3
info:
  title: Spoo.me API
  description: >-
    Spoo.me is a free and open-source URL shortening service that provides
    powerful features for creating and managing shortened URLs with
    comprehensive analytics.
  version: 0.0.1
  contact:
    name: Spoo.me Support
    url: https://spoo.me/contact
    email: support@spoo.me
  license:
    name: Apache 2.0
    url: https://github.com/spoo-me/spoo/blob/main/LICENSE
servers:
  - url: https://spoo.me
    description: Production server
security: []
tags:
  - name: URL Shortening
    description: Operations for creating shortened URLs
  - name: Analytics
    description: Operations for retrieving URL analytics and statistics
  - name: Data Export
    description: Operations for exporting URL data in various formats
paths:
  /export/{shortCode}/{exportFormat}:
    post:
      tags:
        - Data Export
      summary: Export URL Data
      description: >-
        This endpoint allows you to export comprehensive data of your shortened
        URL in multiple formats. The response contains raw data in the specified
        format.
      operationId: exportUrlData
      parameters:
        - name: shortCode
          in: path
          required: true
          description: >-
            The short code of the URL you want to export data for. Can represent
            the short code of both regular and emoji URLs.
          schema:
            type: string
          example: exa
        - name: exportFormat
          in: path
          required: true
          description: The format for data export
          schema:
            type: string
            enum:
              - json
              - csv
              - xlsx
              - xml
          example: json
      requestBody:
        required: false
        content:
          application/x-www-form-urlencoded:
            schema:
              type: object
              properties:
                password:
                  type: string
                  description: >-
                    Password of the shortened URL if it's password protected.
                    Required only for password-protected URLs.
                  example: Example@12
      responses:
        '200':
          description: Data exported successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JsonData'
            application/zip:
              schema:
                $ref: '#/components/schemas/CsvZipData'
            application/vnd.openxmlformats-officedocument.spreadsheetml.sheet:
              schema:
                $ref: '#/components/schemas/XlsxData'
            application/xml:
              schema:
                $ref: '#/components/schemas/XmlData'
        '400':
          description: Bad Request - Invalid password or format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                PasswordError:
                  summary: Invalid password
                  value:
                    error: PasswordError
                    message: Invalid password
                FormatError:
                  summary: Invalid export format
                  value:
                    error: FormatError
                    message: Invalid export format
        '404':
          description: URL not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error: UrlError
                message: The requested URL never existed
components:
  schemas:
    JsonData:
      type: string
      format: binary
      description: Downloadable JSON file containing the exported data
    CsvZipData:
      type: string
      format: binary
      description: ZIP archive containing CSV file(s) of the exported data
    XlsxData:
      type: string
      format: binary
      description: XLSX file containing the exported data
    XmlData:
      type: string
      format: binary
      description: Downloadable XML file containing the exported data
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error type identifier
        message:
          type: string
          description: Human-readable error message
      required:
        - error
        - message

````