https://github.com/0x676e67/rquest
An ergonomic Rust HTTP Client with TLS fingerprint
https://github.com/0x676e67/rquest
akamai crawler curl-cffi curl-impersonate fingerprint http http-client http2 https impersonate ja3 ja4 requests reqwest scraper tls tls-client web-scraper web-scraping websocket
Last synced: about 1 month ago
JSON representation
An ergonomic Rust HTTP Client with TLS fingerprint
- Host: GitHub
- URL: https://github.com/0x676e67/rquest
- Owner: 0x676e67
- License: apache-2.0
- Created: 2024-09-19T13:00:39.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2025-03-24T00:57:09.000Z (about 2 months ago)
- Last Synced: 2025-03-24T01:33:48.095Z (about 2 months ago)
- Topics: akamai, crawler, curl-cffi, curl-impersonate, fingerprint, http, http-client, http2, https, impersonate, ja3, ja4, requests, reqwest, scraper, tls, tls-client, web-scraper, web-scraping, websocket
- Language: Rust
- Homepage: https://docs.rs/rquest
- Size: 4.08 MB
- Stars: 265
- Watchers: 4
- Forks: 36
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- trackawesomelist - 0x676e67/rquest (⭐269) - An ergonomic Rust HTTP Client with TLS fingerprint. [](https://github.com/0x676e67/rquest/actions/workflows/ci.yml) [](https://crates.io/crates/rquest) (Recently Updated / [Apr 03, 2025](/content/2025/04/03/README.md))
README
# rquest
[](https://github.com/0x676e67/rquest/actions/workflows/ci.yml)
[](./LICENSE)

[](https://crates.io/crates/rquest)
[](https://crates.io/crates/rquest)> 🚀 Help me work seamlessly with open source sharing by [sponsoring me on GitHub](https://github.com/0x676e67/0x676e67/blob/main/SPONSOR.md)
An ergonomic all-in-one HTTP client for browser emulation with TLS, JA3/JA4, and HTTP/2 fingerprints.
## Features
- Plain bodies, JSON, urlencoded, multipart
- Cookie Store
- Header Order
- Redirect Policy
- Rotating Proxies
- Certificate Store
- WebSocket Upgrade
- HTTPS via BoringSSL
- HTTP/2 over TLS Emulation## Example
This asynchronous example utilizes [Tokio](https://tokio.rs) with optional features enabled, requiring the following configuration in `Cargo.toml`:
```toml
[dependencies]
tokio = { version = "1", features = ["full"] }
rquest = "5"
rquest-util = "2"
```And then the code:
```rust,no_run
use rquest::Client;
use rquest_util::Emulation;#[tokio::main]
async fn main() -> Result<(), rquest::Error> {
// Build a client
let client = Client::builder()
.emulation(Emulation::Firefox136)
.build()?;// Use the API you're already familiar with
let resp = client.get("https://tls.peet.ws/api/all").send().await?;
println!("{}", resp.text().await?);Ok(())
}
```## Emulation
- **HTTP/2 over TLS**
**JA3**/**JA4**/**Akamai** fingerprints cannot accurately simulate browser fingerprints due to the sophistication of TLS encryption and the popularity of HTTP/2. rquest does not plan to support parsing these fingerprint strings for simulation. Users are encouraged to customize the configuration according to their own needs.
- **Emulation Device**
Most browser device models share the same TLS and HTTP/2 configuration, differing only in the User-Agent. The browser device emulation template is managed by [rquest-util](https://github.com/0x676e67/rquest-util).
## Building
Avoid compiling with packages that depend on `openssl-sys`, as it shares the same prefix symbol with `boring-sys`, potentially leading to [link failures](https://github.com/cloudflare/boring/issues/197) and other issues. Even if compilation succeeds, using both `openssl-sys` and `boring-sys` together can result in memory segmentation faults. Until the upstream Boring resolves these linking conflicts, using `rustls` is the best workaround.
Install the dependencies required to build [BoringSSL](https://github.com/google/boringssl/blob/master/BUILDING.md#build-prerequisites)
```shell
sudo apt-get install build-essential cmake perl pkg-config libclang-dev musl-tools -ycargo build --release
```This GitHub Actions [workflow](.github/compilation-guide/build.yml) can be used to compile the project on **Linux**, **Windows**, and **macOS**.
## License
Released under the [Apache-2.0](./LICENSE) License.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the [Apache-2.0](./LICENSE) license, shall be licensed as above, without any additional terms or conditions.
## Sponsors
[CapSolver](https://www.capsolver.com/?utm_source=github&utm_medium=banner_repo&utm_campaign=rquest) leverages AI-powered Auto Web Unblock to bypass Captchas effortlessly, providing fast, reliable, and cost-effective data access with seamless integration into Colly, Puppeteer, and Playwright—use code **`RQUEST`** for a 6% bonus!
## Accolades
The project is based on a fork of [reqwest](https://github.com/seanmonstar/reqwest).