Python Requests default user agent

Requests sends python-requests/<version> unless a User-Agent header is set on the request or the Session. Below is its default user agent, what each part means, and how to change it.

python-requests/2.34.2

At a glance

TypeHTTP client
OperatorPython Requests project
Version2.34.2

String breakdown

FragmentMeaning
python-requests/2.34.2python-requests HTTP client, version 2.34.2 — a program or script, not a browser.

Check and change it in code

See the default it sends

import requests
print(requests.utils.default_user_agent())

Send your own instead

import requests
requests.get("https://example.com", headers={"User-Agent": "MyApp/1.0"})

Source: requests/utils.py (v2.34.2) · checked September 2026

Related user agents

All user agent strings →

What does your own browser send? Check your user agent →