API recipes

Filtering proxies by country

Ask for one or more countries, exclude others, and handle the moments when the pool has none.


Include countries.

Pass ISO 3166 two-letter codes, separated by commas. Case does not matter.

curl 'https://gimmeproxy.com/api/getProxy?country=BR,AR'

The answer is a random proxy from any of the listed countries. Its country field tells you which one.

Exclude countries.

notCountry works the other way round: anything but the listed countries.

curl 'https://gimmeproxy.com/api/getProxy?notCountry=US,CN'

Combine filters.

Every filter must match. Fewer filters mean a larger pool to draw from.

GoalQuery
SOCKS5 in Japancountry=JP&protocol=socks5
Fast, in Europecountry=DE,FR,NL&minSpeed=100
Fresh, not USnotCountry=US&maxCheckPeriod=600

When nothing matches.

Availability per country changes all day. When no live proxy matches, the API still answers 200, with an error body:

{"error":"no more proxies left"}

Check for it, then widen the filter: add neighbouring countries, drop minSpeed, or allow an older check. The free proxy list shows how many verified proxies each country has right now.

The country is the proxy’s.

It comes from the proxy’s address in a geolocation database. A proxy may still route your traffic out somewhere else.

Keep building.

More guides to help you get the most from gimmeproxy.

Get a free proxy