Skip to content

Instantly share code, notes, and snippets.

@tyjeon24
Created April 2, 2020 14:01
Show Gist options
  • Save tyjeon24/fc2c524006d198ffdce0648207d7fa8e to your computer and use it in GitHub Desktop.
Save tyjeon24/fc2c524006d198ffdce0648207d7fa8e to your computer and use it in GitHub Desktop.
Python : Naver shopping API
import json
import requests
SHOPPING_API_BASE_URL = "https://openapi.naver.com/v1/search/shop.json"
X_Naver_Client_Id = "9812tzgAqMDNLRNb_wsq"
X_Naver_Client_Secret = "iqlSwCt6ee"
SHOPPING_API_HEADER = {"X-Naver-Client-Id":X_Naver_Client_Id,"X-Naver-Client-Secret":X_Naver_Client_Secret}
def main():
keywords = "이어폰"
params = {"query":keyword}
response = requests.get(SHOPPING_API_BASE_URL,headers=SHOPPING_API_HEADER,params=params)
shopping_keyword_json_response = json.loads(response.text)
print(shopping_keyword_json_response)
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment