openapi: 3.0.0
info:
  title: BestBuy Product API
  description: |
    The BestBuy Product API returns rich product detail for any BestBuy SKU — title, brand, full specifications, customer rating with optional syndicated reviews, complete image gallery, dimensions, open-box pricing tiers, member savings, installment plans, and more.

    **Cross-linking**: The `product_id` parameter accepts a BestBuy SKU. You can obtain SKUs from the BestBuy Search API (the `product_id` field in `organic_results`) or from any BestBuy product URL — for example, in `https://www.bestbuy.com/site/-/6667474.p?skuId=6667474` the SKU is `6667474`.
  version: 1.0.0
servers:
  - url: https://www.searchapi.io/api/v1
paths:
  /search:
    get:
      summary: BestBuy Product Search
      security:
        - ApiKeyAuth: []
        - ApiKeyQuery: []
      parameters:
        - name: engine
          in: query
          required: true
          description: Engine to use for the search
          schema:
            type: string
            enum: ["bestbuy_product"]
            default: "bestbuy_product"
        - name: product_id
          in: query
          required: true
          description: BestBuy SKU (numeric) of the product to retrieve
          schema:
            type: string
            pattern: '^\d{7,8}$'
      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'
        '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'
        product:
          $ref: '#/components/schemas/Product'
        error:
          type: string
          description: Error message when the SKU could not be found
    SearchMetadata:
      type: object
      required: [id, 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: BestBuy URL for this product
        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: Engine used for the search
        product_id:
          type: string
          description: BestBuy SKU searched for
    Product:
      type: object
      required: [product_id, title, link]
      properties:
        product_id:
          type: string
          description: BestBuy SKU ID
        title:
          type: string
          description: Full product title including brand and variant
        short_title:
          type: string
          description: Shorter product title without brand prefix
        link:
          type: string
          description: Canonical skuId-pinned product page URL (falls back to the slug URL when unavailable)
        brand:
          type: string
          description: Product brand
        brand_id:
          type: string
          description: BestBuy internal brand ID
        model_number:
          type: string
          description: Manufacturer model number
        what_it_is:
          type: array
          items:
            type: string
          description: Short product category descriptions
        description:
          type: string
          description: Long-form product description
        classification:
          $ref: '#/components/schemas/Classification'
        condition:
          type: string
          description: Product condition type
        is_new:
          type: boolean
          description: Present and `true` only when BestBuy flags the product as new
        is_recalled:
          type: boolean
          description: Present and `true` only when the product has been recalled
        is_low_stock:
          type: boolean
          description: Present and `true` only when BestBuy flags the product as supply-constrained
        is_notify_me_eligible:
          type: boolean
          description: Present and `true` only when BestBuy offers notify-me on this SKU
        release_date:
          type: string
          description: BestBuy release date (ISO8601). Present when BestBuy marks it as public (`streetDateDisplay == "show"`).
        rating:
          type: number
          description: Average customer rating
        reviews:
          type: integer
          description: Total number of customer reviews
        syndicated_reviews:
          type: array
          items:
            $ref: '#/components/schemas/SyndicatedReview'
          description: Cross-site review summaries (e.g. bestbuy-ca, manufacturer sites)
        price:
          type: string
          description: Formatted display price
        extracted_price:
          type: number
          description: Numeric current price
        original_price:
          type: string
          description: Formatted original price before discount
        extracted_original_price:
          type: number
          description: Numeric original price
        discount:
          type: number
          description: Total discount amount
        discount_percentage:
          type: number
          description: Discount as a percentage of original price
        member_savings:
          $ref: '#/components/schemas/MemberSavings'
        installment:
          $ref: '#/components/schemas/Installment'
        finance_option:
          $ref: '#/components/schemas/FinanceOption'
        free_gifts:
          type: array
          items:
            $ref: '#/components/schemas/FreeGift'
          description: Free-with-purchase SKUs bundled with this product
        seller:
          $ref: '#/components/schemas/Seller'
        thumbnail:
          type: string
          description: URL to product thumbnail image
        images:
          type: array
          items:
            $ref: '#/components/schemas/ProductImage'
          description: Full product image gallery
        dimensions:
          $ref: '#/components/schemas/Dimensions'
        specifications:
          type: array
          items:
            $ref: '#/components/schemas/SpecificationGroup'
          description: Product specifications grouped by section (e.g. "Key Specs", "Display", "Processor")
        badges:
          type: array
          items:
            type: string
          description: Product badge labels
        badges_v2:
          type: array
          items:
            $ref: '#/components/schemas/Badge'
          description: Rich promotional badges (label, type, description, rank, link) from BestBuy's badgesV2
        buying_options:
          type: array
          items:
            $ref: '#/components/schemas/BuyingOption'
          description: Alternate purchase paths for this SKU (New, Open-Box tiers, etc.)
        open_box_options:
          type: array
          items:
            $ref: '#/components/schemas/OpenBoxOption'
          description: Open-box tiers offered for this SKU
        variants:
          type: array
          items:
            $ref: '#/components/schemas/Variant'
          description: Sibling SKUs representing different color, storage, or other variants
    Badge:
      type: object
      description: Rich promotional badge from BestBuy's badgesV2 (e.g. "Trending Deal")
      properties:
        label:
          type: string
          description: Badge display label
        type:
          type: string
          description: Badge type code (e.g. trendingDeals, gandalf)
        description:
          type: string
          description: Longer badge description when present
        rank:
          type: integer
          description: Badge ordering rank
        category_name:
          type: string
          description: Merchandising category the badge belongs to
        experience_url:
          type: string
          description: Link to the badge's promotional experience
    Classification:
      type: object
      description: BestBuy merchandising taxonomy for the product
      properties:
        department:
          type: string
        department_id:
          type: string
        class:
          type: string
        class_id:
          type: string
        subclass:
          type: string
        subclass_id:
          type: string
    Seller:
      type: object
      properties:
        id:
          type: string
          description: Seller ID
        name:
          type: string
          description: Seller display name (e.g. "Best Buy", "Marketplace")
    MemberSavings:
      type: object
      description: Pricing tiers for paid and non-paid Best Buy members
      properties:
        paid:
          type: number
          description: Savings available to paid members (My Best Buy Plus / Total)
        non_paid:
          type: number
          description: Savings available without a paid membership
        displayable_price:
          type: number
          description: BestBuy's headline price (may differ from extracted_price)
    Installment:
      type: object
      description: Buy-Now-Pay-Later (BNPL) installment offer
      properties:
        months:
          type: string
          description: Installment duration (e.g. "4 months")
        extracted_months:
          type: integer
          description: Number of installments
        cost_per_month:
          type: string
          description: Formatted monthly payment
        extracted_cost_per_month:
          type: number
          description: Numeric monthly payment
    FinanceOption:
      type: object
      description: Long-term financing offer (e.g. 12-month 0% APR)
      properties:
        months:
          type: string
          description: Financing duration (e.g. "12 months")
        extracted_months:
          type: integer
          description: Number of months in the financing term
        cost_per_month:
          type: string
          description: Formatted monthly payment
        extracted_cost_per_month:
          type: number
          description: Numeric monthly payment
        rate:
          type: number
          description: Annual percentage rate (0 for deferred-interest plans)
        plan_type:
          type: string
          description: Financing plan type (e.g. "Deferred")
        total_cost:
          type: number
          description: Total cost over the financing term
    FreeGift:
      type: object
      properties:
        product_id:
          type: string
        offer_id:
          type: string
        quantity:
          type: integer
        savings:
          type: number
    BuyingOption:
      type: object
      properties:
        type:
          type: string
          description: Purchase path label (e.g. "New", "Excellent", "Good", "Fair")
        link:
          type: string
          description: BestBuy URL for this purchase path
    OpenBoxOption:
      type: object
      properties:
        condition:
          type: string
          description: Open-box tier (e.g. "Excellent", "Good", "Fair")
        price:
          type: string
          description: Formatted open-box price
        extracted_price:
          type: number
          description: Numeric open-box price
        savings:
          type: string
          description: Formatted savings vs. new price
        extracted_savings:
          type: number
          description: Numeric savings vs. new price
        link:
          type: string
          description: BestBuy URL for the open-box listing
    Variant:
      type: object
      description: Sibling SKU representing a different color, storage, or other variant
      properties:
        value:
          type: string
          description: Variant value (e.g. "Frost Blue", "256GB")
        option_type:
          type: string
          description: The dimension this variant varies on (e.g. "Color", "Storage")
        bsin:
          type: string
          description: BestBuy variant token (the bsin segment in /product/{slug}/{bsin})
        image:
          type: string
          description: Image URL for the variant
    SyndicatedReview:
      type: object
      properties:
        source:
          type: string
          description: Client display name of the syndicating retailer (e.g. "Samsung US", "bestbuy-ca")
        rating:
          type: number
          description: Overall rating from the syndicated source
        reviews:
          type: integer
          description: Total review count from the syndicated source
    ProductImage:
      type: object
      required: [link]
      properties:
        title:
          type: string
          description: Titleized image role (e.g. "Front Standard", "Angle Zoom")
        link:
          type: string
          description: URL of the image
        alt_text:
          type: string
          description: Alt text describing the image
    Dimensions:
      type: object
      description: Physical dimensions of the product
      properties:
        depth:
          type: string
          description: Product depth (e.g. "8.86 inches")
        height:
          type: string
          description: Product height (e.g. "0.71 inches")
        width:
          type: string
          description: Product width (e.g. "12.76 inches")
        weight:
          type: string
          description: Product weight (e.g. "3.24 pounds")
    SpecificationGroup:
      type: object
      properties:
        name:
          type: string
          description: Specification group name (e.g. "Key Specs", "Display", "Processor")
        specifications:
          type: array
          items:
            $ref: '#/components/schemas/Specification'
          description: Individual specifications in this group
    Specification:
      type: object
      properties:
        name:
          type: string
          description: Specification display name (e.g. "Screen Size")
        value:
          type: string
          description: Specification value (e.g. "14 inches")
        definition:
          type: string
          description: Glossary definition for the specification, when BestBuy provides one
    ErrorResponse:
      type: object
      required: [error]
      properties:
        error:
          type: string
          description: Error message describing what went wrong
