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

# Usage log

> Retrieve the paginated per-request usage log for the packages your API key can access, with traffic and credits per entry. The date range is at most 90 days. Ordering by a non-date column needs a range of at most 31 days or a `package_ids` filter. Pass `pagination_metadata.next_cursor` as `cursor` to fetch the next page while `has_more` is true.

If the API key is restricted to specific packages, results (and any `package_ids` filter) are limited to those packages.

Requires the `proxy:analytics:read` scope.



## OpenAPI

````yaml api/openapi.json POST /v1/proxy/analytics/log
openapi: 3.1.0
info:
  title: SOAX API
  version: v1
  description: >-
    Programmatic access to your SOAX account: manage proxy packages, generate
    connection strings, browse available locations, pull usage analytics, and
    manage API keys. All endpoints are served over HTTPS and return JSON.
servers:
  - url: https://api.platform.soax.com
security:
  - bearerAuth: []
tags:
  - name: API Keys
    description: >-
      Self-service management of the API keys used to authenticate with this
      API.
  - name: Packages
    description: >-
      Read proxy packages, build proxy connection strings, and rotate package
      passwords.
  - name: Stateful Sessions
    description: Create and manage long-lived, server-configured proxy sessions.
  - name: Locations
    description: >-
      Location reference data: tiers, countries, regions, cities, ISPs, ASNs,
      and ZIP codes.
  - name: Account
    description: Read-only account, credit, and subscription information.
  - name: Analytics
    description: Usage analytics for your proxy packages.
paths:
  /v1/proxy/analytics/log:
    post:
      tags:
        - Analytics
      summary: Usage log
      description: >-
        Retrieve the paginated per-request usage log for the packages your API
        key can access, with traffic and credits per entry. The date range is at
        most 90 days. Ordering by a non-date column needs a range of at most 31
        days or a `package_ids` filter. Pass `pagination_metadata.next_cursor`
        as `cursor` to fetch the next page while `has_more` is true.


        If the API key is restricted to specific packages, results (and any
        `package_ids` filter) are limited to those packages.


        Requires the `proxy:analytics:read` scope.
      operationId: get_usage_log_v1_proxy_analytics_log_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UsageLogRequest'
            example:
              from_date: '2026-08-01T00:00:00Z'
              to_date: '2026-08-07T23:59:59Z'
              limit: 2
              countries:
                - us
              include_total: true
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageLogResponse'
              example:
                data:
                  - date: '2026-08-07T14:00:00Z'
                    package:
                      id: b2f0c3d4-e5a6-4b7c-8d9e-0f1a2b3c4d5e
                      name: Scraping
                      key: pk_live_example
                      network_types:
                        - residential
                      status: active
                    ingress_ip: 203.0.113.10
                    proxy_type: residential
                    tier: 1
                    country: us
                    domain: example.com
                    traffic_gb: 1.25
                    credits_burned: 2.5
                pagination_metadata:
                  has_more: true
                  next_cursor: eyJvIjoyfQ
                  total: 148
        '400':
          description: >-
            A parameter value or combination is invalid. Service-level
            validation errors use the `error` key; endpoint-level checks use
            `detail`. Read `detail ?? error`.
          content:
            application/json:
              schema:
                type: object
                properties:
                  detail:
                    type: string
                  error:
                    type: string
              example:
                error: hour interval requires a date range less than 24 hours
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenScope'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    UsageLogRequest:
      properties:
        from_date:
          type: string
          format: date-time
          title: From Date
          description: Start of the query range (ISO 8601).
        to_date:
          type: string
          format: date-time
          title: To Date
          description: >-
            End of the query range (ISO 8601). Must be after `from_date`, at
            most 90 days later.
        interval:
          anyOf:
            - $ref: '#/components/schemas/Interval'
            - type: 'null'
          description: Time bucket size for the log rows.
        cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Cursor
          description: '`pagination_metadata.next_cursor` from the previous page.'
        limit:
          type: integer
          minimum: 1
          maximum: 100
          default: 20
          title: Limit
          description: Entries per page (1-100).
        order_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Order By
          description: >-
            Column to sort by. Prefix with `-` for descending order. Default:
            `-date`. Any other column needs a range of at most 31 days, or a
            `package_ids` filter.
        exclude_columns:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Exclude Columns
          description: Columns to omit from each entry.
        package_ids:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Package Ids
          description: Restrict results to these package IDs.
        network_types:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Network Types
          description: 'Restrict results to network types: `residential` and/or `mobile`.'
        tiers:
          anyOf:
            - items:
                type: integer
              type: array
            - type: 'null'
          title: Tiers
          description: Restrict results to tiers (1, 2, or 3).
        countries:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Countries
          description: Restrict results to these ISO country codes.
        target_addresses:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Target Addresses
          description: Restrict results to traffic sent to these domains.
        include_total:
          type: boolean
          default: false
          title: Include Total
          description: Return `pagination_metadata.total`. Adds query cost.
      type: object
      required:
        - from_date
        - to_date
      title: UsageLogRequest
      description: Request model for the usage log.
    UsageLogResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/UsageLogEntry'
          type: array
          title: Data
        pagination_metadata:
          $ref: '#/components/schemas/PaginationMetadata'
      type: object
      required:
        - data
        - pagination_metadata
      title: UsageLogResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    Interval:
      type: string
      enum:
        - hour
        - day
        - month
      title: Interval
      description: Allowed time intervals for analytics aggregation.
    UsageLogEntry:
      properties:
        date:
          anyOf:
            - type: string
            - type: 'null'
          title: Date
          description: Date in ISO format.
        package:
          anyOf:
            - $ref: '#/components/schemas/UsageLogPackageInfo'
            - type: 'null'
        ingress_ip:
          anyOf:
            - type: string
            - type: 'null'
          title: Ingress Ip
        proxy_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Proxy Type
          description: '`residential` or `mobile`.'
        tier:
          anyOf:
            - type: integer
            - type: 'null'
          title: Tier
        country:
          anyOf:
            - type: string
            - type: 'null'
          title: Country
          description: ISO country code.
        domain:
          anyOf:
            - type: string
            - type: 'null'
          title: Domain
        traffic_gb:
          anyOf:
            - type: number
            - type: 'null'
          title: Traffic Gb
        credits_burned:
          anyOf:
            - type: number
            - type: 'null'
          title: Credits Burned
      type: object
      title: UsageLogEntry
      description: One usage log entry. Columns listed in `exclude_columns` are omitted.
    PaginationMetadata:
      properties:
        has_more:
          type: boolean
          title: Has More
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: Pass as `cursor` to fetch the next page.
        total:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total
          description: Total rows. Only present when `include_total` is true.
      type: object
      required:
        - has_more
        - next_cursor
      title: PaginationMetadata
      description: Cursor pagination metadata.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    UsageLogPackageInfo:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        key:
          type: string
          title: Key
        network_types:
          items:
            type: string
          type: array
          title: Network Types
        status:
          type: string
          title: Status
      type: object
      required:
        - id
        - name
        - key
        - network_types
        - status
      title: UsageLogPackageInfo
  responses:
    Unauthorized:
      description: Missing, invalid, or revoked API key.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
          example:
            detail: Invalid API key
    ForbiddenScope:
      description: The API key does not carry the scope this endpoint requires.
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
          example:
            detail: 'Missing required scope: proxy:packages:read'
    RateLimited:
      description: >-
        Rate limit exceeded (5 requests/second per API key, 500 requests/minute
        per IP). The response includes `Retry-After` (seconds),
        `RateLimit-Limit`, `RateLimit-Remaining`, and `RateLimit-Reset` (Unix
        time) headers — wait `Retry-After` seconds and retry.
      content:
        application/json:
          schema:
            type: object
            properties:
              error:
                type: string
          example:
            error: 'Rate limit exceeded: 5 per 1 second'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key secret (starts with `s_live_`). Create keys in the dashboard
        under [**Settings → API
        keys**](https://platform.soax.com/settings/api-keys), or via `POST
        /v1/api-keys/`. Send it as `Authorization: Bearer <secret>`.

````

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