Python Requests IMPersonate | The fastest Python HTTP client that can impersonate web browsers.
pip install -U primpimport primp
# Create client with browser impersonation
client = primp.Client(impersonate="chrome_145")
# Make requests
resp = client.get("https://httpbin.org/get")
print(resp.status_code) # 200
print(resp.text) # Response body
print(resp.json()) # Parsed JSONimport asyncio
import primp
async def main():
async with primp.AsyncClient(impersonate="chrome_145") as client:
resp = await client.get("https://httpbin.org/get")
print(await resp.text)
asyncio.run(main())| Browser | Profiles |
|---|---|
| 🌐 Chrome | chrome_144, chrome_145 |
| 🧭 Safari | safari_18.5, safari_26 |
| 🔷 Edge | edge_144, edge_145 |
| 🦊 Firefox | firefox_140, firefox_146 |
| ⭕ Opera | opera_126, opera_127 |
| 🎲 Random | random |
| OS | Value |
|---|---|
| 🤖 Android | android |
| 🍎 iOS | ios |
| 🐧 Linux | linux |
| 🍏 macOS | macos |
| 🪟 Windows | windows |
| 🎲 Random | random |
- 🔥 Fast - Built with Rust
- 🎭 Browser Impersonation - Mimic Chrome, Safari, Firefox, Edge, Opera
- 🌍 OS Impersonation - Windows, Linux, macOS, Android, iOS
- 🔄 Sync & Async - Both APIs available
- 🍪 Cookie Management - Persistent cookie store
- 🌐 Proxy Support - HTTP, HTTPS, SOCKS5
- 📝 HTML Conversion - Convert to markdown, plain text, rich text
- 📤 File Uploads - Multipart/form-data support
- 🔐 SSL Verification - Custom CA certificates
resp.status_code # HTTP status code
resp.text # Response body as text
resp.content # Response body as bytes
resp.json() # Parsed JSON
resp.headers # Response headers
resp.cookies # Response cookies
resp.url # Final URL
resp.encoding # Character encoding
# HTML conversion
resp.text_markdown # HTML → Markdown
resp.text_plain # HTML → Plain text
resp.text_rich # HTML → Rich text
# Streaming
for chunk in resp.stream():
print(chunk)See the /examples folder for detailed usage:
basic_usage.py- GET, POST, params, headersasync_usage.py- Async client, concurrent requestsauthentication.py- Basic auth, bearer tokensproxy.py- HTTP/SOCKS5 proxiescookies.py- Cookie managementstreaming.py- Response streamingpost_requests.py- POST/PUT/PATCH/DELETEerror_handling.py- Exception handlinghtml_conversion.py- HTML to text
This tool is for educational purposes only. Use it at your own risk.
