 #  cURL to Python Curl\_Cffi

Convert cURL commands to Python curl\_cffi code with headers, cookies, and authentication

 

 ####  Copy as cURL from Browser

- [Chrome DevTools](https://scrapfly.io/blog/answers/how-to-copy-as-curl-with-chrome/)
- [Firefox DevTools](https://scrapfly.io/blog/answers/how-to-copy-as-curl-with-firefox/)
- [Safari DevTools](https://scrapfly.io/blog/answers/how-to-copy-as-curl-with-safari/)
- [Brave DevTools](https://scrapfly.io/blog/answers/how-to-copy-as-curl-with-brave/)
- [Edge DevTools](https://scrapfly.io/blog/answers/how-to-copy-as-curl-with-edge/)
 
 

####  Supported Libraries

- [requests - Simple &amp; Popular](https://scrapfly.io/web-scraping-tools/curl-python/requests)
- [httpx - Modern Async](https://scrapfly.io/web-scraping-tools/curl-python/httpx)
- [aiohttp - High Performance](https://scrapfly.io/web-scraping-tools/curl-python/aiohttp)
- [curl\_cffi - TLS Fingerprinting](https://scrapfly.io/web-scraping-tools/curl-python/curl_cffi)
 
 

####  Quick Examples

- [Simple GET request](https://scrapfly.io/javascript:void(0))
- [With custom headers](https://scrapfly.io/javascript:void(0))
- [POST with JSON data](https://scrapfly.io/javascript:void(0))
- [With authentication](https://scrapfly.io/javascript:void(0))
- [With cookies](https://scrapfly.io/javascript:void(0))
 
 

 

  [requests](https://scrapfly.io/web-scraping-tools/curl-python/requests) [httpx](https://scrapfly.io/web-scraping-tools/curl-python/httpx) [aiohttp](https://scrapfly.io/web-scraping-tools/curl-python/aiohttp) [curl\_cffi](https://scrapfly.io/web-scraping-tools/curl-python/curl_cffi) 

 ###  Paste your cURL Command



   [  Try in Scrapfly Playground ](https://scrapfly.io/register?redirect=%2Fdashboard%2Fplayground%2Fweb-scraper) 

 

 ####  📦 curl\_cffi - HTTP client with TLS fingerprinting 

 

   

 [  GitHub Repository ](https://github.com/yifeikong/curl_cffi) [  Documentation ](https://curl-cffi.readthedocs.io/en/latest/) [  PyPI Package ](https://pypi.org/project/curl-cffi/) 

 

 

##  Why convert to curl\_cffi instead of requests

 `curl_cffi` binds to `curl-impersonate`, a build of libcurl patched to reproduce a specific browser's TLS and HTTP/2 stack. Its API deliberately mirrors `requests`, so the converted code reads the same, with one extra argument: `impersonate="chrome"` (or a pinned build such as `chrome124`, `safari17_0`, `firefox133`).

 That argument changes what the server sees before a single byte of your request is parsed: the cipher list and its order, the TLS extension order, the supported groups, the ALPN offer, and the HTTP/2 SETTINGS frame plus header order. Those are what [JA3/JA4](https://scrapfly.io/web-scraping-tools/ja3-fingerprint) and [HTTP/2 fingerprints](https://scrapfly.io/web-scraping-tools/http2-fingerprint) hash. Python's own stack has a distinctive signature no header spoofing can hide, which is why a command that works in your terminal can return 403 from `requests` with byte-identical headers.

 Two caveats. Pin the impersonation target: browsers change their Client Hello every few releases, and a stale profile is itself a signal. And a matching handshake is only one layer — the IP reputation, the JavaScript challenge and the behavioural checks still run, so a converted request can pass the fingerprint check and still be challenged. When keeping up with that is not the job you want, the [Web Scraping API](https://scrapfly.io/products/web-scraping-api) maintains the fingerprints, proxies and challenge solving behind one call.

 

  ###  Need Help?

 Learn more about [using cURL for web scraping](https://scrapfly.io/blog/posts/how-to-use-curl-for-web-scraping) or explore our [guide to cURL with JSON](https://scrapfly.io/blog/posts/how-to-curl-json). Found a bug or something missing? [Contact our support team](https://scrapfly.io/docs/support#contact) or [contribute on GitHub](https://github.com/scrapfly).

 

---

## Learn Web Scraping With Python

 [ Introduction tutorial to web scraping with Python. How to collect and parse public data. Challenges, best practices and an example project.

 

 

 ](https://scrapfly.io/blog/posts/web-scraping-with-python/ "Python Web Scraping Tutorial and Example Project") 

 [ Tutorial on web scraping with scrapy and Python through a real world example project. Best practices, extension highlights and common challenges.

 

 

 ](https://scrapfly.io/blog/posts/web-scraping-with-scrapy "Web Scraping With Scrapy: The Complete Guide") 

 [ BeautifulSoup is one of the most popular libraries used in web scraping. It's used to parse HTML documents for data either through Python scripting or the use of CSS selectors.

 

 

 ](https://scrapfly.io/blog/posts/web-scraping-with-python-beautifulsoup/ "Web Scraping with Python and BeautifulSoup")