Costco
Costco 倉庫店検索 API
アメリカの郵便番号、または緯度と経度の近くにあるコストコ倉庫店を検索します。住所、電話番号、距離、店舗・薬局・タイヤセンターの営業時間、売り場、サービス、ガソリンスタンドの営業時間と価格を返します。1リクエスト1クレジット、costco.ca では2クレジットです。
POST/api/v1/costco/warehouses
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/jsonzipstringアメリカの郵便番号。zip か、latitude と longitude のどちらかを送信します。
Example: 10025
latitudenumber緯度、-90〜90。アメリカ以外では longitude と組み合わせて使います。
Example: 40.7993
longitudenumber経度、-180〜180。
Example: -73.9668
limitintegerdefault:10返す最寄りの倉庫店の数、1〜50。
Example: 5
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")
nearby = client.costco.warehouses(zip="10025", limit=5)
for w in nearby["data"]["warehouses"]:
gas = w["gas_station"]
print(w["warehouse_id"], w["name"], w["distance_miles"], gas and gas["prices"]["regular"])Response
"country": "us",
"count": 5,
},
"response_time": 2315
}