# lexiforest/curl_cffi

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/lexiforest-curl-cffi).**

4,999 stars · 453 forks · Python · mit

## Links

- GitHub: https://github.com/lexiforest/curl_cffi
- Homepage: https://curl-cffi.readthedocs.io/
- awesome-repositories: https://awesome-repositories.com/repository/lexiforest-curl-cffi.md

## Topics

`akamai-fingerprint` `curl` `curl-impersonate` `fingerprinting` `http` `http-client` `http2-fingerprint` `https` `ja3` `ja3-fingerprint` `tls-fingerprint` `web-scraping`

## Description

curl_cffi is a Python HTTP client built on libcurl that focuses on browser fingerprint impersonation to evade anti-bot detection. By replacing default TLS handshake and HTTP/2 settings with those extracted from real browsers like Chrome and Firefox, it allows HTTP requests that closely mimic actual browser traffic, reducing the likelihood of being blocked by services that fingerprint automated clients.

Beyond fingerprint impersonation, curl_cffi offers a dual API supporting both synchronous and asynchronous execution, with per-request proxy assignment, automatic retry with exponential backoff, and persistent session-based connection pooling. It also includes WebSocket connectivity, enabling real-time two‑way communication over an existing session—features that collectively give developers fine‑grained control over request behavior while maintaining a simple, requests‑like interface.

## Tags

### Security & Cryptography

- [TLS Fingerprint Impersonators](https://awesome-repositories.com/f/security-cryptography/device-fingerprinting/fingerprint-configuration/tls-fingerprinting/tls-fingerprint-impersonators.md) — A Python HTTP client that impersonates browser TLS fingerprints to evade anti-bot detection systems.
- [Anti-Bot Evasion](https://awesome-repositories.com/f/security-cryptography/bot-detection/anti-bot-evasion.md) — Evades bot detection by imitating the exact TLS and HTTP/2 fingerprints of popular browsers.

### Testing & Quality Assurance

- [HTTP Request Clients](https://awesome-repositories.com/f/testing-quality-assurance/http-request-clients.md) — Provides a synchronous and asynchronous HTTP client with a requests-like interface for executing web requests. ([source](https://curl-cffi.readthedocs.io/))

### Web Development

- [Web Scraping Evasion Tools](https://awesome-repositories.com/f/web-development/web-automation-scraping/web-scraping-automation/web-scraping-evasion-tools.md) — Sends HTTP requests that mimic real browsers to scrape content from sites that block automated tools.

### DevOps & Infrastructure

- [Request Retries](https://awesome-repositories.com/f/devops-infrastructure/api-service-management/api-resilience/request-retries.md) — Automatically retries failed HTTP requests with configurable backoff to handle transient network errors. ([source](https://curl-cffi.readthedocs.io/))

### Networking & Communication

- [Connection Pooling](https://awesome-repositories.com/f/networking-communication/connection-pooling.md) — Maintains a persistent session object that reuses TCP connections and preserves TLS state across requests.
- [Automated Retry Sessions](https://awesome-repositories.com/f/networking-communication/network-reliability-diagnostics/connection-session-management/automated-retry-sessions.md) — Combines automatic retry with persistent session management for reliable data fetching from web services.
- [Proxy and Fingerprint Rotation](https://awesome-repositories.com/f/networking-communication/proxy-rotation-services/proxy-and-fingerprint-rotation.md) — Spreads requests across multiple proxies to hide the source IP and reduce the risk of blocking.
- [Per-Request Proxy Assignments](https://awesome-repositories.com/f/networking-communication/request-proxies/per-request-proxy-assignments.md) — Allows each HTTP request to use a different proxy server independently of the session configuration.

### Programming Languages & Runtimes

- [Exponential Backoff Retries](https://awesome-repositories.com/f/programming-languages-runtimes/language-features-paradigms/concurrency-models/background-task-management/background-task-retry-policies/asynchronous-task-retries/exponential-backoff-retries.md) — Implements exponential backoff retry logic to automatically re-attempt failed requests with increasing delays.

### Software Engineering & Architecture

- [Dual API HTTP Clients](https://awesome-repositories.com/f/software-engineering-architecture/async-sync-compatibility-layers/dual-api-http-clients.md) — Ships both blocking and async request interfaces built on the same underlying libcurl engine.
