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
๐ŸŒ
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....
๐ŸŒ
ReqBin
reqbin.com โ€บ code โ€บ python โ€บ wr2wzoxh โ€บ python-requests-response-example
How do I get the response object in Python Requests?
The Response object is returned as a result of calls to the request.get(), request.post(), request.put(), and request.delete() methods of the Requests Library. 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 as an HTML page, an image, or a PDF file. In this Python Requests Library Response example, we send a request to ReqBin URL and display the server response.
๐ŸŒ
Requests
requests.readthedocs.io โ€บ en โ€บ latest โ€บ user โ€บ quickstart
Quickstart โ€” Requests 2.34.2 documentation
3 weeks ago - In the rare case that youโ€™d like to get the raw socket response from the server, you can access r.raw. If you want to do this, make sure you set stream=True in your initial request.
๐ŸŒ
Mimo
mimo.org โ€บ glossary โ€บ python โ€บ requests-library
Mimo: The coding platform you need to learn Web Development, Python, and more.
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 ...
๐ŸŒ
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 โ€บ 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.
๐ŸŒ
Codecademy
codecademy.com โ€บ docs โ€บ python โ€บ requests module โ€บ .get()
Python | Requests Module | .get() | Codecademy
May 15, 2024 - The .get() method sends a GET request to a web server and it returns a response object. ... Learn to analyze and visualize data using Python and statistics.
Find elsewhere
๐ŸŒ
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 ...
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ http.client.html
http.client โ€” HTTP protocol client โ€” Python 3.14.5 ...
A subclass of ConnectionResetError and BadStatusLine. Raised by HTTPConnection.getresponse() when the attempt to read the response results in no data read from the connection, indicating that the remote end has closed the connection.
๐ŸŒ
CodeSignal
codesignal.com โ€บ learn โ€บ courses โ€บ basics-of-http-requests-with-python โ€บ lessons โ€บ making-get-requests-and-handling-responses-1
Making GET Requests and Handling Responses
Our goal is to retrieve a list of to-do items from the /todos endpoint using the GET method. By using the requests.get() method, we send a GET request to the constructed full URL. The response from the server, stored in the variable response, is then printed using response.text, which gives ...
๐ŸŒ
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!

๐ŸŒ
LabEx
labex.io โ€บ tutorials โ€บ python-how-to-parse-response-content-from-a-python-requests-call-398048
How to parse response content from a Python requests call | LabEx
Run this script to see how the JSON data is parsed into a Python dictionary: ... You should see output that displays information about the GitHub user, including their username, followers count, and repository count. Many APIs return lists of objects. Let's see how to handle this kind of response. Create a file called json_list.py with this content: import requests ## Make a request to an API that returns a list of posts response = requests.get("https://jsonplaceholder.typicode.com/posts") ## Check if the request was successful if response.status_code == 200: ## Parse the JSON response (this w
๐ŸŒ
Scaler
scaler.com โ€บ home โ€บ topics โ€บ python responses
Python Responses - Scaler Topics
May 4, 2023 - Whenever a request is made to a URI, It would return a response object. In Python terms, this object is returned by the requests.method() method. The methods can be GET, POST, GET, PUT, etc.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ python โ€บ response-url-python-requests
response.url - Python requests - GeeksforGeeks
July 12, 2025 - To illustrate use of response.url, let's ping api.github.com. To run this script, you need to have Python and requests installed on your PC. ... # import requests module import requests # Making a get request response = requests.get('https://api.github.com/') # print response print(response) # print url print(response.url)
๐ŸŒ
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())
๐ŸŒ
DataCamp
datacamp.com โ€บ tutorial โ€บ making-http-requests-in-python
Getting Started with Python HTTP Requests for REST APIs | DataCamp
December 5, 2024 - The requests library is worth learning because it is the de facto industry standard for sending HTTP requests in Python. As you will see, it isolates all the challenges of making requests behind a straightforward API, allowing you to concentrate on communicating with services and consuming data in your application. Our certification programs help you stand out and prove your skills are job-ready to potential employers. ... import requests # The API endpoint url = "https://jsonplaceholder.typicode.com/posts/1" # A GET request to the API response = requests.get(url) # Print the response print(response.json())
๐ŸŒ
GitHub
github.com โ€บ getsentry โ€บ responses
GitHub - getsentry/responses: A utility for mocking out the Python Requests library. ยท GitHub
responses.get(Response args) - register GET response
Starred by 4.3K users
Forked by 365 users
Languages ย  Python