- class proxyproviders.providers.webshare.Webshare(api_key: str, search_params: dict | None = None, config: ProxyConfig | None = None)[source]
Bases:
ProxyProvider
Webshare is a proxy provider that offers residential and datacenter proxies.
Create an account for webshare here (affiliate link) to get started with 10 free data center proxies.
You can find your API key in the Webshare dashboard here
You can find a list of all available parameters in the Webshare API documentation here
- Parameters:
api_key – Your Webshare API key
search_params – Optional parameters to include in the API requests
config – Configuration for the proxy provider. View the ProxyConfig class docs for more information.
Example:
from proxyproviders import Webshare # Initialize the Webshare API client with an API key and optional parameters proxy_provider = Webshare(api_key="your-api-key", params={"country_code_in": "US"}) # Fetch proxies proxies = proxy_provider.list_proxies() # With config from proxyproviders import ProxyConfig config = ProxyConfig(refresh_interval=60) proxy_provider = Webshare(api_key="your-api-key", params={"country_code_in": "US"}, config=config) # Fetch proxies proxies = proxy_provider.list_proxies()