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

# Prices: History

> Query historical price changes that were valid/active during the specified date range (requires at least one filter)

Returns raw per-offer GPU price records that were valid/active during a date range — the full change history behind a vendor's quotes, one row per snapshot. Filtering is **overlap-based**: a record is returned if its validity window overlaps `[start_date, end_date]`. Either bound may be omitted (open-ended range).

<Note>
  **Premium — historical data.** This endpoint requires the `prices-history` scope, granted separately from `prices` — a token can have current access without history. Contact [david@compute-index.com](mailto:david@compute-index.com) to request access.
</Note>

<Info>
  The interactive playground ("Try it") shows only the **first page** of results — the full result set can run to hundreds of thousands of records. Page through the complete data with `page` / `page_size` (max 1000).
</Info>

<Note>
  At least one filter is required (`vendor`, `gpu_model`, `gpu_canonical_name`, `region`, `contract_type`, `product_key`, or `base_product_key`) — an unfiltered history query returns `400`. Use `page` / `page_size` to page through large results.
</Note>

For a point-in-time snapshot rather than a range, use [As Of Date](/pricing/endpoint/prices-as-of).

## Example

```bash theme={null}
# H100 price changes, newest first
curl -H "Authorization: Bearer $TOKEN" \
  "https://data-api.compute-index.com/v1/prices/history?gpu_model=H100&sort_by=available_at&sort_order=desc"

# AWS records active during Oct 14–18 2024, in two regions
curl -H "Authorization: Bearer $TOKEN" \
  "https://data-api.compute-index.com/v1/prices/history?vendor=aws&region=us-east-1,us-west-2&start_date=2024-10-14&end_date=2024-10-18"
```


## OpenAPI

````yaml pricing/openapi.json GET /v1/prices/history
openapi: 3.1.0
info:
  title: GPU Pricing API
  description: |2-

        **GPU Pricing API** provides real-time and historical pricing data
        for GPU compute across 50+ cloud providers and GPU marketplaces.

        ## Features
        - Search current prices across vendors
        - Historical price trends
        - GPU transaction data
        - **Transaction Aggregates** — privacy-safe blends of settled GPU transactions
        - **Informational Price Index** — EWMA-smoothed composite indices by GPU family, region, and contract type
        - **Transaction Price Index** — smoothed indices derived from verified GPU transactions
        - **Custom Index** — EWMA-smoothed H100 sub-model indices by region, contract type, and vendor category
        - Global region coverage (US, EU, APAC)
        - GPU availability tracking
        - Scope-based API key access control

        ## Authentication
        Send your token as a Bearer token in the `Authorization` header on every request:
        ```
        Authorization: Bearer YOUR_TOKEN
        ```
        Example:
        ```bash
        curl -H "Authorization: Bearer $TOKEN" "https://data-api.compute-index.com/v1/vendors"
        ```
        Tokens are issued by Compute Index (david@compute-index.com); long-lived, treat as secrets.

        > The legacy `X-API-Key` header is deprecated — use the `Authorization: Bearer` header above.

        ## Rate Limits
        - **Free tier**: 10 requests/minute, 1,000/day
        - **Pro tier**: 100 requests/minute, 100,000/day
        - **Enterprise**: Custom limits

        Limits are per key, on fixed windows: the per-minute window resets at the top
        of each minute and the daily quota at 00:00 UTC.

        ## Data Coverage
        - 50+ vendors (AWS, Azure, GCP, Oracle, CoreWeave, Lambda, RunPod, Vast.AI, FluidStack, Vultr, etc.)
        - 30M+ historical pricing records
        - Updated multiple times daily

        ## Support
        - Support: david@compute-index.com
        
  contact:
    name: API Support
    email: david@compute-index.com
  license:
    name: Commercial License
    url: https://compute-desk.com/license
  version: 1.0.0
servers:
  - url: https://data-api.compute-index.com
security: []
paths:
  /v1/prices/history:
    get:
      tags:
        - Prices
      summary: Get historical GPU prices valid between date filters
      description: >-
        Query historical price changes that were valid/active during the
        specified date range (requires at least one filter)
      operationId: get_historical_prices_v1_prices_history_get
      parameters:
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            description: Page number (starts at 1)
            default: 1
            title: Page
          description: Page number (starts at 1)
        - name: page_size
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: Items per page (max 1000)
            default: 100
            title: Page Size
          description: Items per page (max 1000)
        - name: vendor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by vendor (exact match). Supports comma-separated list (max
              20). Example: aws,gcp,azure
            title: Vendor
          description: >-
            Filter by vendor (exact match). Supports comma-separated list (max
            20). Example: aws,gcp,azure
        - name: gpu_model
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by GPU model (partial match). Supports comma-separated list
              (max 5). Example: H100,A100,L40S
            title: Gpu Model
          description: >-
            Filter by GPU model (partial match). Supports comma-separated list
            (max 5). Example: H100,A100,L40S
        - name: gpu_canonical_name
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by canonical GPU name (exact match). Supports
              comma-separated list (max 20). Example: nvidia-h100-sxm-80gb
            title: Gpu Canonical Name
          description: >-
            Filter by canonical GPU name (exact match). Supports comma-separated
            list (max 20). Example: nvidia-h100-sxm-80gb
        - name: region
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by region (exact match). Supports comma-separated list (max
              20). Example: us-east-1,eu-west-1
            title: Region
          description: >-
            Filter by region (exact match). Supports comma-separated list (max
            20). Example: us-east-1,eu-west-1
        - name: contract_type
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Filter by contract type. Supports comma-separated list (max 20).
              Example: ondemand,spot,reserved
            title: Contract Type
          description: >-
            Filter by contract type. Supports comma-separated list (max 20).
            Example: ondemand,spot,reserved
        - name: product_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Specific product snapshot (includes timestamp and price)
            title: Product Key
          description: Specific product snapshot (includes timestamp and price)
        - name: base_product_key
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Product identity (all historical snapshots of same product)
            title: Base Product Key
          description: Product identity (all historical snapshots of same product)
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Start date (ISO format). Returns records that were still valid at
              or after this date. Example: 2024-10-14 or 2024-10-14T00:00:00
            title: Start Date
          description: >-
            Start date (ISO format). Returns records that were still valid at or
            after this date. Example: 2024-10-14 or 2024-10-14T00:00:00
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              End date (ISO format). Returns records that started at or before
              this date. Example: 2024-10-18 or 2024-10-18T23:59:59
            title: End Date
          description: >-
            End date (ISO format). Returns records that started at or before
            this date. Example: 2024-10-18 or 2024-10-18T23:59:59
        - name: sort_by
          in: query
          required: false
          schema:
            type: string
            description: Sort field
            default: available_at
            title: Sort By
          description: Sort field
        - name: sort_order
          in: query
          required: false
          schema:
            type: string
            description: Sort order (asc or desc)
            default: desc
            title: Sort Order
          description: Sort order (asc or desc)
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GPUPriceListResponse'
              example:
                data:
                  - availability: available
                    available_at: '2026-03-01T00:00:00+00:00'
                    base_product_key: >-
                      1ae692d916fb1c20e471f563983804709215c26788d391a72d450d9b658d42e9
                    contract_details: null
                    contract_term: null
                    contract_type: ondemand
                    created_by: ingest_incremental.py
                    extracted_at: '2026-03-12T18:04:46.009117+00:00'
                    form_factor: SXM5
                    gpu_canonical_name: nvidia-h100-sxm5-80gb
                    gpu_count: 8
                    gpu_manufacturer: NVIDIA
                    gpu_memory_gb: 80
                    gpu_model: H100
                    id: 3707b52d-79f1-4404-9ec6-fae3abb1fbcd
                    instance_type: p5.48xlarge
                    instance_variant: shared
                    interconnect: NVLink
                    job_execution_id: null
                    last_seen_at: '2026-07-20T05:06:05.832576+00:00'
                    metadata:
                      comment: aws_p5.48xlarge_us-east-1_ondemand
                    os: Linux
                    price_hash: >-
                      616cc7be6c8a364df1cf9275819f07de027f3b2a36d3093f809ee6347584786e
                    price_usd_per_gpu_hour: 6.88
                    product_key: >-
                      6c2e91b70c93b414d0ab846115f34b5ea1861f7b1aa7f0b1d707f0c992d4ef14
                    ram_gb: 2048
                    raw_price: 55.04
                    raw_price_unit: USD/hour
                    region: us-east-1
                    source: api
                    source_file: aws_ondemand_pricing_20260312_180131_22683.json
                    updated_by: ingest_incremental.py
                    valid_to: null
                    vcpu: 192
                    vendor: aws
                    vendor_gpu_name: H100
                    vendor_region: US East (Atlanta)
                    vendor_sku: 6RMQ9NMH7C6AFPNX
                  - availability: available
                    available_at: '2026-03-01T00:00:00+00:00'
                    base_product_key: >-
                      f857dbf3f0dacdb04ca56b46879cb6ad2dbe54f2600a73c07561a41c64cdbf9a
                    contract_details: null
                    contract_term: null
                    contract_type: ondemand
                    created_by: ingest_incremental.py
                    extracted_at: '2026-03-12T18:04:45.989435+00:00'
                    form_factor: SXM5
                    gpu_canonical_name: nvidia-h100-sxm5-80gb
                    gpu_count: 8
                    gpu_manufacturer: NVIDIA
                    gpu_memory_gb: 80
                    gpu_model: H100
                    id: 39fecb43-b1f3-45de-a598-380acfaca3fc
                    instance_type: p5.48xlarge
                    instance_variant: dedicated
                    interconnect: NVLink
                    job_execution_id: null
                    last_seen_at: '2026-07-20T05:06:05.806562+00:00'
                    metadata:
                      comment: aws_p5.48xlarge_us-east-1_ondemand
                    os: Ubuntu Pro
                    price_hash: >-
                      c3532aca5363e7babc626a73dcfb650047fc9f9675922d6dd02ccd2da7a4f6ff
                    price_usd_per_gpu_hour: 7.61
                    product_key: >-
                      be9cc17337ac51a58a69a8c7b82d6e53dadd420b6cc6d97a0fe13269cd1411d3
                    ram_gb: 2048
                    raw_price: 60.88
                    raw_price_unit: USD/hour
                    region: us-east-1
                    source: api
                    source_file: aws_ondemand_pricing_20260312_180131_22683.json
                    updated_by: ingest_incremental.py
                    valid_to: null
                    vcpu: 192
                    vendor: aws
                    vendor_gpu_name: H100
                    vendor_region: US East (Atlanta)
                    vendor_sku: YYKXMM9FQENA4WJ9
                filters:
                  base_product_key: null
                  contract_type: null
                  end_date: '2026-07-16'
                  gpu_canonical_name: null
                  gpu_model: H100
                  product_key: null
                  region: us-east-1
                  sort_by: available_at
                  sort_order: desc
                  start_date: '2026-07-01'
                  vendor: aws
                pagination:
                  has_next: true
                  has_previous: false
                  page: 1
                  page_size: 2
                  total_count: 309
                  total_pages: 155
        '400':
          description: Bad Request — no filter supplied or malformed date
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
              examples:
                no_filter:
                  summary: No filter supplied — at least one is required
                  value:
                    detail: >-
                      At least one filter required: vendor, gpu_model,
                      gpu_canonical_name, region, contract_type, product_key, or
                      base_product_key
                invalid_date:
                  summary: Malformed start_date/end_date
                  value:
                    detail: 'Invalid isoformat string: ''not-a-date'''
        '401':
          description: Unauthorized — missing or invalid credentials
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
              examples:
                missing_credentials:
                  summary: No credentials supplied
                  value:
                    detail: >-
                      Authentication required. Provide an X-API-Key header or an
                      Authorization: Bearer token.
                invalid_token:
                  summary: Invalid or expired token
                  value:
                    detail: Invalid or expired token
        '403':
          description: Forbidden — key lacks the required scope
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
              examples:
                missing_scope:
                  summary: Key lacks the required scope
                  value:
                    detail: >-
                      Access denied. Your API key does not have permission to
                      access this resource.
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: >-
            Too Many Requests — limit and reset are returned in X-RateLimit-*
            headers; the limit reflects your key's tier
          content:
            application/json:
              schema:
                title: ErrorResponse
                type: object
                properties:
                  detail:
                    type: string
                required:
                  - detail
              examples:
                minute_limit:
                  summary: Per-minute limit exceeded (figure reflects your key's tier)
                  value:
                    detail: 'Rate limit exceeded: 100 requests per minute'
      security:
        - HTTPBearer: []
components:
  schemas:
    GPUPriceListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/GPUPriceResponse'
          type: array
          title: Data
        pagination:
          additionalProperties: true
          type: object
          title: Pagination
        filters:
          additionalProperties: true
          type: object
          title: Filters
      type: object
      required:
        - data
        - pagination
        - filters
      title: GPUPriceListResponse
      description: Response schema for list of GPU prices with pagination
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GPUPriceResponse:
      properties:
        id:
          type: string
          title: Id
        product_key:
          type: string
          title: Product Key
        price_hash:
          type: string
          title: Price Hash
        base_product_key:
          type: string
          title: Base Product Key
        extracted_at:
          type: string
          format: date-time
          title: Extracted At
        available_at:
          type: string
          format: date-time
          title: Available At
        valid_to:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Valid To
        last_seen_at:
          type: string
          format: date-time
          title: Last Seen At
        vendor:
          type: string
          title: Vendor
        vendor_sku:
          type: string
          title: Vendor Sku
        vendor_region:
          type: string
          title: Vendor Region
        region:
          type: string
          title: Region
        contract_type:
          type: string
          title: Contract Type
        vendor_gpu_name:
          type: string
          title: Vendor Gpu Name
        gpu_canonical_name:
          type: string
          title: Gpu Canonical Name
        gpu_manufacturer:
          type: string
          title: Gpu Manufacturer
        gpu_model:
          type: string
          title: Gpu Model
        gpu_count:
          anyOf:
            - type: number
            - type: 'null'
          title: Gpu Count
        gpu_memory_gb:
          anyOf:
            - type: number
            - type: 'null'
          title: Gpu Memory Gb
        form_factor:
          anyOf:
            - type: string
            - type: 'null'
          title: Form Factor
        interconnect:
          anyOf:
            - type: string
            - type: 'null'
          title: Interconnect
        instance_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance Type
        instance_variant:
          anyOf:
            - type: string
            - type: 'null'
          title: Instance Variant
        vcpu:
          anyOf:
            - type: number
            - type: 'null'
          title: Vcpu
        ram_gb:
          anyOf:
            - type: number
            - type: 'null'
          title: Ram Gb
        os:
          anyOf:
            - type: string
            - type: 'null'
          title: Os
        price_usd_per_gpu_hour:
          type: number
          title: Price Usd Per Gpu Hour
        raw_price:
          type: number
          title: Raw Price
        raw_price_unit:
          type: string
          title: Raw Price Unit
        contract_term:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Term
        contract_details:
          anyOf:
            - type: string
            - type: 'null'
          title: Contract Details
        availability:
          type: string
          title: Availability
        source:
          type: string
          title: Source
        metadata:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Metadata
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        updated_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated By
        job_execution_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Job Execution Id
        source_file:
          anyOf:
            - type: string
            - type: 'null'
          title: Source File
      type: object
      required:
        - id
        - product_key
        - price_hash
        - base_product_key
        - extracted_at
        - available_at
        - last_seen_at
        - vendor
        - vendor_sku
        - vendor_region
        - region
        - contract_type
        - vendor_gpu_name
        - gpu_canonical_name
        - gpu_manufacturer
        - gpu_model
        - price_usd_per_gpu_hour
        - raw_price
        - raw_price_unit
        - availability
        - source
      title: GPUPriceResponse
      description: Response schema for a single GPU price record
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````