Crate lead_oxide[][src]


lead-oxide is a wrapper around’s public proxy API.

lead-oxide strives to make it impossible to use the API incorrectly while still making regular usage as ergonomic as possible.

Keyless API Limitations

Daily Limit

At the time of writing this without an API key the pubproxy API limits users to 5 proxies per request and 50 requests per day. The maximum proxies per request is always used to minimize rate limiting along with getting the most proxies possible within the request limit meaning you should get 250 proxies per day without needing an API key.

Rate Limiting

Without an API key pubproxy limits users to one request per second so a Fetcher will try to ensure that at most only one request per second is done without an API key. This is synchronized between fetchers including across different threads: however, there can still be issues from running multiple programs from the same IP causing rate limiting to occur. The rate-limiting is quite severe (will deny requests for potentially several hours), so it’s best to avoid by all means possible.


use iso_country::Country;
use lead_oxide::{
    types::{Countries, Level, Protocol, TimeToConnect},

use std::{convert::TryFrom, time::Duration};

fn main() -> Result<(), ApiError> {
    // Fetcher for SOCKS5 proxies located in the US and Canada that support POST requests
    let mut socks_fetcher = Fetcher::new(
            .countries(Countries::allow().countries(&[Country::US, Country::CA]))

    // Fetcher for Elite HTTPS proxies that connected in 15 seconds or less
    let mut https_fetcher = Fetcher::new(

    // Get one SOCKS proxy and 10 HTTPS proxies
    let socks_proxy = &socks_fetcher.try_get(1)?[0];
    let https_proxies = https_fetcher.try_get(10)?;

    println!("SOCKS proxy: {:#?}", socks_proxy);
    println!("HTTPS proxies {:#?}", https_proxies);




Represents all the errors epressed by the API and library.


Fetcher is the entrypoint to requesting proxies from the API.


Opts provide the ability to filter the returned proxies.


Proxys represent information about the proxies returned by Fetcher.


types contains auxillary types used by Opts.