openapi: 3.0.0
info:
  title: Idealo Search API
  description: |
    Search idealo, the European price comparison site, on idealo.de, idealo.at, idealo.fr, idealo.es, idealo.it and idealo.co.uk.

    Each result is either a product idealo compares across shops, with its lowest price, number of offers, cheapest shop, shipping, rating and idealo test rating, or a single shop's offer. Prices are in the market's currency, as idealo shows them and as numbers.

    The response lists the filters, categories and price ranges idealo offers for the search. Send an option's `filter_value` in `filters`, a category's `category_id` in `category_id`, or a range's bounds in `price_min` and `price_max` to narrow the next search.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: Idealo Search
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: 'Search engine. Must be set to: `idealo_search`'
          schema:
            type: string
            enum: ["idealo_search"]
        - name: q
          in: query
          required: false
          description: Search text, up to 200 characters, with at least one letter or digit and without `<`, `>`, `{` or `}`. Required unless `category_id` is set. Product names, model numbers and EANs work.
          schema:
            type: string
            maxLength: 200
        - name: idealo_domain
          in: query
          required: false
          description: idealo market to search. It sets the shops, the language and the currency.
          schema:
            type: string
            enum: ["idealo.de", "idealo.at", "idealo.fr", "idealo.es", "idealo.it", "idealo.co.uk"]
            default: "idealo.de"
        - name: category_id
          in: query
          required: false
          description: idealo category to search in, such as `3487`, a `category_id` from the `categories` or `search_information` of an earlier response. With `q`, it searches for the text inside the category. A category idealo does not have returns an error, and so does a parent category, which idealo opens as a page of its subcategories.
          schema:
            type: string
            pattern: '^\d{1,12}$'
        - name: sort_by
          in: query
          required: false
          description: Sorts the results. `new_arrivals` puts the products idealo added most recently first, and `best_discount` the biggest price drops.
          schema:
            type: string
            enum: ["best_match", "price_low_to_high", "price_high_to_low", "new_arrivals", "best_discount"]
            default: "best_match"
        - name: price_min
          in: query
          required: false
          description: Lowest price, a whole number in the market's currency.
          schema:
            type: integer
            minimum: 0
            maximum: 99999999
        - name: price_max
          in: query
          required: false
          description: Highest price, a whole number in the market's currency. It must not be lower than `price_min`.
          schema:
            type: integer
            minimum: 0
            maximum: 99999999
        - name: filters
          in: query
          required: false
          description: Filters to apply, comma-separated, each a `filter_value` from the `filters` of an earlier response, such as `232734,355467`. Several values of one filter widen the results, and values of different filters narrow them. Up to 20 values. Codes from another search's filters return an error.
          schema:
            type: string
            pattern: '^\d{1,12}(,\d{1,12}){0,19}$'
        - name: condition
          in: query
          required: false
          description: Set to `new` to leave out used and refurbished offers.
          schema:
            type: string
            enum: ["new"]
        - name: is_on_sale
          in: query
          required: false
          description: Set to `true` to return only products whose price is below their usual price.
          schema:
            type: boolean
        - name: is_fast_delivery
          in: query
          required: false
          description: Set to `true` to return only products a shop can deliver quickly.
          schema:
            type: boolean
        - name: page
          in: query
          required: false
          description: Page of results. idealo lists 36 results a page, or 60 when a search covers every category, and serves about the first 500 results, so `pagination.total_pages` gives the last page there is.
          schema:
            type: integer
            minimum: 1
            maximum: 112
            default: 1
        - name: zero_retention
          in: query
          required: false
          description: Set to true to disable logging and persistent storage for this request. Enterprise plans only.
          schema:
            type: boolean
            default: false
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SearchResponse'
        '400':
          description: Validation Error. There is an issue with query parameters, such as missing required parameters or invalid values.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication Error. The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden. Zero data retention is not available to the account, or the account requires `zero_retention=true`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate Limit Exceeded. The number of allowed requests has been exceeded. Consider upgrading your plan or waiting for the limit to reset.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Server Error. Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '503':
          description: Timeout. We could not retrieve results in 90 seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: 'Use Bearer authentication. Format: "Bearer YOUR_API_KEY"'
    ApiKeyQuery:
      type: apiKey
      in: query
      name: api_key
      description: Pass API key as query parameter
  schemas:
    SearchResponse:
      type: object
      properties:
        search_metadata:
          $ref: '#/components/schemas/SearchMetadata'
        search_parameters:
          $ref: '#/components/schemas/SearchParameters'
        search_information:
          $ref: '#/components/schemas/SearchInformation'
        shopping_results:
          type: array
          description: Products and offers idealo lists for the search, in idealo's order.
          items:
            $ref: '#/components/schemas/ShoppingResult'
        filters:
          type: array
          description: Filters idealo offers for the search.
          items:
            $ref: '#/components/schemas/Filter'
        categories:
          type: array
          description: Categories idealo suggests narrowing the search to.
          items:
            $ref: '#/components/schemas/Category'
        price_ranges:
          type: array
          description: Price ranges idealo offers for the search.
          items:
            $ref: '#/components/schemas/PriceRange'
        related_searches:
          type: array
          description: Searches idealo suggests next.
          items:
            $ref: '#/components/schemas/RelatedSearch'
        pagination:
          $ref: '#/components/schemas/Pagination'
        error:
          type: string
          description: Why the search returned no results.
    SearchMetadata:
      type: object
      required: [status, created_at]
      properties:
        id:
          type: string
          description: "Unique identifier for the search request"
        status:
          type: string
          description: "Status of the search request"
        created_at:
          type: string
          format: date-time
          description: "Timestamp when the search was created"
        request_time_taken:
          type: number
          description: "Time taken to make the request in seconds"
        parsing_time_taken:
          type: number
          description: "Time taken to parse the results in seconds"
        total_time_taken:
          type: number
          description: "Total time taken for the search in seconds"
        request_url:
          type: string
          description: "idealo page the search starts from"
        html_url:
          type: string
          description: "URL to view HTML results"
        json_url:
          type: string
          description: "URL to view JSON results"
    SearchParameters:
      type: object
      properties:
        engine:
          type: string
          description: Search engine used
        q:
          type: string
          description: The text searched for
        idealo_domain:
          type: string
          description: idealo market searched
        category_id:
          type: string
          description: Category searched in
        sort_by:
          type: string
          description: Sort order
        price_min:
          type: integer
          description: Lowest price
        price_max:
          type: integer
          description: Highest price
        filters:
          type: string
          description: Filters applied
        condition:
          type: string
          description: Condition of the offers
        is_on_sale:
          type: boolean
          description: Whether only products below their usual price were asked for
        is_fast_delivery:
          type: boolean
          description: Whether only products with fast delivery were asked for
        page:
          type: integer
          description: Page of results
        zero_retention:
          type: boolean
          description: Whether zero data retention was requested
    SearchInformation:
      type: object
      required: [total_results, currency]
      properties:
        total_results:
          type: integer
          description: Number of results idealo reports for the search.
        query_displayed:
          type: string
          description: Search text as idealo shows it.
        showing_results_for:
          type: string
          description: Corrected search text idealo shows results for.
        page_type:
          type: string
          description: Kind of page idealo answered the search with, a category, a brand page or a search across every category.
          enum: ["category", "manufacturer", "mainsearch"]
        category_id:
          type: string
          description: idealo category the search landed in.
        category:
          type: string
          description: Name of the category the search landed in.
        currency:
          type: string
          description: ISO 4217 code of the market's currency.
    ShoppingResult:
      type: object
      required: [position, type, title]
      properties:
        position:
          type: integer
          description: Position of the result on this page of results.
        type:
          type: string
          description: Kind of result, a product idealo compares across shops or a single shop's offer.
          enum: ["product", "offer"]
        product_id:
          type: string
          description: idealo product id of a product result.
        offer_id:
          type: string
          description: idealo id of the offer, the cheapest one for a product result.
        title:
          type: string
          description: Product or offer title.
        product_link:
          type: string
          description: idealo page comparing the product's offers.
        link:
          type: string
          description: idealo link to the shop selling at this price.
        price:
          type: string
          description: Lowest price as idealo shows it.
        extracted_price:
          type: number
          description: Numeric lowest price.
        unit_price:
          type: string
          description: Price per unit as idealo shows it, such as per kilogram.
        extracted_offers:
          type: integer
          description: Number of offers idealo compares for the result.
        seller:
          type: string
          description: Shop with the lowest price.
        seller_id:
          type: string
          description: idealo id of the shop with the lowest price.
        shipping:
          type: string
          description: Shipping cost of the cheapest offer as idealo shows it.
        extracted_shipping:
          type: number
          description: Numeric shipping cost of the cheapest offer.
        delivery:
          type: string
          description: Delivery time the shop gives for the offer.
        rating:
          type: number
          description: Average rating out of 5 from user reviews, or idealo's own score when the product has no user reviews.
        reviews:
          type: integer
          description: Number of user reviews.
        test_rating:
          type: string
          description: Grade from product tests as idealo shows it, in the market's own scale.
        extensions:
          type: array
          description: Key product details idealo lists.
          items:
            type: string
        thumbnail:
          type: string
          description: Product image.
        category_id:
          type: string
          description: idealo category of the result.
        main_product_id:
          type: string
          description: idealo product id of the product this result is a variant of.
        bestseller_rank:
          type: integer
          description: Rank among the category's bestsellers.
        discount_percentage:
          type: integer
          description: Percentage the price is below the product's usual price.
        is_short_term_deal:
          type: boolean
          description: Whether idealo marks the price drop as a short-term deal.
        energy_efficiency_class:
          type: string
          description: EU energy efficiency class.
        is_used:
          type: boolean
          description: Whether only used or refurbished offers exist for the result.
        promo_code:
          type: string
          description: Shop's promo code for the offer.
        promo_description:
          type: string
          description: Shop's terms for the promo code.
        last_updated:
          type: string
          description: Time the shop last updated the offer, as idealo shows it.
    Filter:
      type: object
      required: [type, options]
      properties:
        type:
          type: string
          description: Filter name, such as "Hersteller" or "Marque".
        options:
          type: array
          description: Choices the filter offers.
          items:
            $ref: '#/components/schemas/FilterOption'
    FilterOption:
      type: object
      required: [text, items, filter_value]
      properties:
        text:
          type: string
          description: Choice as idealo shows it.
        items:
          type: integer
          description: Number of results with the choice applied.
        filter_value:
          type: string
          description: Code to send in `filters` to apply the choice.
        is_selected:
          type: boolean
          description: Whether the choice applies to this search.
    Category:
      type: object
      required: [category_id]
      properties:
        category_id:
          type: string
          description: Code to send in `category_id` to search in the category.
        name:
          type: string
          description: Category name.
        items:
          type: integer
          description: Number of results in the category.
        link:
          type: string
          description: idealo page of the search in the category.
    PriceRange:
      type: object
      required: [items]
      properties:
        price_min:
          type: integer
          description: Lowest price of the range, to send in `price_min`.
        price_max:
          type: integer
          description: Highest price of the range, to send in `price_max`.
        items:
          type: integer
          description: Number of results in the range.
    RelatedSearch:
      type: object
      required: [query, link]
      properties:
        query:
          type: string
          description: Suggested search text.
        link:
          type: string
          description: idealo page of the suggested search.
    Pagination:
      type: object
      required: [current]
      properties:
        current:
          type: integer
          description: Current page.
        next:
          type: string
          description: Idealo Search API request for the next page.
        total_pages:
          type: integer
          description: Number of pages idealo serves for the search.
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
