# Generate Proxies

Source: https://docs.evomi.com/public-api/endpoints/generate/

Automatically generate proxy strings with specific targeting parameters and connection preferences. This can be helpful for tools that require an URL to retrieve proxies.

## Endpoint
`GET https://api.evomi.com/public/generate`

## Parameters
| Parameter | Type | Required | Description |
|-----------|------|----------|-------------|
| `product` | string | Yes | Proxy product type |
| `countries` | string | No |  ISO country codes seperated by comma (e.g. `US,DE,NL`) |
| `city` | string | No | Target city name |
| `region` | string | No | Target region |
| `isp` | string | No | Target ISP name |
| `session` | string | No | `sticky` (normal session) or `hard` (keep as long as possible) |
| `amount` | number | No | Number of proxies to generate (1-100) |
| `format` | string | No | Output format (`1`, `2`, or `3`) |
| `prepend_protocol` | boolean | No | set to false to prevent protocol prepend. default: `true` |
| `protocol` | string | No | `http` or `socks5` default: `http`  |
| `lifetime` | number | No | Session duration in minutes (1-1440, default 30) Unavailable for hard sessions |
| `adblock` | boolean | No | Enable ad-blocking (Unavailable for rpc) |

## Products

| Code | Product Name          | Comment |
|------|-----------------------| -------
| rp   | Premium Residential   | |
| rpc  | Core Residential      | Adblock and ISP targetting unavailable |
| sdc  | Shared Datacenter           | | 
| mp   | Mobile                | | 
| static-residential   | Static Residential | No filter options work and you will receive all your proxies | 

## Format Options

<!--email_off-->

1. **Standard Format**  
   `username:password@host:port`  
   `user123:pass456@proxy.example.com:3000`

2. **Host-First Format**  
   `host:port:username:password`  
   `proxy.example.com:3000:user123:pass456`

3. **Standard Format with : instead of @**  
   `username:password:host:port`  
   `user123:pass456:proxy.example.com:3000`

<!--email_on-->

## Example Proxy List via your Browser
```bash
https://api.evomi.com/public/generate?product=rpc&countries=DE,US&format=2&protocol=socks5&amount=3&apikey=YOUR_API_KEY

```

## Success Response
The response is plain text with the generated proxies, one per line:
```md
http://rp.evomi.com:1000:proxy_username:proxy_password-US,DE
http://rp.evomi.com:1000:proxy_username:proxy_password-US,DE
http://rp.evomi.com:1000:proxy_username:proxy_password-US,DE
```

## Targeting Rules
1. You cant use cities or regions if you specify more than one country
2. Multiple countries can be passed as a comma-separated list and will be chosen at random
3. City/region targeting requires exact match from `/settings` endpoint
4. ISP targeting and adblocking is not available for `rpc` product

## Session Types
| Type | Behavior | Lifetime |
|------|----------|----------|
| None | IP changes every request | - |
| Sticky | Fixed IP for duration | Default 30 min, max 1440 min (24 h) |
| Hard | Permanent IP | As long as IP is connected |

## Error Responses
```json
{
  "error": "Invalid product for user",
  "success": false
}
```
`400 Bad Request` - User doesn't have access to requested product, or no balance

```json
{
  "error": "Exceeded maximum proxy count",
  "success": false
}
```
`429 Too Many Requests` - Maximum is 500 Proxies per generation
