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

# Poll a job (v1)

> Legacy v1 of `GET /api/v2/jobs/{jobId}`. Identical except that it answers `200` while the job is pending and sends no `Location` header. Existing integrations keep working; build new ones against v2.



## OpenAPI

````yaml /price-data/openapi.json get /api/jobs/{jobId}
openapi: 3.1.0
info:
  title: Price Data API
  version: 1.0.0
  description: >-
    The PricePirate Price Data API: asynchronous price and offer lookups across
    idealo, klarna, pricerunner, amazon, google-shopping, bol. Create a job,
    poll it, read the results, and check your credits, usage and billing.
    Authenticated with your enterprise API key via the x-api-key header.


    This document describes API v2, under `/api/v2`. The host name
    `api-v2.pricepirate.com` is not the API version. v2 answers `202 Accepted`
    with a `Location` header while a job is running, so HTTP clients that follow
    that pattern poll on their own. The legacy v1 paths under `/api` keep
    working unchanged and are listed under **Legacy (v1)**; they answer `200`
    instead of `202`.
servers:
  - url: https://api-v2.pricepirate.com
    description: Production
security: []
tags:
  - name: Jobs
    description: Create jobs, poll them and read their results.
  - name: Account
    description: Your balance, limits, usage and billing.
  - name: Meta
    description: This document.
  - name: Observability
    description: Service health.
  - name: Legacy (v1)
    description: >-
      API v1 under `/api`. Kept for existing integrations; use the `/api/v2`
      paths for new ones.
paths:
  /api/jobs/{jobId}:
    get:
      tags:
        - Legacy (v1)
      summary: Poll a job (v1)
      description: >-
        Legacy v1 of `GET /api/v2/jobs/{jobId}`. Identical except that it
        answers `200` while the job is pending and sends no `Location` header.
        Existing integrations keep working; build new ones against v2.
      parameters:
        - name: jobId
          in: path
          required: true
          schema:
            type: string
        - name: omit_partials
          in: query
          required: false
          description: >-
            When `1` / `true` / `yes`, `results` comes back empty while `status`
            is `pending` — progress fields (`done` / `total` / `summary`) are
            unaffected, and a terminal poll always carries the full array. Only
            relevant for Idealo search jobs; inert for other sources.
          schema:
            type: string
            example: '1'
      responses:
        '200':
          description: Job view (partial while pending, full when terminal)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GatewayPollJobSuccess'
          headers:
            X-Credits-Used:
              description: >-
                Credits this job costs: the full charge until it settles, final
                afterwards. Present on requests authenticated with an enterprise
                API key.
              schema:
                type: integer
            X-Credits-Refunded:
              description: >-
                Credits refunded for failed queries. 0 until the job is polled
                in a terminal status; stays 0 for a job whose results expired
                before it was polled. Present on requests authenticated with an
                enterprise API key.
              schema:
                type: integer
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '403':
          description: Account suspended
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '404':
          description: >-
            Unknown job, a job created by a different account, or a job aged out
            of retention. Credit headers are present when the job exists but its
            results expired.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          headers:
            X-Credits-Used:
              description: >-
                Credits this job costs: the full charge until it settles, final
                afterwards. Present on requests authenticated with an enterprise
                API key.
              schema:
                type: integer
            X-Credits-Refunded:
              description: >-
                Credits refunded for failed queries. 0 until the job is polled
                in a terminal status; stays 0 for a job whose results expired
                before it was polled. Present on requests authenticated with an
                enterprise API key.
              schema:
                type: integer
        '502':
          description: Service temporarily unavailable; retry later
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    GatewayPollJobSuccess:
      description: The job view, with progress and progressive results.
      allOf:
        - $ref: '#/components/schemas/PollJobSuccess'
    ErrorBody:
      type: object
      properties:
        error:
          type: boolean
          enum:
            - true
        message:
          type: string
      required:
        - error
        - message
    PollJobSuccess:
      type: object
      properties:
        error:
          type: boolean
          enum:
            - false
        job_id:
          type: string
        status:
          $ref: '#/components/schemas/JobStatus'
        source:
          type: string
        operation:
          type: string
        country:
          type: string
        created_at:
          type: string
        results:
          type: array
          items:
            $ref: '#/components/schemas/JobResultItem'
        done:
          type: integer
          description: >-
            Queries that have reached a terminal result. Counts queries, not
            result items — a `search-by-term` query returning 20 tiles is 1
            done, not 20 — so `done` never exceeds `total`.
        total:
          type: integer
          description: Number of queries the job was created with.
        summary:
          $ref: '#/components/schemas/JobResultsSummary'
      required:
        - error
        - job_id
        - status
        - source
        - operation
        - country
        - created_at
    JobStatus:
      type: string
      enum:
        - pending
        - completed
        - failed
    JobResultItem:
      type: object
      properties:
        query:
          type: string
        status:
          $ref: '#/components/schemas/ResultStatus'
        result:
          $ref: '#/components/schemas/JobItemResult'
        error:
          type: string
        errorCode:
          type: string
          enum:
            - invalid_query
            - blocked
            - rate_limited
            - timeout
            - scrape_error
            - internal_error
          description: >-
            Present on error items. `invalid_query` is the caller's fault and
            will fail identically on retry; `blocked`, `timeout`, `scrape_error`
            and `internal_error` are ours and are worth retrying. A product that
            does not exist is not an error — it is `not_found`.
      required:
        - query
        - status
        - result
    JobResultsSummary:
      type: object
      properties:
        found:
          type: integer
        not_found:
          type: integer
        error:
          type: integer
        classifications:
          type: object
          properties:
            same_variant:
              type: integer
            likely_same_variant:
              type: integer
            same_family_different_variant:
              type: integer
            different_product:
              type: integer
            unclear:
              type: integer
            product_page_match:
              type: integer
            multipack:
              type: integer
            bundle:
              type: integer
      required:
        - found
        - not_found
        - error
        - classifications
    ResultStatus:
      type: string
      enum:
        - found
        - not_found
        - error
    JobItemResult:
      anyOf:
        - $ref: '#/components/schemas/ClassifiedPriceResult'
        - $ref: '#/components/schemas/ShopResult'
        - type: 'null'
    ClassifiedPriceResult:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: >-
            The idealo catalogue product id, or `null` when `page_type` is
            `offers_only` — those offers have no product entity behind them to
            identify.
        page_type:
          $ref: '#/components/schemas/PageType'
        name:
          type: string
        url:
          type: string
        ean:
          type:
            - string
            - 'null'
        brand:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        image_urls:
          type: array
          items:
            type: string
        review_rating:
          type:
            - number
            - 'null'
        review_count:
          type:
            - number
            - 'null'
        categories:
          type:
            - array
            - 'null'
          items:
            type: string
        category_ids:
          type:
            - array
            - 'null'
          items:
            type: string
        available_since:
          type:
            - string
            - 'null'
        last_updated:
          type:
            - string
            - 'null'
        price_avg:
          type:
            - number
            - 'null'
        price_max:
          type:
            - number
            - 'null'
        price_min:
          type: number
        offers_count:
          type: number
        offers:
          type: array
          items:
            $ref: '#/components/schemas/ClassifiedOffer'
        source:
          type: string
        country:
          type: string
        fetched_at:
          type: string
        platform_data:
          description: >-
            Platform-specific data. Always emitted as an object; empty when no
            extensions apply.
      required:
        - id
        - name
        - url
        - ean
        - brand
        - description
        - image_urls
        - review_rating
        - review_count
        - categories
        - category_ids
        - price_avg
        - price_max
        - price_min
        - offers_count
        - offers
        - source
        - country
        - fetched_at
        - platform_data
    ShopResult:
      type: object
      properties:
        shop:
          $ref: '#/components/schemas/ShopMeta'
        top_products:
          type: array
          items:
            $ref: '#/components/schemas/ShopTopProduct'
        source:
          type: string
        country:
          type: string
        fetched_at:
          type: string
      required:
        - shop
        - top_products
        - source
        - country
        - fetched_at
    PageType:
      type: string
      enum:
        - product
        - offers_only
      description: >-
        How idealo presented the result: a catalogue product page, or a bare
        offer list with no product entity behind it. `offers_only` results carry
        `id: null`.
    ClassifiedOffer:
      type: object
      properties:
        title:
          type:
            - string
            - 'null'
        sellerId:
          type: string
        shop_name:
          type: string
        shop_url:
          type:
            - string
            - 'null'
        shop_type:
          type:
            - string
            - 'null'
        marketplace_name:
          type:
            - string
            - 'null'
        shop_review_rating:
          type:
            - number
            - 'null'
        shop_review_count:
          type:
            - number
            - 'null'
        position:
          type: string
        condition:
          type:
            - string
            - 'null'
        currency:
          type: string
        price:
          type: number
        shipping:
          type:
            - number
            - 'null'
          description: Shipping cost, or null when unknown.
        total:
          type:
            - number
            - 'null'
          description: Price including shipping, or null when shipping is unknown.
        free_return:
          type:
            - boolean
            - 'null'
        voucher:
          type: boolean
        availability_code:
          type:
            - string
            - 'null'
        availability_text:
          type:
            - string
            - 'null'
        direct_sale:
          type:
            - boolean
            - 'null'
        classification:
          $ref: '#/components/schemas/OfferClassification'
        confidence:
          $ref: '#/components/schemas/OfferConfidence'
        platform_data:
          description: >-
            Platform-specific data. Always emitted as an object; empty when no
            extensions apply.
      required:
        - sellerId
        - shop_name
        - shop_url
        - shop_type
        - marketplace_name
        - shop_review_rating
        - shop_review_count
        - position
        - condition
        - currency
        - price
        - shipping
        - total
        - free_return
        - voucher
        - availability_text
        - classification
        - confidence
        - platform_data
    ShopMeta:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        url:
          type: string
        logo_url:
          type:
            - string
            - 'null'
        description:
          type:
            - string
            - 'null'
        address:
          $ref: '#/components/schemas/ShopAddress'
        review_rating:
          type:
            - number
            - 'null'
        review_count:
          type: integer
        payment_methods:
          type: array
          items:
            type: string
        shipping_methods:
          type: array
          items:
            type: string
        shipping_costs:
          type: object
          properties:
            inland:
              type:
                - string
                - 'null'
            foreign:
              type:
                - string
                - 'null'
            free_from:
              type:
                - string
                - 'null'
            min_order_value:
              type:
                - string
                - 'null'
          required:
            - inland
            - foreign
            - free_from
            - min_order_value
        legal_urls:
          type: object
          properties:
            terms:
              type:
                - string
                - 'null'
            imprint:
              type:
                - string
                - 'null'
          required:
            - terms
            - imprint
        top_categories:
          type: array
          items:
            type: string
      required:
        - id
        - name
        - url
        - logo_url
        - description
        - address
        - review_rating
        - review_count
        - payment_methods
        - shipping_methods
        - shipping_costs
        - legal_urls
        - top_categories
    ShopTopProduct:
      type: object
      properties:
        id:
          type: string
        title:
          type: string
        category:
          type:
            - string
            - 'null'
        url:
          type: string
        image:
          type:
            - string
            - 'null'
        price:
          type: number
        delivery_price:
          type:
            - number
            - 'null'
        currency:
          type: string
        offers_count:
          type:
            - number
            - 'null'
          description: >-
            Always null: it came from a flight-JSON path that has not fired
            since at least July 2026, and the rendered carousel does not carry
            it.
        review_rating:
          type:
            - number
            - 'null'
        review_count:
          type:
            - number
            - 'null'
        test_note:
          type:
            - number
            - 'null'
        available:
          type:
            - boolean
            - 'null'
          description: Always null — see `offers_count`.
      required:
        - id
        - title
        - category
        - url
        - image
        - price
        - delivery_price
        - currency
        - offers_count
        - review_rating
        - review_count
        - test_note
        - available
    OfferClassification:
      type:
        - string
        - 'null'
      enum:
        - same_variant
        - likely_same_variant
        - same_family_different_variant
        - different_product
        - unclear
        - product_page_match
        - multipack
        - bundle
        - null
    OfferConfidence:
      type:
        - string
        - 'null'
      enum:
        - high
        - medium
        - low
        - null
    ShopAddress:
      type:
        - object
        - 'null'
      properties:
        street:
          type:
            - string
            - 'null'
        zip:
          type:
            - string
            - 'null'
        city:
          type:
            - string
            - 'null'
        country:
          type:
            - string
            - 'null'
      required:
        - street
        - zip
        - city
        - country
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````

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