Last Updated : 12 Jul, 2025
Requests library is one of the important aspects of Python for making HTTP requests to a specified URL. This article revolves around how one can make GET request to a specified URL using requests.GET() method. Before checking out GET method, let's figure out what a GET request is -
GET Http MethodThe GET method is used to retrieve information from the given server using a given URL. The GET method sends the encoded user information appended to the page request. The page and the encoded information are separated by the ‘?’ character. For example:
https://www.google.com/search?q=helloHow to make GET request through Python Requests
Python's requests module provides in-built method called get() for making a GET request to a specified URL.
Syntax -
requests.get(url, params={key: value}, args)
Example - Let's try making a request to Github's APIs for example purposes.
Python3
import requests
# Making a GET request
r = requests.get('https://api.github.com/ / users / naveenkrnl')
# check status code for response received
# success code - 200
print(r)
# print content of request
print(r.content)
save this file as request.py and through terminal run,
python request.py
Output -
Advantages of Using the GET Method
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4