Skip to content

Coupang

Mode: 🔐 Browser · Domain: coupang.com

Commands

CommandDescription
opencli coupang searchSearch Coupang products with logged-in browser session
opencli coupang productRead full product detail (price, rating, seller, delivery) for a product ID
opencli coupang add-to-cartAdd a product to the logged-in account's shopping cart

Usage Examples

bash
# List rocket-shipping mice (rank, product_id, title, price, rating, ...)
opencli coupang search "마우스" --filter rocket --limit 10

# Round-trip: pick a product_id from search and pull full detail
opencli coupang product 7654321

# Pass a full product URL instead of an ID
opencli coupang product --url https://www.coupang.com/vp/products/7654321

# JSON output (any subcommand)
opencli coupang product 7654321 -f json

# Add to cart (write — must be logged in)
opencli coupang add-to-cart 7654321

Output

ColumnTypeNotes
rankint1-based position within this query / page
product_idstringNumeric Coupang product id; round-trips into coupang product
titlestringProduct display name
priceint | nullCurrent selling price (KRW)
unit_pricestringPer-unit price label, e.g. (100ml당 1,200원)
ratingfloat | nullAverage star rating
review_countint | nullNumber of reviews
rocketstringCoupang-rocket badge label (로켓배송 / 로켓와우 / etc.) — empty string if no badge
delivery_typestring무료배송 / 일반배송 / empty
delivery_promisestring오늘도착 / 내일도착 / 새벽도착 / empty
urlstringCanonical product URL

product

Always returns a single row (or throws):

ColumnTypeNotes
product_idstringNumeric Coupang product id, normalised from input
titlestring | nullProduct display name; null if upstream did not provide
priceint | nullCurrent selling price (KRW)
original_priceint | nullPre-discount price
discount_rateint | nullDiscount percent
ratingfloat | nullAverage star rating
review_countint | nullNumber of reviews
sellerstring | nullVendor / seller name
brandstring | nullBrand label (when listed)
rocketstring | nullCoupang-rocket type label
delivery_promisestring | nullArrival-window label
image_urlstring | nullPrimary product image
urlstringCanonical product URL

null semantics: a null field means upstream did not expose that field on this product (e.g. some items have no original_price). Failures (login wall, page mismatch, page failed to render) raise typed errors instead of silently returning empty rows — callers should treat any returned row as real data.

add-to-cart

ColumnTypeNotes
okboolAlways true on success (failures throw)
product_idstringCoupang product id added
urlstringCanonical product URL
messagestringAdded to cart

Validation (no silent clamp)

search --limit must be 1..50; out-of-range values throw ArgumentError (no silent clamp to 50). search --page must be a positive integer. search --filter currently only accepts rocket; any other value throws ArgumentError rather than being silently dropped during DOM lookup.

Prerequisites

Notes

  • search and product use the logged-in browser session because Coupang's /np/search JSON endpoint and product pages serve different (and often empty) responses to anonymous traffic.
  • product's extractor tries three sources in order: JSON-LD Product schema, window.__INITIAL_STATE__ / __NEXT_DATA__ bootstrap globals, and finally a DOM fallback. The merged result is what's returned.
  • Authentication failures raise AuthRequiredError; missing/empty results raise EmptyResultError with a helpful hint. No command silently returns [] when login is the actual reason.

Released under the Apache-2.0 License.