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, ...
๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_requests_response.asp
Python requests.Response Object
Python Examples Python Compiler ... 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
1 month ago - Response.raw is a raw stream of bytes โ€“ it does not transform the response content. If you really need access to the bytes as they were returned, use Response.raw. If youโ€™d like to add HTTP headers to a request, simply pass in a dict to the headers parameter.
๐ŸŒ
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 - >>> import requests >>> requests.get("https://httpbin.org/get") <Response [200]> >>> requests.post("https://httpbin.org/post", data={"key": "value"}) <Response [200]> >>> requests.put("https://httpbin.org/put", data={"key": "value"}) <Response [200]> >>> requests.delete("https://httpbin.org/delete") <Response [200]> >>> requests.head("https://httpbin.org/get") <Response [200]> >>> requests.patch("https://httpbin.org/patch", data={"key": "value"}) <Response [200]> >>> requests.options("https://httpbin.org/get") <Response [200]> In the example above, you called each function to make a request to
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
>>> from requests.auth import HTTPBasicAuth >>> basic = HTTPBasicAuth('user', 'pass') >>> requests.get('https://httpbin.org/basic-auth/user/pass', auth=basic) <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!

๐ŸŒ
W3Schools
w3schools.com โ€บ python โ€บ ref_requests_get.asp
Python Requests get Method
Python Examples Python Compiler ... 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....
๐ŸŒ
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_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.