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

# Query qualified visitor data via API key

> Returns visitors matching either a saved segment or a canonical RuleAST. Provide exactly one of `segmentId` or `ruleAst`. Authenticated via `X-API-Key` header.



## OpenAPI

````yaml https://api.aws53.cloud/openapi-data.json post /v1/data/query
openapi: 3.1.0
info:
  title: Identification API
  version: 1.0.0
  description: >-
    Programmatic access to your visitor data and pixel management. Authenticate
    with your API key (X-API-Key header).
servers:
  - url: https://api.aws53.cloud
    description: Production
security:
  - apiKeyAuth: []
tags:
  - name: Visitors
  - name: Pixels
  - name: Account
  - name: Visitor Suppression
paths:
  /v1/data/query:
    post:
      tags:
        - Visitors
      summary: Query qualified visitor data via API key
      description: >-
        Returns visitors matching either a saved segment or a canonical RuleAST.
        Provide exactly one of `segmentId` or `ruleAst`. Authenticated via
        `X-API-Key` header.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataApiQualificationQuery'
      responses:
        '200':
          description: Qualified visitor data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties: {}
                      additionalProperties: {}
                  meta:
                    type: object
                    properties:
                      page:
                        type: integer
                      limit:
                        type: integer
                      total:
                        type: integer
                      totalPages:
                        type: integer
                      hasMore:
                        type: boolean
                    required:
                      - page
                      - limit
                      - total
                      - totalPages
                      - hasMore
                required:
                  - data
                  - meta
        '400':
          description: Invalid source selection, rule shape, rule semantics, or complexity
        '401':
          description: Missing or invalid API key
        '403':
          description: API key revoked or organization inactive
        '404':
          description: Saved segment not found
        '429':
          description: Qualification query rate limit exceeded
        '500':
          description: Saved segment definition is invalid
        '503':
          description: Service unavailable
      security:
        - apiKeyAuth: []
components:
  schemas:
    DataApiQualificationQuery:
      type: object
      properties:
        segmentId:
          type:
            - string
            - 'null'
          format: uuid
          description: Saved segment to query. Mutually exclusive with ruleAst.
        ruleAst:
          description: Canonical RuleAST. Mutually exclusive with segmentId.
        page:
          type: integer
          minimum: 1
          default: 1
        limit:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: >-
        Organization API key (sk_...). Get yours from Settings > API Keys in the
        dashboard.

````