Costco
Costco 상품 API
한 번의 호출로 코스트코 상품 최대 20개의 상세 정보를 받습니다: 설명, 특징, 사양, 변형, 회원 전용 여부와 구매 한도, 배송비, 시작일과 종료일이 있는 프로모션. 요청당 1크레딧입니다.
POST/api/v1/costco/product
Authorizations
AuthorizationstringheaderrequiredBearer authentication header of the form Bearer <token>, where <token> is your Scavio API key (e.g. Bearer sk_live_your_key).
Body
application/jsonitem_idstring코스트코 상품 번호 또는 product id 하나, 또는 costco.com 상품 URL. item_id나 item_ids 중 하나를 보내세요.
Example: 1492456
item_idsarray<string>한 번의 호출에 상품 번호, product id 또는 URL 최대 20개, 같은 1크레딧. us와 ca 전용이며, 다른 국가는 호출당 item_id 하나를 받습니다.
Example: ["100334960", "1492456"]
countryenum<string>default:us코스트코 사이트. us와 ca는 모든 파라미터를 지원하며, uk, au, mx, jp, kr, tw는 키워드, 정렬, 페이지 이동만 지원합니다.
Example: uk
us— costco.com, 미국.ca— costco.ca, 캐나다.uk— 영국.au— 호주.mx— 멕시코.jp— 일본.kr— 한국.tw— 대만.
Request
from scavio import ScavioClient
client = ScavioClient(api_key="sk_live_your_key")
products = client.costco.product(item_ids=["100334960", "1492456"])
for p in products["data"]["products"]:
print(p["item_number"], p["title"], p["price"], p["delivery_fee"])
for promo in p["promotions"]:
print(" ", promo["amount_off"], "off until", promo["end_date"])Response
"country": "us",
"count": 2,
"not_found": [],
},
"response_time": 4207
}