> ## 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.

# Create a job (v1)

> Legacy v1 of `POST /api/v2/jobs`. Identical except that it answers `200` instead of `202` and sends no `Location` header. Existing integrations keep working; build new ones against v2.



## OpenAPI

````yaml /price-data/openapi.json post /api/jobs
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:
    post:
      tags:
        - Legacy (v1)
      summary: Create a job (v1)
      description: >-
        Legacy v1 of `POST /api/v2/jobs`. Identical except that it answers `200`
        instead of `202` and sends no `Location` header. Existing integrations
        keep working; build new ones against v2.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              oneOf:
                - $ref: '#/components/schemas/CreateJobBody'
                - $ref: '#/components/schemas/ToppreiseCreateJobBody'
                - $ref: '#/components/schemas/KlarnaCreateJobBody'
                - $ref: '#/components/schemas/PricerunnerCreateJobBody'
                - $ref: '#/components/schemas/AllegroCreateJobBody'
                - $ref: '#/components/schemas/EbayCreateJobBody'
                - $ref: '#/components/schemas/AmazonCreateJobBody'
                - $ref: '#/components/schemas/Google-shoppingCreateJobBody'
                - $ref: '#/components/schemas/BolCreateJobBody'
      responses:
        '200':
          description: Job created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateJobSuccess'
          headers:
            X-Credits-Remaining:
              description: >-
                Spendable credits after this request: after the debit when the
                job is created, the refusing balance on a 402. Present on
                requests authenticated with an enterprise API key.
              schema:
                type: integer
            X-Concurrency-Limit:
              description: >-
                Your concurrent query limit. Present on requests authenticated
                with an enterprise API key.
              schema:
                type: integer
            X-Concurrency-Remaining:
              description: >-
                Queries you can still submit before reaching the concurrent
                limit, counting this job when it was created. Rises again as
                jobs finish and are polled. Advisory. Present on requests
                authenticated with an enterprise API key.
              schema:
                type: integer
            X-Daily-Limit:
              description: >-
                Your daily query limit (UTC day). Only present when a daily
                limit applies. Present on requests authenticated with an
                enterprise API key.
              schema:
                type: integer
            X-Daily-Remaining:
              description: >-
                Queries left today, counting this job when it was created. Only
                present when a daily limit applies. Present on requests
                authenticated with an enterprise API key.
              schema:
                type: integer
        '400':
          description: >-
            Malformed body, or a source/operation combination outside the
            catalog (the message enumerates what is available)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '401':
          description: Missing or invalid API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '402':
          description: Insufficient credit balance; the response includes a payment link.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreditsExhaustedBody'
          headers:
            X-Credits-Remaining:
              description: >-
                Spendable credits after this request: after the debit when the
                job is created, the refusing balance on a 402. Present on
                requests authenticated with an enterprise API key.
              schema:
                type: integer
            X-Concurrency-Limit:
              description: >-
                Your concurrent query limit. Present on requests authenticated
                with an enterprise API key.
              schema:
                type: integer
            X-Concurrency-Remaining:
              description: >-
                Queries you can still submit before reaching the concurrent
                limit, counting this job when it was created. Rises again as
                jobs finish and are polled. Advisory. Present on requests
                authenticated with an enterprise API key.
              schema:
                type: integer
            X-Daily-Limit:
              description: >-
                Your daily query limit (UTC day). Only present when a daily
                limit applies. Present on requests authenticated with an
                enterprise API key.
              schema:
                type: integer
            X-Daily-Remaining:
              description: >-
                Queries left today, counting this job when it was created. Only
                present when a daily limit applies. Present on requests
                authenticated with an enterprise API key.
              schema:
                type: integer
        '403':
          description: Account suspended, or this endpoint is not enabled for your key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '429':
          description: Concurrent-job or daily query limit reached
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
          headers:
            X-Credits-Remaining:
              description: >-
                Spendable credits after this request: after the debit when the
                job is created, the refusing balance on a 402. Present on
                requests authenticated with an enterprise API key.
              schema:
                type: integer
            X-Concurrency-Limit:
              description: >-
                Your concurrent query limit. Present on requests authenticated
                with an enterprise API key.
              schema:
                type: integer
            X-Concurrency-Remaining:
              description: >-
                Queries you can still submit before reaching the concurrent
                limit, counting this job when it was created. Rises again as
                jobs finish and are polled. Advisory. Present on requests
                authenticated with an enterprise API key.
              schema:
                type: integer
            X-Daily-Limit:
              description: >-
                Your daily query limit (UTC day). Only present when a daily
                limit applies. Present on requests authenticated with an
                enterprise API key.
              schema:
                type: integer
            X-Daily-Remaining:
              description: >-
                Queries left today, counting this job when it was created. Only
                present when a daily limit applies. Present on requests
                authenticated with an enterprise API key.
              schema:
                type: integer
            Retry-After:
              description: >-
                Seconds until 00:00 UTC. Only on the daily-limit refusal; the
                concurrent limit frees up as jobs finish, not at a fixed time.
              schema:
                type: integer
        '500':
          description: Job could not be recorded; nothing was billed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '502':
          description: Service temporarily unavailable; retry later
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
        '503':
          description: Endpoint temporarily unavailable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorBody'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    CreateJobBody:
      type: object
      properties:
        source:
          type: string
          enum:
            - idealo
          description: Always `idealo` for this service.
        operation:
          $ref: '#/components/schemas/JobOperation'
        country:
          $ref: '#/components/schemas/IdealoCountry'
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
          description: >-
            Non-empty queries. Max 1000 per job. Term/URL operations require
            exactly one.
        options:
          type: object
          properties: {}
          additionalProperties: false
          description: Optional empty object. This source has no configurable options.
      required:
        - source
        - operation
        - country
        - queries
    ToppreiseCreateJobBody:
      type: object
      description: Temporarily unavailable. Job creation returns HTTP 503.
      properties:
        source:
          type: string
          enum:
            - toppreise
        operation:
          type: string
          enum:
            - search-by-gtin
            - search-by-id
            - search-by-term
        country:
          type: string
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
        options:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    KlarnaCreateJobBody:
      type: object
      description: >-
        One credit per query. Failed queries are refunded; queries with no
        results remain charged.
      properties:
        source:
          type: string
          enum:
            - klarna
        operation:
          type: string
          enum:
            - search-by-gtin
        country:
          type: string
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
        options:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    PricerunnerCreateJobBody:
      type: object
      description: >-
        One credit per query. Failed queries are refunded; queries with no
        results remain charged.
      properties:
        source:
          type: string
          enum:
            - pricerunner
        operation:
          type: string
          enum:
            - search-by-gtin
        country:
          type: string
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
        options:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    AllegroCreateJobBody:
      type: object
      description: Temporarily unavailable. Job creation returns HTTP 503.
      properties:
        source:
          type: string
          enum:
            - allegro
        operation:
          type: string
          enum:
            - search-by-gtin
            - search-by-id
            - search-by-url
            - search-by-term
        country:
          type: string
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
        options:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    EbayCreateJobBody:
      type: object
      description: Temporarily unavailable. Job creation returns HTTP 503.
      properties:
        source:
          type: string
          enum:
            - ebay
        operation:
          type: string
          enum:
            - search-by-gtin
            - search-by-term
        country:
          type: string
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
        options:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    AmazonCreateJobBody:
      type: object
      description: >-
        One credit per query. Failed queries are refunded; queries with no
        results remain charged.
      properties:
        source:
          type: string
          enum:
            - amazon
        operation:
          type: string
          enum:
            - search-by-gtin
            - search-by-id
        country:
          type: string
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
          description: Max 100 queries per job for hosted scraper runs; max 1000 otherwise.
        options:
          type: object
          properties:
            includeDetail:
              type: boolean
              default: true
              description: >-
                Fetch product details by default. False skips detail lookup;
                failed detail lookup preserves offers with platform_data.detail
                null.
            zipcode:
              type:
                - string
                - 'null'
              description: >-
                Delivery postal code for de, us, gb (uk alias), fr, it, es, ca,
                jp, in, ie, za. Omitted, null or exactly empty uses the market
                default: de 10115; us 20001; gb/uk SW1A 1AA; fr 75001; it 00184;
                es 28001; ca K1P 1J1; jp 100-0001; in 110001; ie D02 AF30; za
                0002. Other supported markets reject nonempty ZIP overrides.
                Trimmed and uppercased; whitespace collapsed; missing GB/CA/IE
                spacing inserted. Country format is validated before admission;
                whitespace-only is invalid. Preserve leading zeros. US ZIP+4 and
                unhyphenated Japanese codes are not accepted. Applies to search,
                offers and product details.
              examples:
                - '80331'
                - SW1A 1AA
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    Google-shoppingCreateJobBody:
      type: object
      description: >-
        One credit per query. Failed queries are refunded; queries with no
        results remain charged.
      properties:
        source:
          type: string
          enum:
            - google-shopping
        operation:
          type: string
          enum:
            - search-by-id
            - search-by-gtin
        country:
          type: string
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
        options:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    BolCreateJobBody:
      type: object
      description: >-
        One credit per query. Failed queries are refunded; queries with no
        results remain charged.
      properties:
        source:
          type: string
          enum:
            - bol
        operation:
          type: string
          enum:
            - search-by-gtin
            - search-by-id
        country:
          type: string
          enum:
            - nl
            - be
        queries:
          type: array
          items:
            type: string
          minItems: 1
          maxItems: 1000
          description: >-
            GTIN or numeric Bol product ID. GTIN-8/12/13 and zero-padded GTIN-14
            are accepted; case-level GTIN-14 is rejected.
        options:
          type: object
          properties: {}
          additionalProperties: false
      required:
        - source
        - operation
        - country
        - queries
    CreateJobSuccess:
      type: object
      properties:
        error:
          type: boolean
          enum:
            - false
        job_id:
          type: string
          format: uuid
      required:
        - error
        - job_id
    ErrorBody:
      type: object
      properties:
        error:
          type: boolean
          enum:
            - true
        message:
          type: string
      required:
        - error
        - message
    CreditsExhaustedBody:
      type: object
      description: >-
        402 body: the prepaid credit balance cannot cover this job's queries; a
        payment link is included.
      properties:
        error:
          type: boolean
          enum:
            - true
        message:
          type: string
        credits_available:
          type: integer
        credits_required:
          type: integer
        payment_link:
          type:
            - string
            - 'null'
      required:
        - error
        - message
    JobOperation:
      type: string
      enum:
        - search-by-gtin
        - search-by-id
        - search-by-term
        - search-by-url
        - shop-info
      description: >-
        `search-by-gtin`: each query is a GTIN — 8, 12, 13 or 14 digits with a
        valid GS1 check digit, leading zeros kept (bulk OK). A malformed value
        rejects the whole request with 400. `shop-info`: exactly one positive
        numeric shop ID (1–12 digits, no leading zeros), in any supported
        country. Returns merchant metadata and top products. `search-by-id`:
        each query is a numeric idealo product id; no LLM filter.
        `search-by-term`: exactly one free-text term. `search-by-url`: exactly
        one product or `q=` search URL; country must match.
    IdealoCountry:
      type: string
      enum:
        - at
        - de
        - es
        - fr
        - it
        - uk
        - gb
      description: Idealo locale. Required for all operations.
  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.