0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

郵便局apiを使ってみた。

Posted at

import requests

url = "http://zipcloud.ibsnet.co.jp/api/search"

params = {"zipcode":"0000000"}

response = requests.get(url,params,timeout=3)

print(response.text)

リクエストモジュールをインポート。

webapiのアドレス

レスポンスにリクエストモジュールのget関数をつかってデータを入れる

郵便番号を7桁きっちりいれたらかえってくる。

0
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?