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

# Parse a tracked-items CSV

> Parse a CSV (`platform,type,value,country`) into tracked items without saving. Max 5 MiB. Requires the `uploadCrawlSettingsCsv` flag.



## OpenAPI

````yaml https://api.xpoz.ai/openapi.json post /api/crawl/settings/upload-csv
openapi: 3.1.0
info:
  title: XPOZ API
  version: 1.0.0
  description: >-
    Social media data API for Twitter/X, Instagram, Reddit, and TikTok.


    **Data endpoints** (`/api/data/*`) are authenticated with an API access key
    and are metered against the account's credits. Most stored-data endpoints
    share the same query options: `fields` selects which attributes to return,
    `since`/`until` bound the date range, and `responseType` picks between a
    synchronous first page (`fast`), a full paged query run as a background
    operation (`paging`), and a CSV export (`csv`). `/live` endpoints fetch from
    the platform on demand and page with a cursor instead.


    **Account, billing, and crawl-settings endpoints** are used by the XPOZ
    dashboard and authenticate with the user's session.
servers:
  - url: https://api.xpoz.ai
    description: Production
security: []
tags:
  - name: Twitter (live)
    description: >-
      On-demand Twitter/X fetches straight from the platform, cursor-paginated.
      Not available for trial access keys.
  - name: Instagram (live)
    description: >-
      On-demand Instagram fetches straight from the platform, cursor-paginated.
      Not available for trial access keys.
  - name: Reddit (live)
    description: >-
      On-demand Reddit fetches straight from the platform, cursor-paginated. Not
      available for trial access keys.
  - name: TikTok (live)
    description: >-
      On-demand TikTok fetches straight from the platform, cursor-paginated. Not
      available for trial access keys.
  - name: Operations
    description: Polling for background operations started with `responseType=paging`.
  - name: Account
    description: Access keys, plan, and usage of the signed-in user.
  - name: Billing
    description: Stripe checkout, subscription changes, and add-on purchases.
  - name: Crawl Settings
    description: Tracked items collected on a schedule.
  - name: System Status
    description: Platform status page and notifications.
  - name: Platform
    description: Health, metrics, and this spec.
paths:
  /api/crawl/settings/upload-csv:
    post:
      tags:
        - Crawl Settings
      summary: Parse a tracked-items CSV
      description: >-
        Parse a CSV (`platform,type,value,country`) into tracked items without
        saving. Max 5 MiB. Requires the `uploadCrawlSettingsCsv` flag.
      operationId: postCrawlSettingsUploadCsv
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                file:
                  type: string
                  format: binary
              required:
                - file
      responses:
        '200':
          description: Parsed items.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    const: true
                  data:
                    $ref: '#/components/schemas/CrawlSettings'
                required:
                  - success
                  - data
        '400':
          $ref: '#/components/responses/ValidationError'
        '401':
          $ref: '#/components/responses/UnauthorizedMessage'
        '403':
          description: Missing flag or plan limit exceeded.
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ErrorField'
                  - $ref: '#/components/schemas/PlanLimitExceeded'
        '500':
          description: Server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LegacyFailure'
      security:
        - UserSession: []
components:
  schemas:
    CrawlSettings:
      type: object
      properties:
        twitter:
          type: object
          properties:
            keywords:
              type: array
              items:
                $ref: '#/components/schemas/TrackedKeyword'
            users:
              type: array
              items:
                type: string
        instagram:
          type: object
          properties:
            keywords:
              type: array
              items:
                $ref: '#/components/schemas/TrackedKeyword'
            users:
              type: array
              items:
                type: string
        reddit:
          type: object
          properties:
            keywords:
              type: array
              items:
                $ref: '#/components/schemas/TrackedKeyword'
            subreddits:
              type: array
              items:
                type: string
            users:
              type: array
              items:
                type: string
        tiktok:
          type: object
          properties:
            keywords:
              type: array
              items:
                $ref: '#/components/schemas/TrackedKeyword'
            users:
              type: array
              items:
                type: string
            hashtags:
              type: array
              items:
                type: string
      description: Tracked items per platform.
    ErrorField:
      type: object
      properties:
        error:
          type: string
      required:
        - error
    PlanLimitExceeded:
      type: object
      properties:
        success:
          type: boolean
          const: false
        error:
          type: string
          enum:
            - PLAN_LIMIT_EXCEEDED
        message:
          type: string
        data:
          type: object
          properties:
            currentCount:
              type: integer
            planTrackedItems:
              type: integer
            extraTrackedItems:
              type: integer
            planName:
              type: string
      required:
        - success
        - error
        - message
    LegacyFailure:
      type: object
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
        error:
          type: string
      required:
        - success
        - message
    TrackedKeyword:
      anyOf:
        - type: string
        - type: object
          properties:
            value:
              type: string
            country:
              type: string
              pattern: ^[A-Za-z]{2}$
          required:
            - value
    SimpleError:
      type: object
      properties:
        success:
          type: boolean
          const: false
        message:
          type: string
      required:
        - success
        - message
    MessageError:
      type: object
      properties:
        message:
          type: string
      required:
        - message
  responses:
    ValidationError:
      description: >-
        Query or body validation failed. `message` joins all validation issues
        with `, `.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SimpleError'
    UnauthorizedMessage:
      description: Missing or invalid credentials.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/MessageError'
  securitySchemes:
    UserSession:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Descope session JWT of a logged-in dashboard user. Send as
        `Authorization: Bearer <session JWT>`.

````

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