> ## 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 and retrieve results

> Fetch a job by its ID. Poll every 1–2 seconds until `status` is `completed` (or `failed`). The `results` array is present once the job leaves the `pending` state. The response shape is the same regardless of which source created the job.



## OpenAPI

````yaml /price-data/global.yaml get /jobs/{job_id}
openapi: 3.0.3
info:
  title: Global EAN/GTIN Price Data API
  version: 1.0.0
  description: >-
    One barcode in, every market out. This API merges five price sources —
    Klarna, PriceRunner, Idealo, Google Shopping and Allegro — behind a single
    universal endpoint and a single unified response schema. Submit an EAN /
    GTIN / UPC, choose a source and a country, and get back every merchant offer
    for that exact product: price, shipping, total, item condition,
    availability, voucher/free-return flags and per-store ratings — all in one
    JSON shape, whichever source you hit. Covers 29 countries across 47
    source-country marketplaces.


    ## Sources & coverage

    - **klarna** — `at, dk, fi, fr, de, ie, it, nl, no, es, se, us` -
    **pricerunner** — `uk, se, dk` - **idealo** — `de, at` - **google-shopping**
    — `us, nl, de, fr, uk, es, it, be, at, ch, pl, se, dk,
      no, fi, pt, ie, cz, hu, ro, gr, sk, hr, bg, au, ca, br, in, jp`
    - **allegro** — `pl`


    ## How it works (asynchronous jobs)

    1. **Create a job** — call the universal endpoint
       `POST /universal/search-by-gtin` with a `source`, a `country` and one
       barcode, or call a dedicated per-source endpoint. You receive a `job_id`.
    2. **Poll for results** — `GET /jobs/{job_id}` every 1–2 seconds until
       `status` is `completed`. Live lookups are typically ready within a few
       seconds.

    Barcodes follow the GTIN standard (8–14 digit strings) and are compatible
    with EAN, UPC and JAN. The `result` object is identical in shape across
    every source — fields a given source does not provide come back as `null`.
    Note: for Google Shopping, `price_min` / `price_avg` / `price_max` are based
    on the total price (item + shipping); for other sources they reflect the
    item price. Idealo additionally exposes `search-by-id`, `search-by-term` and
    `search-by-url`; `search-by-term` returns matching listings (with
    `price_min` and `offers_count` but an empty `offers` array) — expand one via
    `search-by-id` to get its full offer breakdown.
servers:
  - url: https://<rapidapi-host>.p.rapidapi.com
security:
  - rapidApiKey: []
tags:
  - name: Universal
    description: Single endpoint that routes a lookup to any source.
  - name: Klarna
    description: Klarna shopping-network price data.
  - name: PriceRunner
    description: PriceRunner comparison-network price data.
  - name: Idealo
    description: Idealo price-comparison data (barcode, ID, term, URL).
  - name: Google Shopping
    description: Google Shopping price data.
  - name: Allegro
    description: Allegro (Poland) marketplace price data.
  - name: Jobs
    description: Retrieve job results.
  - name: System
    description: Service health.
paths:
  /jobs/{job_id}:
    get:
      tags:
        - Jobs
      summary: Poll a job and retrieve results
      description: >-
        Fetch a job by its ID. Poll every 1–2 seconds until `status` is
        `completed` (or `failed`). The `results` array is present once the job
        leaves the `pending` state. The response shape is the same regardless of
        which source created the job.
      operationId: /jobs/{job_id}
      parameters:
        - name: job_id
          in: path
          required: true
          description: The job_id returned when the job was created.
          schema:
            type: string
          example: f3a1c2b4-5d6e-7f80-9a1b-2c3d4e5f6071
        - $ref: '#/components/parameters/RapidApiHostHeader'
      responses:
        '200':
          description: Job status (with results once completed)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JobStatusResponse'
        '404':
          description: Job not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                notFound:
                  value:
                    error: true
                    message: Job not found
components:
  parameters:
    RapidApiHostHeader:
      name: x-rapidapi-host
      in: header
      required: true
      description: Your RapidAPI host.
      schema:
        type: string
        example: <rapidapi-host>
  schemas:
    JobStatusResponse:
      type: object
      required:
        - error
        - job_id
        - status
        - source
        - operation
        - country
        - created_at
      properties:
        error:
          type: boolean
          example: false
        job_id:
          type: string
          example: f3a1c2b4-5d6e-7f80-9a1b-2c3d4e5f6071
        status:
          type: string
          description: >-
            Job lifecycle status. `results` is included once status is no longer
            `pending`.
          enum:
            - pending
            - completed
            - failed
          example: completed
        source:
          type: string
          description: The source that produced the result.
          example: klarna
        operation:
          type: string
          enum:
            - search-by-gtin
            - search-by-id
            - search-by-term
            - search-by-url
          example: search-by-gtin
        country:
          type: string
          example: de
        created_at:
          type: string
          format: date-time
          example: '2026-06-04T12:00:00.000Z'
        results:
          type: array
          description: Present once the job leaves the `pending` state.
          items:
            $ref: '#/components/schemas/JobResultItem'
    ErrorResponse:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: boolean
          example: true
        message:
          type: string
          example: country is required
    JobResultItem:
      type: object
      required:
        - query
        - status
        - result
      properties:
        query:
          type: string
          description: The barcode, ID, term, or URL this result corresponds to.
          example: '4013474101469'
        status:
          type: string
          enum:
            - found
            - not_found
            - error
          example: found
        result:
          nullable: true
          allOf:
            - $ref: '#/components/schemas/PriceResult'
          description: The product/listing result, or null when not_found / error.
        error:
          type: string
          description: >-
            Fixed public error message returned only when status is error. Raw
            provider/runtime diagnostics are redacted.
          enum:
            - Service temporarily unavailable
          example: Service temporarily unavailable
        errorCode:
          type: string
          description: >-
            Safe machine-readable error code (present only when status is
            error).
          enum:
            - blocked
            - internal_error
          example: blocked
    PriceResult:
      type: object
      description: >-
        Unified product/listing result. Full-offer lookups include merchant
        offers; Idealo search-by-term rows leave `offers` empty. Fields a given
        source does not provide are returned as null.
      required:
        - id
        - name
        - url
        - image_urls
        - price_min
        - offers_count
        - offers
        - source
        - country
        - fetched_at
      properties:
        id:
          type: string
          description: Source-specific product/listing identifier.
          example: '208201234'
        name:
          type: string
          example: Example Product Name
        url:
          type: string
          example: https://www.klarna.com/de/shopping/pl/cl123/208201234/
        ean:
          type: string
          nullable: true
          description: >-
            Matched barcode. Populated for barcode lookups; null for Idealo
            search-by-term.
          example: '4013474101469'
        brand:
          type: string
          nullable: true
          example: Example Brand
        description:
          type: string
          nullable: true
        image_urls:
          type: array
          items:
            type: string
          example:
            - https://.../image.jpg
        review_rating:
          type: number
          nullable: true
          description: Product review rating (average).
          example: 4.6
        review_count:
          type: integer
          nullable: true
          example: 312
        categories:
          type: array
          nullable: true
          items:
            type: string
          example:
            - Example Category
        category_ids:
          type: array
          nullable: true
          items:
            type: string
        available_since:
          type: string
          nullable: true
        last_updated:
          type: string
          nullable: true
        price_avg:
          type: number
          nullable: true
          description: >-
            Average price across offers. Item price for most sources; total
            price (item + shipping) for Google Shopping.
          example: 142.5
        price_max:
          type: number
          nullable: true
          example: 159
        price_min:
          type: number
          description: >-
            Lowest price across offers. Item price for most sources; total price
            (item + shipping) for Google Shopping.
          example: 129
        offers_count:
          type: integer
          description: >-
            Number of merchant offers. For Idealo search-by-term this is the
            listing's advertised offer count even though `offers` is empty.
          example: 8
        offers:
          type: array
          description: >-
            Per-merchant offers. Empty for Idealo search-by-term results —
            expand a listing via search-by-id to populate it.
          items:
            $ref: '#/components/schemas/Offer'
        source:
          type: string
          example: klarna
        country:
          type: string
          example: de
        fetched_at:
          type: string
          format: date-time
          example: '2026-06-04T12:00:03.000Z'
    Offer:
      type: object
      description: >-
        Unified merchant offer. Identical in shape across every source; fields a
        given source does not provide are returned as null.
      required:
        - sellerId
        - shop_name
        - position
        - currency
        - price
        - shipping
        - total
        - voucher
      properties:
        sellerId:
          type: string
          example: m-12345
        shop_name:
          type: string
          example: Example Store
        shop_url:
          type: string
          nullable: true
          example: https://www.example-store.de
        shop_type:
          type: string
          nullable: true
          description: >-
            Whether the offer is a standalone shop or a marketplace seller,
            where the source distinguishes them; null otherwise.
          example: standalone-shop
        marketplace_name:
          type: string
          nullable: true
          description: Marketplace the seller trades on, where provided; null otherwise.
        shop_review_rating:
          type: number
          nullable: true
          description: Store rating (typically 0–5), where the source provides it.
          example: 4.6
        shop_review_count:
          type: integer
          nullable: true
          example: 1240
        position:
          type: string
          description: Rank of the offer within the result (0-based).
          example: '0'
        condition:
          type: string
          nullable: true
          example: new
        currency:
          type: string
          description: ISO currency of the selected market.
          example: EUR
        price:
          type: number
          example: 129
        shipping:
          type: number
          example: 4.99
        total:
          type: number
          description: Item price plus shipping.
          example: 133.99
        free_return:
          type: boolean
          nullable: true
        voucher:
          type: boolean
          example: false
        availability_code:
          type: string
          nullable: true
          description: >-
            Coarse delivery-speed bucket parsed from the listing, where provided
            (currently Idealo).
          enum:
            - short
            - medium
            - long
            - out
          example: short
        availability_text:
          type: string
          nullable: true
          example: In Stock
        direct_sale:
          type: boolean
          nullable: true
  securitySchemes:
    rapidApiKey:
      type: apiKey
      in: header
      name: x-rapidapi-key
      description: Your RapidAPI key.

````