python3: Read json file from url

Just use json and requests modules:

import requests, json

content = requests.get("")
json = json.loads(content.content)

Or using the standard library:

from urllib.request import urlopen
import json

data = json.loads(urlopen(url).read().decode("utf-8"))

So you want to be able to reference specific values with inputting keys? If i think i know what you want to do, this should help you get started. You will need the libraries urlllib2, json, and bs4. just pip install them its easy.

import urllib2
import json
from bs4 import BeautifulSoup

url = urllib2.urlopen("")
content =
soup = BeautifulSoup(content, "html.parser")

I used a commonly used url to practice with.

You were close:

import requests
import json
response = json.loads(requests.get("your_url").text)