openapi: 3.0.0
info:
  title: Amazon Wishlist API
  description: |
    Retrieve a public Amazon wish list: the list name and its items with price, deal, rating, the variation the owner picked, their comment, priority and the quantities requested and already purchased.

    **Cross-linking**: The `asin` returned by this API can be used with the Amazon Product API to fetch detailed product information. Pass it as the `asin` parameter.
  version: 1.0.0
servers:
- url: https://www.searchapi.io/api/v1
paths:
  "/search":
    get:
      summary: Amazon Wishlist Search
      security:
      - ApiKeyAuth: []
      - ApiKeyQuery: []
      parameters:
      - name: engine
        in: query
        required: true
        description: Search engine to use
        schema:
          type: string
          enum:
          - amazon_wishlist
      - name: wishlist_id
        in: query
        required: true
        description: Amazon wish list ID, the part after /ls/ in a shared list link
          (e.g. `397W9WUFUP2KA` in `amazon.com/hz/wishlist/ls/397W9WUFUP2KA`). Only
          public lists can be retrieved.
        schema:
          type: string
          pattern: "^[A-Za-z0-9]{8,16}$"
      - name: sort_by
        in: query
        required: false
        description: Order of the items
        schema:
          type: string
          enum:
          - date_added
          - price_low_to_high
          - price_high_to_low
          - priority_high_to_low
          default: date_added
      - name: next_page_token
        in: query
        required: false
        description: Token for the next page of items, from `pagination.next_page_token`
          of the previous response for the same wishlist_id and sort_by
        schema:
          type: string
      - name: amazon_domain
        in: query
        required: false
        description: Amazon domain the list belongs to
        schema:
          type: string
          enum:
          - amazon.ae
          - amazon.ca
          - amazon.co.jp
          - amazon.co.uk
          - amazon.com
          - amazon.com.au
          - amazon.com.be
          - amazon.com.br
          - amazon.com.tr
          - amazon.com.mx
          - amazon.de
          - amazon.es
          - amazon.eg
          - amazon.fr
          - amazon.in
          - amazon.ie
          - amazon.it
          - amazon.nl
          - amazon.pl
          - amazon.sa
          - amazon.se
          - amazon.sg
          - amazon.co.za
          default: amazon.com
      - name: language
        in: query
        required: false
        description: Display language for titles and labels
        schema:
          type: string
          enum:
          - ar_SA
          - ar_EG
          - ar_AE
          - zh_CN
          - nl_NL
          - nl_BE
          - en_AE
          - en_GB
          - fr_FR
          - fr_BE
          - de_DE
          - it_IT
          - ja_JP
          - pl_PL
          - pt_BR
          - es_ES
          - es_MX
          - es_US
          - se_SE
          - tr_TR
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/SearchResponse"
        '400':
          description: Bad request - invalid parameters
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '401':
          description: Unauthorized - invalid API key
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '429':
          description: Too many requests - rate limit exceeded
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                "$ref": "#/components/schemas/ErrorResponse"
        '503':
          description: Service unavailable
          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"
        wishlist:
          "$ref": "#/components/schemas/Wishlist"
        items:
          type: array
          description: Items on this page of the list, up to 10
          items:
            "$ref": "#/components/schemas/Item"
        pagination:
          "$ref": "#/components/schemas/Pagination"
        error:
          type: string
          description: Error message when Amazon has no public wish list for the wishlist_id
    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: Amazon URL for this search
        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
        wishlist_id:
          type: string
          description: Amazon wish list ID, the part after /ls/ in a shared list link
            (e.g. `397W9WUFUP2KA` in `amazon.com/hz/wishlist/ls/397W9WUFUP2KA`). Only
            public lists can be retrieved.
        sort_by:
          type: string
          description: Order of the items
        next_page_token:
          type: string
          description: Token for the next page of items, from `pagination.next_page_token`
            of the previous response for the same wishlist_id and sort_by
        amazon_domain:
          type: string
          description: Amazon domain the list belongs to
        language:
          type: string
          description: Display language for titles and labels
    Wishlist:
      type: object
      required:
      - wishlist_id
      - link
      properties:
        wishlist_id:
          type: string
          description: Amazon wish list ID, usable as wishlist_id
        name:
          type: string
          description: Name of the list, returned on the first page
        description:
          type: string
          description: Description the owner wrote for the list, returned on the first page
        link:
          type: string
          description: URL of the wish list
    Item:
      type: object
      required:
      - position
      - asin
      - title
      - link
      - thumbnail
      - priority
      - requested_quantity
      - purchased_quantity
      properties:
        position:
          type: integer
          description: Position of the item in the list, counted across pages
        asin:
          type: string
          description: ASIN of the product, as the variation the owner picked
        title:
          type: string
          description: Product title
        link:
          type: string
          description: URL of the product page
        thumbnail:
          type: string
          description: URL of the product image
        brand:
          type: string
          description: Brand or author the product is listed by
        rating:
          type: number
          description: Average customer rating out of 5
        reviews:
          type: integer
          description: Number of customer ratings
        price:
          type: string
          description: Price as displayed, with currency
        extracted_price:
          type: number
          description: Price as a number
        original_price:
          type: string
          description: Reference price the discount is measured against, with currency
        extracted_original_price:
          type: number
          description: Reference price as a number
        original_price_label:
          type: string
          description: Label Amazon gives the reference price
        price_per:
          $ref: '#/components/schemas/PricePer'
        discount_percentage:
          type: integer
          description: Discount percentage of the current deal
        deal_badge:
          type: string
          description: Name of the current deal
        price_drop_percentage:
          type: integer
          description: How much the price fell since the item was added, in percent, when Amazon states it as a percentage
        coupon:
          "$ref": "#/components/schemas/Coupon"
        bestseller:
          "$ref": "#/components/schemas/Bestseller"
        attributes:
          type: array
          description: Variation the owner picked, such as size or color
          items:
            "$ref": "#/components/schemas/Attribute"
        comment:
          type: string
          description: Comment the owner left on the item
        priority:
          type: string
          description: Priority the owner gave the item
          enum:
          - lowest
          - low
          - medium
          - high
          - highest
        requested_quantity:
          type: integer
          description: Quantity the owner asks for
        purchased_quantity:
          type: integer
          description: Quantity already purchased from the list
    PricePer:
      type: object
      properties:
        price:
          type: number
          description: Price per unit
        unit:
          type: string
          description: Unit of measurement
    Coupon:
      type: object
      required:
      - badge_text
      properties:
        badge_text:
          type: string
          description: Coupon badge, such as the price after the coupon
        text:
          type: string
          description: Coupon message
    Bestseller:
      type: object
      properties:
        link:
          type: string
          description: URL of the Best Sellers list
        category:
          type: string
          description: Best Sellers category, as Amazon words it
    Attribute:
      type: object
      required:
      - name
      - value
      properties:
        name:
          type: string
          description: Variation name, such as Size
        value:
          type: string
          description: Variation value
    Pagination:
      type: object
      required:
      - next_page_token
      properties:
        next_page_token:
          type: string
          description: Token for the next page, usable as next_page_token. Absent
            on the last page.
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
