openapi: 3.0.0
info:
  title: Naver Shopping API
  description: >-
    Search Naver Plus Store, the product search of South Korea's Naver Shopping, with six sort orders and up to 100
    products per page. Each product has its Naver product ID, title, link, image, price in Korean won, review count,
    store, delivery fee, category and stock. When available, a product also has its pre-discount price and discount,
    rating, the store's Naver grade and badge, a delivery promise, the number of sellers listing the same catalog
    product, the order cutoff for same-day shipping and the days the store does not ship, and flags for free delivery, free returns, store pickup, overseas, used and brand store products.
  version: 1.0.0
servers:
- url: https://www.searchapi.io/api/v1
paths:
  "/search":
    get:
      summary: Naver Shopping Search
      security:
      - ApiKeyAuth: []
      - ApiKeyQuery: []
      parameters:
      - name: engine
        in: query
        required: true
        description: Set to naver_shopping.
        schema:
          type: string
          enum: ["naver_shopping"]
      - name: q
        in: query
        required: true
        description: Search terms used to find products. Korean, English and brand names are supported.
        schema:
          type: string
          maxLength: 500
      - name: sort_by
        in: query
        required: false
        description: Order of the results.
        schema:
          type: string
          enum: ["relevance","price_low_to_high","price_high_to_low","best_selling","most_reviewed","newest"]
          default: "relevance"
      - name: page
        in: query
        required: false
        description: Page of results to return, starting at 1. Naver Shopping lists about 10,000 products per search, so the last page is 200 at the default num of 50 and 100 at a num of 100.
        schema:
          type: integer
          minimum: 1
          maximum: 9999
          default: 1
      - name: num
        in: query
        required: false
        description: Number of products per page.
        schema:
          type: integer
          minimum: 1
          maximum: 100
          default: 50
      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"
        search_information:
          "$ref": "#/components/schemas/SearchInformation"
        shopping_results:
          type: array
          items:
            "$ref": "#/components/schemas/ShoppingResult"
        pagination:
          "$ref": "#/components/schemas/Pagination"
        error:
          type: string
          description: Message describing an empty result set or a page past the last product.
    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: Naver Shopping 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
          enum: ["naver_shopping"]
          description: Set to naver_shopping.
        q:
          type: string
          description: Search terms used to find products.
        sort_by:
          type: string
          enum: ["relevance","price_low_to_high","price_high_to_low","best_selling","most_reviewed","newest"]
          description: Order of the results.
        page:
          type: integer
          minimum: 1
          maximum: 9999
          description: Page of results returned, starting at 1.
        num:
          type: integer
          minimum: 1
          maximum: 100
          description: Number of products per page.
    SearchInformation:
      type: object
      required:
      - total_results
      properties:
        total_results:
          type: integer
          description: Estimated number of products that match the search.
    ShoppingResult:
      type: object
      required:
      - position
      - product_id
      properties:
        position:
          type: integer
          description: Position of the product in the results, counting from the first page.
        product_id:
          type: string
          description: Naver Shopping ID of the product.
        title:
          type: string
          description: Name of the product.
        link:
          type: string
          description: URL of the product page in its store.
        thumbnail:
          type: string
          description: URL of the product image.
        seller:
          type: string
          description: Name of the store selling the product.
        seller_link:
          type: string
          description: URL of the store.
        seller_grade:
          type: string
          description: 'Naver grade of the store, one of seed, sprout, power, big_power, premium and platinum.'
        seller_type:
          type: string
          description: 'Naver badge of the store, one of official_store, official_brand_store and certified_store.'
        price:
          type: integer
          description: Price in Korean won, after any discount.
        original_price:
          type: integer
          description: Price in Korean won before the discount.
        discount_percentage:
          type: integer
          description: Discount from the original price, in percent.
        rating:
          type: number
          description: Average review rating, out of 5.
        reviews:
          type: integer
          description: Number of reviews of the product.
        delivery_fee:
          type: integer
          description: Base delivery fee in Korean won.
        delivery_type:
          type: string
          description: 'Delivery promise of the product, one of today_delivery (ships the day of the order), arrival_guarantee (arrival date guaranteed by Naver), seller_arrival_guarantee (arrival date guaranteed by the store) and hope_seller_guarantee (delivered on a date the buyer picks).'
        order_cutoff_time:
          type: string
          description: Latest order time in Korea, as HH:MM, for the product to ship the same day, on a day outside non_shipping_days.
        non_shipping_days:
          type: array
          items:
            type: string
          description: Days the store does not ship, such as saturday, sunday and holiday.
        category:
          type: string
          description: Name of the most specific Naver Shopping category of the product.
        category_id:
          type: string
          description: Naver Shopping ID of that category.
        offers_count:
          type: integer
          description: Number of stores listing the same catalog product.
        stock:
          type: integer
          description: Number of units in stock.
        is_free_delivery:
          type: boolean
          description: Whether delivery is free.
        is_free_return:
          type: boolean
          description: Whether returns are free.
        has_store_pickup:
          type: boolean
          description: Whether the buyer can collect the product from the store in person.
        is_overseas:
          type: boolean
          description: Whether the product ships from outside Korea.
        is_used:
          type: boolean
          description: Whether the product is sold used.
        is_brand_store:
          type: boolean
          description: Whether the store is a Naver brand store.
    Pagination:
      type: object
      required:
      - current
      properties:
        current:
          type: integer
          description: Current page number, starting at 1.
        next_page:
          type: integer
          description: Number of the next page, to pass as the page parameter.
    ErrorResponse:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
