import requests
import json
url = "http://geoapi.heartrails.com/api/json?method=getStations"
param = {"postal": '1900022' }
res =requests.get(url,params=param)
response = json.loads(res.text)
mystation = response["response"]["station"][0]
print(mystation['line'] , mystation['name'])