[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-71153":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":43,"readmeContent":44,"aiSummary":45,"trendingCount":16,"starSnapshotCount":16,"syncStatus":46,"lastSyncTime":47,"discoverSource":48},71153,"curl_cffi","lexiforest\u002Fcurl_cffi","lexiforest","Python binding for curl-impersonate fork via cffi. A http client that can impersonate browser tls\u002Fja3\u002Fhttp2 fingerprints.","https:\u002F\u002Fcurl-cffi.readthedocs.io\u002F",null,"Python",5789,499,37,46,0,33,79,213,99,39.1,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42],"akamai-fingerprint","curl","curl-impersonate","fingerprinting","http","http-client","http2-fingerprint","http3-fingerprints","https","ja3","ja3-fingerprint","ja4","ja4-fingerprint","quic-fingerprints","tls-fingerprint","web-scraping","2026-06-12 02:02:48","# curl_cffi\n\n[![PyPI Downloads](https:\u002F\u002Fstatic.pepy.tech\u002Fbadge\u002Fcurl-cffi\u002Fweek)](https:\u002F\u002Fpepy.tech\u002Fprojects\u002Fcurl-cffi)\n![PyPI - Python Version](https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fpyversions\u002Fcurl_cffi)\n[![PyPI version](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fcurl-cffi.svg)](https:\u002F\u002Fbadge.fury.io\u002Fpy\u002Fcurl-cffi)\n[![Generic badge](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FTelegram%20Channel-join-blue?logo=telegram)](https:\u002F\u002Ft.me\u002Fimpersonate_pro)\n[![Generic badge](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-join-purple?logo=blue)](https:\u002F\u002Fdiscord.gg\u002FkJqMHHgdn2)\n\n[Documentation](https:\u002F\u002Fcurl-cffi.readthedocs.io)\n\nPython binding for [curl-impersonate fork](https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fcurl-impersonate)\nvia [cffi](https:\u002F\u002Fcffi.readthedocs.io\u002Fen\u002Flatest\u002F). For commercial support, visit [impersonate.pro](https:\u002F\u002Fimpersonate.pro).\n\n`curl_cffi` is the most popular Python binding for `curl`. Unlike other pure\npython http clients like `httpx` or `requests`, `curl_cffi` can impersonate\nbrowsers' TLS\u002FJA3 and HTTP\u002F2 fingerprints. If you are blocked by some\nwebsite for no obvious reason, you can give `curl_cffi` a try.\n\nPython 3.10 is the minimum supported version since v0.14.\n\n## Recent highlights\n\n- 💨 http\u002F3 fingerprints and UDP socks5 proxy support was added in `v0.15.0`!\n- 🦞 Added `curl-cffi` CLI and skills for debugging and for claws\u002Fagents.\n\n## Recall.ai - API for meeting recordings\n\n\u003Ca href=\"https:\u002F\u002Fwww.recall.ai\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=lexiforest-curl_cffi\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fcdn.prod.website-files.com\u002F620d732b1f1f7b244ac89f0e\u002F66b294e51ee15f18dd2b171e_recall-logo.svg\" alt=\"Recall.ai\" height=\"47\" width=\"149\">\u003C\u002Fa>\n\nIf you’re looking for a meeting recording API, consider checking out [Recall.ai](https:\u002F\u002Fwww.recall.ai\u002F?utm_source=github&utm_medium=sponsorship&utm_campaign=lexiforest-curl_cffi), an API that records Zoom, Google Meet, Microsoft Teams, in-person meetings, and more.\n\n## Residential Proxies\n\n\u003Ca href=\"https:\u002F\u002Fwww.thordata.com\u002F?ls=github&lk=curl_\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flexiforest\u002Fcurl_cffi\u002Fmain\u002Fassets\u002Fthordata.png\" alt=\"Thordata\" height=\"126\" width=\"240\">\u003C\u002Fa>\n\nThordata: A reliable and cost-effective proxy service provider. One-click collection of public network data, providing enterprises and developers with stable, efficient, and compliant global proxy IP services. Register for a free trial of [residential proxies](https:\u002F\u002Fwww.thordata.com\u002F?ls=github&lk=curl_) and receive 2000 free SERP API calls.\n\n## Sponsors\n\nMaintenance of this project is made possible by all the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fcurl_cffi\u002Fgraphs\u002Fcontributors\">contributors\u003C\u002Fa> and \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Flexiforest\">sponsors\u003C\u002Fa>. If you'd like to sponsor this project and have your avatar or company logo appear below \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fsponsors\u002Flexiforest\">click here\u003C\u002Fa>. 💖\n\n------\n\n### Bypass Cloudflare with API\n\n\u003Ca href=\"https:\u002F\u002Fyescaptcha.com\u002Fi\u002FstfnIO\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flexiforest\u002Fcurl_cffi\u002Fmain\u002Fassets\u002Fyescaptcha.png\" alt=\"Yes Captcha!\" height=\"47\" width=\"149\">\u003C\u002Fa>\n\nYescaptcha is a proxy service that bypasses Cloudflare and uses the API interface to\nobtain verified cookies (e.g. `cf_clearance`). Click [here](https:\u002F\u002Fyescaptcha.com\u002Fi\u002FstfnIO)\nto register: \u003Chttps:\u002F\u002Fyescaptcha.com\u002Fi\u002FstfnIO>\n\n------\n\n\u003Ca href=\"https:\u002F\u002Fhypersolutions.co\u002F?utm_source=github&utm_medium=readme&utm_campaign=curl_cffi\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flexiforest\u002Fcurl_cffi\u002Fmain\u002Fassets\u002Fhypersolutions.png\" height=\"47\" width=\"149\">\u003C\u002Fa>\n\nTLS fingerprinting alone isn't enough for modern bot protection. [Hyper Solutions](https:\u002F\u002Fhypersolutions.co?utm_source=github&utm_medium=readme&utm_campaign=curl_cffi) provides the missing piece - API endpoints that generate valid antibot tokens for:\n\nAkamai • DataDome • Kasada • Incapsula\n\nNo browser automation. Just simple API calls that return the exact cookies and headers these systems require.\n\n🚀 [Get Your API Key](https:\u002F\u002Fhypersolutions.co?utm_source=github&utm_medium=readme&utm_campaign=curl_cffi) | 📖 [Docs](https:\u002F\u002Fdocs.justhyped.dev) | 💬 [Discord](https:\u002F\u002Fdiscord.gg\u002Fakamai)\n\n------\n\n## Impersonate Suite\n\n`curl-cffi` is part of the impersonate suite.\n\n- [curl-impersonate](https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fcurl-impersonate). A curl distribution that impersonates browsers.\n- [curl_cffi](https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fcurl_cffi). Python binding to curl-impersonate.\n- [impers](https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fimpers). Node.js binding to curl-impersonate.\n- [impersonate.pro](https:\u002F\u002Fimpersonate.pro). Commercial support, more fingerprints and integrated solutions.\n\n## Features\n\n- Supports JA3\u002FTLS and http2 fingerprints impersonation, including recent browsers and custom fingerprints.\n- Much faster than requests\u002Fhttpx, on par with aiohttp\u002Fpycurl, see [benchmarks](https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fcurl_cffi\u002Ftree\u002Fmain\u002Fbenchmark).\n- Mimics the requests API, no need to learn another one.\n- Pre-compiled, so you don't have to compile on your machine.\n- Supports `asyncio` with proxy rotation on each request.\n- Supports http 2.0, which requests does not.\n- Supports http 3.0, with fingerprints and udp proxy.\n- Supports websocket.\n- MIT licensed.\n\n||requests|aiohttp|httpx|pycurl|curl_cffi|\n|---|---|---|---|---|---|\n|http\u002F2|❌|❌|✅|✅|✅|\n|http\u002F3|❌|❌|❌|☑️\u003Csup>1\u003C\u002Fsup>|✅\u003Csup>2\u003C\u002Fsup>|\n|sync|✅|❌|✅|✅|✅|\n|async|❌|✅|✅|❌|✅|\n|websocket|❌|✅|❌|❌|✅|\n|native retry|❌|❌|❌|❌|✅|\n|fingerprints|❌|❌|❌|❌|✅|\n|speed|🐇|🐇🐇|🐇|🐇🐇|🐇🐇|\n\nNotes:\n\n1. For pycurl, http\u002F3 is usually disabled at compile time by default.\n2. http\u002F3 support since v0.11.4, http\u002F3 proxy and fingerprints since v0.15.0.\n\n### curl-cffi CLI(new)\n\nSince v0.15, `curl_cffi` comes with a CLI called `curl-cffi`, you can use it for debugging\na certain url with the `--impersonate` option. It can also serve as a `web_fetch`\nreplacement for \"claws\" and \"agents\".\n\n||curl|httpie|curl-cffi|\n|---|---|---|---|\n|http\u002F2|✅|❌|✅|\n|http\u002F3|☑️\u003Csup>1\u003C\u002Fsup>|❌|✅|\n|human-friendly|☑️\u003Csup>2\u003C\u002Fsup>|✅|✅|\n|colorful|❌|✅|✅\u003Csup>3\u003C\u002Fsup>|\n|fingerprints|❌|❌|✅|\n\nNotes:\n\n1. You need an http\u002F3 enabled curl build, it's not enabled by default, at leat on my machine.\n2. As a long time command line user, I personally feel very comfortable using `curl -X POST httpbin.org`, but some users may prefer `http GET httpbin.org` syntax. If you prefer the curl syntax, you can keep using `curl-impersonate`.\n3. Install `curl_cffi[cli]` for colorful CLI output. Without `rich`, the CLI uses plain text output.\n\n## Install\n\n    pip install curl_cffi --upgrade\n\nThis should work on Linux, macOS and Windows out of the box.\n\nOn macOS, you can also install via Homebrew:\n\n    brew install lexiforest\u002Ftap\u002Fcurl-cffi\n\n\u003Csmall>Android support, including Termux, is currently in beta, you can install the beta release for testing.\nFor BSD systems, we need to get libcurl-impersonate compile first, and then add support in curl_cffi.\nIf you are using these OSes, please lend an hand.\u003C\u002Fsmall>\n\nTo install beta releases:\n\n    pip install curl_cffi --upgrade --pre\n\nTo install unstable version from GitHub:\n\n    git clone https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fcurl_cffi\u002F\n    cd curl_cffi\n    make preprocess\n    pip install .\n\n## Usage\n\n`curl_cffi` comes with a low-level `curl` API and a high-level `requests`-like API.\n`curl_cffi` also bundles with a CLI called `curl-cffi`.\n\n### CLI\n\n```sh\ncurl-cffi get tls.browserleaks.com\u002Fjson\n\n# curl-cffi can be hard to type, use an alias if you want\nalias imp=curl-cffi\nimp get tls.browserleaks.com\u002Fjson --impersonate chrome\n```\n\nFor a complete CLI guide, see [docs](https:\u002F\u002Fcurl-cffi.readthedocs.io).\n\n### requests-like\n\n```python\nimport curl_cffi\n\n# Notice the impersonate parameter\nr = curl_cffi.get(\"https:\u002F\u002Ftls.browserleaks.com\u002Fjson\", impersonate=\"chrome\")\n\nprint(r.json())\n# output: {..., \"ja3n_hash\": \"aa56c057ad164ec4fdcb7a5a283be9fc\", ...}\n# the js3n fingerprint should be the same as target browser\n\n# To keep using the latest browser version as `curl_cffi` updates,\n# simply set impersonate=\"chrome\" without specifying a version.\n# Other similar values are: \"safari\" and \"safari_ios\"\nr = curl_cffi.get(\"https:\u002F\u002Ftls.browserleaks.com\u002Fjson\", impersonate=\"chrome\")\n\n# Use http\u002F3 with impersonation\nr = curl_cffi.get(\n    \"https:\u002F\u002Ffp.impersonate.pro\u002Fapi\u002Fhttp3\",\n    http_version=\"v3\",\n    impersonate=\"chrome\"\n)\n\n# To pin a specific version, use version numbers together.\nr = curl_cffi.get(\"https:\u002F\u002Ftls.browserleaks.com\u002Fjson\", impersonate=\"chrome124\")\n\n# To impersonate other than browsers, bring your own ja3\u002Fakamai strings\n# See examples directory for details.\nr = curl_cffi.get(\"https:\u002F\u002Ftls.browserleaks.com\u002Fjson\", ja3=..., akamai=...)\n\n# http\u002Fsocks proxies are supported\nproxies = {\"https\": \"http:\u002F\u002Flocalhost:3128\"}\nr = curl_cffi.get(\"https:\u002F\u002Ftls.browserleaks.com\u002Fjson\", impersonate=\"chrome\", proxies=proxies)\n\nproxies = {\"https\": \"socks:\u002F\u002Flocalhost:3128\"}\nr = curl_cffi.get(\"https:\u002F\u002Ftls.browserleaks.com\u002Fjson\", impersonate=\"chrome\", proxies=proxies)\n```\n\n### Sessions\n\n```python\ns = curl_cffi.Session()\n\n# httpbin is a http test website, this endpoint makes the server set cookies\ns.get(\"https:\u002F\u002Fhttpbin.org\u002Fcookies\u002Fset\u002Ffoo\u002Fbar\")\nprint(s.cookies)\n# \u003CCookies[\u003CCookie foo=bar for httpbin.org \u002F>]>\n\n# retrieve cookies again to verify\nr = s.get(\"https:\u002F\u002Fhttpbin.org\u002Fcookies\")\nprint(r.json())\n# {'cookies': {'foo': 'bar'}}\n```\n\n### Supported impersonate browsers\n\n`curl_cffi` supports the same browser versions preset as supported by our [fork](https:\u002F\u002Fgithub.com\u002Flexiforest\u002Fcurl-impersonate) of [curl-impersonate](https:\u002F\u002Fgithub.com\u002Flwthiker\u002Fcurl-impersonate):\n\nThe open source version of `curl_cffi` includes versions when we are adding new capabilities for impersonating.\nIf you see a version, e.g. `chrome135`, was skipped, it's simply because there's nothing new or we were busy at that time. \nYou can simply impersonate it with your own headers and the previous browser target.\n\nFor a full list of preset fingerprints, see the [curl-impersonate docs](https:\u002F\u002Fcurl-impersonate.readthedocs.io\u002Fen\u002Flatest\u002Ffingerprints.html). \nWe will no longer put duplicated and outdated info here.\n\nIf you don't want to look up the headers\u002Fetc by yourself, consider buying commercial support from [impersonate.pro](https:\u002F\u002Fimpersonate.pro).\nWe have comprehensive browser tls, http and JavaScript fingerprints database for almost all the browser versions on various platforms.\n\nSince v0.15.1, you can use `curl-cffi update` to retrieve the latest fingerprints, without updating to a new version.\nWe offer the Safari, Chrome, Firefox updates for free and others as part of the [commercial plan](https:\u002F\u002Fimpersonate.pro).\n\nThe current number of fingerprints:\n\n![Preset](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPreset_Fingerprints-37-blue)\n![Free](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdynamic\u002Fjson?url=https%3A%2F%2Fapi.impersonate.pro%2Fv1%2Fcounts&query=%24.free&label=Free%20Fingerprints) \n![Pro](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fdynamic\u002Fjson?url=https%3A%2F%2Fapi.impersonate.pro%2Fv1%2Fcounts&query=%24.all&label=Pro%20Fingerprints)\n\nTo see the current list of fingerprints on your device, use the command line:\n\n```sh\ncurl-cffi list\n```\n\nTo update fingerprints from impersonate.pro, use the command line:\n\n```sh\ncurl-cffi update\n```\n\nIf you are trying to impersonate a target other than a browser, use `ja3=...`, `akamai=...`, `extra_fp=...`, and `perk=...`\nto specify your own customized fingerprints. See the [docs on impersonation](https:\u002F\u002Fcurl-cffi.readthedocs.io\u002Fen\u002Flatest\u002Fimpersonate\u002F_index.html) for details.\n\n\n### Asyncio\n\n```python\nfrom curl_cffi import AsyncSession\n\nasync with AsyncSession() as s:\n    r = await s.get(\"https:\u002F\u002Fexample.com\")\n```\n\nMore concurrency:\n\n```python\nimport asyncio\nfrom curl_cffi import AsyncSession\n\nurls = [\n    \"https:\u002F\u002Fgoogle.com\u002F\",\n    \"https:\u002F\u002Ffacebook.com\u002F\",\n    \"https:\u002F\u002Ftwitter.com\u002F\",\n]\n\nasync with AsyncSession() as s:\n    tasks = []\n    for url in urls:\n        task = s.get(url)\n        tasks.append(task)\n    results = await asyncio.gather(*tasks)\n```\n\nFor low-level APIs, Scrapy integration and other advanced topics, see the\n[docs](https:\u002F\u002Fcurl-cffi.readthedocs.io) for more details.\n\n### WebSockets\n\n```python\nfrom curl_cffi import WebSocket\n\ndef on_message(ws: WebSocket, message: str | bytes):\n    print(message)\n\nws = WebSocket(on_message=on_message)\nws.run_forever(\"wss:\u002F\u002Fapi.gemini.com\u002Fv1\u002Fmarketdata\u002FBTCUSD\")\n```\n\n### Asyncio WebSockets\n\n```python\nimport asyncio\nfrom curl_cffi import AsyncSession\n\nasync with AsyncSession() as session:\n    async with session.ws_connect(\"wss:\u002F\u002Fecho.websocket.org\") as ws:\n        await asyncio.gather(*[ws.send_str(\"Hello, World!\") for _ in range(10)])\n        async for message in ws:\n            print(message)\n```\n\nSee the WebSocket [docs](https:\u002F\u002Fcurl-cffi.readthedocs.io\u002Fen\u002Flatest\u002Fwebsockets.html) for full details and advanced options.\n\n## Ecosystem\n\n- Integrating with Scrapy: [divtiply\u002Fscrapy-curl-cffi](https:\u002F\u002Fgithub.com\u002Fdivtiply\u002Fscrapy-curl-cffi), [jxlil\u002Fscrapy-impersonate](https:\u002F\u002Fgithub.com\u002Fjxlil\u002Fscrapy-impersonate) and [tieyongjie\u002Fscrapy-fingerprint](https:\u002F\u002Fgithub.com\u002Ftieyongjie\u002Fscrapy-fingerprint).\n- Integrating with [requests](https:\u002F\u002Fgithub.com\u002Fel1s7\u002Fcurl-adapter), [httpx](https:\u002F\u002Fgithub.com\u002Fvgavro\u002Fhttpx-curl-cffi) as adapter.\n- Integrating with captcha resolvers: [YesCaptcha](https:\u002F\u002Fyescaptcha.com\u002Fi\u002FstfnIO).\n\n## Acknowledgement\n\n- Originally forked from [multippt\u002Fpython_curl_cffi](https:\u002F\u002Fgithub.com\u002Fmultippt\u002Fpython_curl_cffi), which is under the MIT license.\n- Headers\u002FCookies files are copied from [httpx](https:\u002F\u002Fgithub.com\u002Fencode\u002Fhttpx\u002Fblob\u002Fmaster\u002Fhttpx\u002F_models.py), which is under the BSD license.\n- Asyncio support is inspired by Tornado's curl http client.\n- The synchronous WebSocket API is inspired by [websocket_client](https:\u002F\u002Fgithub.com\u002Fwebsocket-client\u002Fwebsocket-client).\n- The asynchronous WebSocket API is inspired by [aiohttp](https:\u002F\u002Fgithub.com\u002Faio-libs\u002Faiohttp).\n\n## Contributing\n\nWhen submitting an PR, please use a different branch other than `main` and check the\n\"Allow edits by maintainers\" box, so I can update your PR with lint or style fixes. Thanks!\n\n### AI Policy\n\n- Using AI is neither encouraged nor discouraged, use it by your own choice.\n- The bottom line here is that every line of code should be **reviewed by human**, and should be [proven to work](https:\u002F\u002Fsimonwillison.net\u002F2025\u002FDec\u002F18\u002Fcode-proven-to-work\u002F).\n- It's not guaranteed that AI will come up with the cleanest solution, you are responsible to guide it to the right way you know.\n- Fix any lint errors, make sure your code follows the established convention in this project.\n- LLM tends to generate extensive or none comments, revise the comments and make sure they are concise and helpful.\n- It's absolutely **not acceptable** to generate the entire PR summary by LLM. To communicate with other human, use words from a human.\n- The only acceptable exception is to fix grammar issues if you are not a native English speaker.\n- The essence here is to keep [Human in the loop](https:\u002F\u002Fdiscourse.llvm.org\u002Ft\u002Frfc-llvm-ai-tool-policy-human-in-the-loop\u002F89159)\n\nYou can even feed the policy above to your \"copilot\" to let it adjust the style for you. :P\n","curl_cffi 是一个基于 cffi 的 Python 绑定库，用于模仿浏览器的 TLS\u002FJA3 和 HTTP\u002F2 指纹。其核心功能在于通过模仿主流浏览器的行为特征来绕过某些网站对自动化工具的检测与封锁，支持 HTTP、HTTPS 以及最新的 HTTP\u002F3 协议，并且从 v0.15.0 版本开始增加了对 UDP Socks5 代理的支持。此外，该项目还提供了一个命令行接口以方便调试。适用于需要进行网络爬虫或数据抓取但遇到反爬机制阻碍的场景，如学术研究、市场分析等领域。",2,"2026-06-11 03:36:09","high_star"]