🌐
PyPI
pypi.org β€Ί project β€Ί requests
requests Β· PyPI
... Requests is a simple, yet elegant, HTTP library. >>> import requests >>> r = requests.get('https://httpbin.org/basic-auth/user/pass', auth=('user', 'pass')) >>> r.status_code 200 >>> r.headers['content-type'] 'application/json; charset=utf8' ...
      Β» pip install requests
    
Published Β  Aug 18, 2025
Version Β  2.32.5
software library for HTTP connection in Python
Requests is an HTTP client library for the Python programming language. Requests is one of the most downloaded Python libraries, with over 30 million monthly downloads. It maps the HTTP protocol onto … Wikipedia
Factsheet
Original author Kenneth Reitz
Developers Cory Benfield, Ian Stapleton Cordasco, Nate Prewitt
Initial release 14 February 2011 (2011-02-14)
Factsheet
Original author Kenneth Reitz
Developers Cory Benfield, Ian Stapleton Cordasco, Nate Prewitt
Initial release 14 February 2011 (2011-02-14)
🌐
W3Schools
w3schools.com β€Ί python β€Ί ref_requests_get.asp
Python Requests get Method
Python Examples Python Compiler ... Q&A Python Bootcamp Python Certificate Python Training ... The get() method sends a GET request to the specified url....
🌐
Requests
requests.readthedocs.io β€Ί en β€Ί latest β€Ί user β€Ί quickstart
Quickstart β€” Requests 2.33.0.dev1 documentation
Requests allows you to provide these arguments as a dictionary of strings, using the params keyword argument. As an example, if you wanted to pass key1=value1 and key2=value2 to httpbin.org/get, you would use the following code:
🌐
Requests
requests.readthedocs.io
Requests: HTTP for Humansβ„’ β€” Requests 2.33.0.dev1 documentation
Requests is an elegant and simple HTTP library for Python, built for human beings. ... >>> r = requests.get('https://api.github.com/user', auth=('user', 'pass')) >>> r.status_code 200 >>> r.headers['content-type'] 'application/json; charset=utf8' >>> r.encoding 'utf-8' >>> r.text '{"type":"User"...'
🌐
Real Python
realpython.com β€Ί python-requests
Python's Requests Library (Guide) – Real Python
July 23, 2025 - Requests is not a built-in Python moduleβ€”it’s a third-party library that you must install separately. You make a GET request in Python using requests.get() with the desired URL.
Top answer
1 of 1
7

They are both correct and will work the same.

The best way to clear up this confusion is to look at the requests source code.

Here is the code for request.get (as of 2.25.1):

def get(url, params=None, **kwargs):
    r"""Sends a GET request.
    :param url: URL for the new :class:`Request` object.
    :param params: (optional) Dictionary, list of tuples or bytes to send
        in the query string for the :class:`Request`.
    :param \*\*kwargs: Optional arguments that ``request`` takes.
    :return: :class:`Response <Response>` object
    :rtype: requests.Response
    """

    kwargs.setdefault('allow_redirects', True)
    return request('get', url, params=params, **kwargs)

...which shows that requests.get just calls requests.request with a hardcoded 'get' for the 1st argument. All the other parameters (url, params, **kwargs) are all just passed through.

Basically, it is just a convenience method or a shorthand or a shortcut so you don't have to manually remember which string to pass for the method parameter. It's easier especially when using an IDE because your IDE's IntelliSense can help you select .get or .post or .delete, etc. but not the raw strings "GET", "POST", or "DELETE", etc.

The requests docs can also offer some clarity.

  • requests.request(method, url, **kwargs)

    It says "Constructs and sends a Request.". So this one is for ANY type of request, and you need to pass in 2 required arguments: the method and the URL. All the possible kwargs are listed in the doc, including the params from your example.

  • requests.get(url, params=None, **kwargs)

    It says "Sends a GET request.". So this one is more specific in that it is only for a GET request. It only has 1 required argument, the URL. No need to pass "GET". And then kwargs is "Optional arguments that request takes." which just points back to the main requests.request method.

I would say it's a matter of opinion and coding style which one to use. A use-case where it makes sense to prefer requests.request is when wrapping different API calls and providing a Python interface for them.

For example, I have these APIs:

  • GET /api/v1/user/[user-id]
  • PATCH /api/v1/user/[user-id]
  • DELETE /api/v1/user/[user-id]

When implementing get_user and update_user and delete_user, I could just call the .get, .post, .delete, etc. methods. But if calling these APIs required passing in many and/or complicated kwargs (headers, auth, timeout, etc.), then that would lead to a lot of duplicated code.

Instead, you can do it all in one method then use requests.request:

def get_user(user_id):
    return call_api("GET", user_id)

def update_user(user_id, user):
    return call_api("PATCH", user_id, user=user)

def delete_user(user_id):
    return call_api("DELETE", user_id)

def call_api(method, user_id, user=None):
    # Lots of preparation code to make a request
    headers = {
        "header1": "value1",
        "header2": "value2",
        # There can be lots of headers...
        "headerN": "valueN",
    }
    timeout = (1, 30)
    payload = user.json() if user else {}

    url = f"/api/v1/user/{user_id}"
    return requests.request(
        method,
        url,
        headers=headers,
        timeout=timeout,
        json=payload,
    )

There are probably other ways to refactor the code above to reduce duplication. That's just an example, where if you called .get, .patch, .delete directly, then you might end up repeating listing all those headers every time, setting up the URL, doing validations, etc.

🌐
Codecademy
codecademy.com β€Ί docs β€Ί python β€Ί requests module β€Ί .get()
Python | Requests Module | .get() | Codecademy
May 15, 2024 - The .get() method sends a request for data to a web server. The response object it returns contains various types of data such as the webpage text, status code, and the reason for that response.
Find elsewhere
🌐
Mimo
mimo.org β€Ί glossary β€Ί python β€Ί requests-library
Python requests Library: How to Make HTTP Requests with Python
It's a Third-Party Library: requests is not part of Python's standard library, so you must install it first with pip install requests. Use requests.get() for Fetching Data: This is the most common method, used to retrieve information from a URL.
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί python-requests-tutorial
Python Requests - GeeksforGeeks
July 31, 2025 - Python Requests Library is a simple and powerful tool to send HTTP requests and interact with web resources. It allows you to easily send GET, POST, PUT, DELETE, PATCH, HEAD requests to web servers, handle responses, and work with REST APIs ...
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί get-method-python-requests
GET method - Python requests - GeeksforGeeks
July 12, 2025 - The page and the encoded information are separated by the β€˜?’ character. For example: ... Python's requests module provides in-built method called get() for making a GET request to a specified URL.
🌐
Tutorialspoint
tutorialspoint.com β€Ί python β€Ί python_requests_get_method.htm
Python Requests get() Method
The Python Requests get() method is used to send an HTTP GET request to a specified URL. This method retrieves data from the specified server endpoint. This method can accept optional parameters such as params for query parameters, headers for
🌐
ReqBin
reqbin.com β€Ί code β€Ί python β€Ί poyzx88o β€Ί python-requests-get-example
How do I send a GET request using Python Requests Library?
The GET request method is used to request a resource from the server using the provided URL. The HTTP GET method is one of nine standard methods of Hypertext Transfer Protocol (HTTP).
🌐
GitHub
github.com β€Ί luminati-io β€Ί python-requests
GitHub - luminati-io/python-requests: Python's 'requests' library: learn HTTP methods, parsing responses, proxy usage, timeouts, and more for efficient web scraping. Β· GitHub
A query string starts with ? and consists of a key-value pair separated by an equal sign (=) and concatenated by &. Programmatically specifying this query string in Python code is not always easy, especially when dealing with optional parameters. That is why requests offers the params option: import requests # define query parameters as a dictionary params = { 'page': 1, 'limit': 10, 'category': 'electronics' } # send a GET request to the following URL: # 'https://api.example.com/products?page=1&limit=10&category=electronics' response = requests.get('https://api.example.com/products', params=params)
Author Β  luminati-io
🌐
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 - There are a few common authentication methods for REST APIs that can be handled with Python Requests. The simplest way is to pass your username and password to the appropriate endpoint as HTTP Basic Auth; this is equivalent to typing your username and password into a website. requests.get( 'https://api.github.com/user', auth=HTTPBasicAuth('username', 'password') )
🌐
DataCamp
datacamp.com β€Ί tutorial β€Ί making-http-requests-in-python
Getting Started with Python HTTP Requests for REST APIs | DataCamp
December 5, 2024 - Learn how to use Python HTTP requests to interact with REST APIs. This guide covers GET and POST requests, examples, and best practices for API integration.
🌐
Reddit
reddit.com β€Ί r/learnpython β€Ί i don't really understand requests python module
r/learnpython on Reddit: I don't really understand Requests python module
February 3, 2022 -

https://www.youtube.com/watch?v=tb8gHvYlCFs&t=374s

I am watching this vid, all excited to learn requests, but I don't really understand nearly anything, like what is r.content doing, or the r.json() function does I also don't get what

what is in r.content, it returns things, but I don't really understand what these things are, r.text returns a dictionary of args, headers, origin etc but I don't really get how this information is useful.

r.get, r.post, or r.put really do I am really sorry for this but if someone could link an article or a little video that explains what the content is, like I am not sure what to search for.

🌐
W3Schools
w3schools.com β€Ί python β€Ί ref_requests_response.asp
Python requests.Response Object
Python Examples Python Compiler ... Python Certificate Python Training ... The requests.Response() Object contains the server's response to the HTTP request....
🌐
GeeksforGeeks
geeksforgeeks.org β€Ί python β€Ί get-post-requests-using-python
GET and POST Requests Using Python - GeeksforGeeks
July 17, 2025 - This post discusses two HTTP (Hypertext Transfer Protocol) request methods GET and POST requests in Python and their implementation in Python.
🌐
DigitalOcean
digitalocean.com β€Ί community β€Ί tutorials β€Ί how-to-get-started-with-the-requests-library-in-python
How To Get Started With the Requests Library in Python | DigitalOcean
August 30, 2021 - A client (like a browser or Python script using Requests) will send some data to a URL. Then, the server located at the URL will read the data, decide what to do with it, and return a response to the client. Finally, the client can decide what to do with the data in the response. Part of the data the client sends in a request is the request method. Some common request methods are GET, POST, and PUT.