>>> import json >>> s = b'{"documents":[{"id":"1","detectedLanguages":[{"name":"English","iso6391Name":"en","score":1.0}]}],"errors":[]}' >>> data = json.loads(s) Traceback (most recent call last): File "<string>", line 301, in runcode File "<interactive input>", line 1, in <module> File "C:\Python34\lib\json\__init__.py", line 312, in loads s.__class__.__name__)) TypeError: the JSON object must be str, not 'bytes' >>> # So convert to string >>> s = s.decode() >>> data = json.loads(s) >>> data {'documents': [{'detectedLanguages': [{'iso6391Name': 'en', 'name': 'English', 'score': 1.0}], 'id': '1'}], 'errors': []} # Get score >>> data['documents'][0]['detectedLanguages'][0]['score'] 1.0I your other post i recommend you to use Requests.
Then you don't need to use json from standard library,or convert from bytes to string.