If the response is in json you could do something like (python3):

Copyimport json
import requests as reqs

# Make the HTTP request.
response = reqs.get('https://demo.ckan.org/api/3/action/group_list')

# Use the json module to load CKAN's response into a dictionary.
response_dict = json.loads(response.text)

for i in response_dict:
    print("key: ", i, "val: ", response_dict[i])

To see everything in the response you can use .__dict__:

Copyprint(response.__dict__)

Edit in May 2024 to add a suggestion on how to address if objects in the response dict is not JSON serializable.


Copyimport json
...
print(json.dumps(response.text, indent=4, sort_keys=True, default=lambda o:'<not serializable>'))
Answer from Jortega on Stack Overflow
🌐
Requests
requests.readthedocs.io › en › latest › api
Developer Interface — Requests 2.34.2 documentation
requests.request(method: str, url: _t.UriType, **kwargs: Unpack[_t.RequestKwargs]) → Response[source]¶ · Constructs and sends a Request. ... params – (optional) Dictionary, list of tuples or bytes to send in the query string for the Request. data – (optional) Dictionary, list of tuples, bytes, or file-like object to send in the body of the Request. json – (optional) A JSON serializable Python object to send in the body of the Request.
🌐
W3Schools
w3schools.com › python › ref_requests_response.asp
Python requests.Response Object
Python Examples Python Compiler ... Q&A Python Bootcamp Python Training ... The requests.Response() Object contains the server's response to the HTTP request....
🌐
GeeksforGeeks
geeksforgeeks.org › python › response-methods-python-requests
Response Methods - Python requests - GeeksforGeeks
July 12, 2025 - When one makes a request to a URI, it returns a response. This Response object in terms of python is returned by requests.method(), method being - get, post, put, etc. Response is a powerful object with lots of functions and attributes that ...
🌐
Requests
requests.readthedocs.io › en › latest › user › quickstart
Quickstart — Requests 2.34.2 documentation
3 weeks ago - Some servers may return a JSON object in a failed response (e.g. error details with HTTP 500). Such JSON will be decoded and returned. To check that a request is successful, use r.raise_for_status() or check r.status_code is what you expect. In the rare case that you’d like to get the raw socket response from the server, you can access r.raw.
🌐
Mimo
mimo.org › glossary › python › requests-library
Python requests Library: How to Make HTTP Requests with Python
In Python, GET requests using requests.get() retrieve information from a server without modifying any data. GET is the most commonly used HTTP method for accessing web pages, APIs, and other resources. Unlike other methods, the GET request parameters are part of the URL, making it ideal for read-only operations. This includes working with query strings for filtering data. ... import requests # Send a GET request to a webpage response = requests.get('<https://example.com>') # Print the status code of the response print(response.status_code)
🌐
Real Python
realpython.com › python-requests
Python's Requests Library (Guide) – Real Python
July 23, 2025 - You make a GET request in Python using requests.get() with the desired URL. To add headers to requests, pass a dictionary of headers to the headers parameter in your request. To send POST data, use the data parameter for form-encoded data or the json parameter for JSON data. response.text gives you a string representation of the response content, while response.content provides raw bytes.
Find elsewhere
🌐
Oxylabs
oxylabs.io › blog › python-requests
Python Requests Library: 2026 Guide
Our basic Python requests example will return a <Response [200]> message. A 200 response is ‘OK’ showing that the request has been successful. Response messages can also be viewed by creating an object and print(object.status_code).
🌐
ReqBin
reqbin.com › code › python › wr2wzoxh › python-requests-response-example
How do I get the response object in Python Requests?
The Requests Library response object contains all information about the server response, including the status code, version number, headers, and cookies. The Requests Library response object includes the content of the server response, such ...
🌐
Requests
requests.readthedocs.io › en › latest › user › authentication
Authentication — Requests 2.34.2 documentation
>>> import requests >>> from requests_oauthlib import OAuth1 >>> url = 'https://api.twitter.com/1.1/account/verify_credentials.json' >>> auth = OAuth1('YOUR_APP_KEY', 'YOUR_APP_SECRET', ... 'USER_OAUTH_TOKEN', 'USER_OAUTH_TOKEN_SECRET') >>> requests.get(url, auth=auth) <Response [200]>
🌐
GeeksforGeeks
geeksforgeeks.org › python › response-json-python-requests
response.json() - Python requests - GeeksforGeeks
July 12, 2025 - To print the JSON data fetched we have used json() method which prints the JSON data in the Python dictionary format as seen in the output. In this way, we can pas parse JSON responses in Python. ... # import requests module import requests # Making a get request response = requests.get('https://api.github.com///') # print response print(response) # print json content print(response.json())
🌐
Reddit
reddit.com › r/learnpython › python requests, response.json() returning string object instead of dict.
r/learnpython on Reddit: Python Requests, response.json() returning string object instead of dict.
December 8, 2021 -

Hi,

I was under the impression that the using .json() to a request made with Python requests, would yield a dictionary object, but it seems I am getting back a string object.
Am I missing a step?

Here is the code:

def otc_holdings():

    SIZE = 1

    url = 'https://www.otcmarkets.com/research/stock-screener/api'


    params = {'securityType' : 'Common Stock,ADRs',
              'page':1, 'pageSize': SIZE}


    from requests.models import PreparedRequest
    req = PreparedRequest()
    req.prepare_url(url, params)
    print(req.url)


    response =requests.get(url,headers = \
                           USER_AGENTS.random_header(),
                           params= params).json()


    print(response)

    print(type(response))


    print(response['pages'])


    assert response['pages'] == '1'
🌐
Nylas
nylas.com › developer how-tos › how to use the python requests module with rest apis
How to Use the Python Requests Module With REST APIs | Nylas
June 5, 2024 - When you perform a request, you’ll get a response from the API. Just like in the request, it’ll have a response header and response data, if applicable. The response header consists of useful metadata about the response, while the response data returns what you actually requested.
🌐
Reddit
reddit.com › r/python › how to get a response body from a http request
r/Python on Reddit: How to get a response body from a http request
November 26, 2015 -

Hi! This is my first post, so let me know if I make any mistake! Also, it's the first time I try to develop anything web using python :) . Anyway, my problem: I'm tryin to develop an app that lets me know when a bus is near my home. I'm taking the gps info from another app, developed by the city. I've been using Fiddler on windows to see how the app comunicates with the remote server. The thing is, I can get the response body from Fiddler manually, but I don't know how to get it from my Python code!

This is a snapshot from Fiddler on my pc.

IMG

Behind the "Save> Response> Response body" you can see the information that I'm trying to get. Any help is useful, thank you so much!

🌐
PyPI
pypi.org › project › responses
responses · PyPI
A utility library for mocking out the `requests` Python library.
      » pip install responses
    
Published   May 21, 2026
Version   0.26.1
🌐
W3Schools
w3schools.com › python › ref_requests_get.asp
Python Requests get Method
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Practice Problems Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Training ... The get() method sends a GET request to the specified url. ... The get() method returns a requests.Response object.
🌐
Instagram
instagram.com › popular › python-requests-get-response-json
Python Requests Get Response Json
April 3, 2026 - We cannot provide a description for this page right now
🌐
W3Schools
w3schools.com › python › ref_requests_post.asp
Python Requests post Method
Python Examples Python Compiler Python Exercises Python Quiz Python Challenges Python Practice Problems Python Server Python Syllabus Python Study Plan Python Interview Q&A Python Bootcamp Python Training · ❮ Requests Module · Make a POST request to a web page, and return the response text: import requests url = 'https://www.w3schools.com/python/demopage.php' myobj = {'somekey': 'somevalue'} x = requests.post(url, json = myobj) print(x.text) Run Example » ·
🌐
GeeksforGeeks
geeksforgeeks.org › python › response-request-python-requests
response.request - Python requests - GeeksforGeeks
July 12, 2025 - Python requests are generally used to fetch the content from a particular resource URI. Whenever we make a request to a specified URI through Python, it returns a response object.