Documentation
Subscription API
Export a subscription proxy list and update the settings that control generated proxy usernames.
The Subscription API lets you programmatically export the proxy list for one subscription and update the synced settings used to generate that list.
Use it when you want to rotate between countries, create new sticky sessions, switch between HTTP and SOCKS5 output, or retrieve the latest proxy lines without opening the dashboard.
Authentication
All Subscription API examples use your subscription API key.
apiKey={subscriptionApiKey}
You can find the key in the dashboard. The key must belong to the owner of the subscription you are trying to access.
Export a proxy list
GET https://api.thunderproxy.com/v1/public/subscriptions/export/{subscriptionId}/txt?apiKey={apiKey}
The response is plain text. Each line is one proxy entry.
gateway.thunderproxy.com:12345:username-res-US-sid-12345678:password
gateway.thunderproxy.com:12345:username-res-DE-sid-87654321:password
The export endpoint does not accept location, rotation, or protocol query parameters. It reads the saved settings for that subscription and returns the current generated list.
Update synced settings
GET https://api.thunderproxy.com/v1/api/subscriptions/{subscriptionId}/settings?apiKey={apiKey}
This endpoint updates the saved settings used by the export endpoint.
It returns plain text:
OK
After updating settings, call the export endpoint again to retrieve the updated list.
Settings query parameters
| Parameter | Values | Notes |
|---|---|---|
country | ANY, US, DE, FR, ... | Country code. Use ANY to remove country targeting. |
state | State code/name from the location list | Use with country. |
city | City name from the location list | Use with country and, when applicable, state. |
rotation | rotating, sticky | rotating returns one rotating username. sticky generates multiple session usernames. |
sessions | 1 to 20000 | Number of sticky session usernames to generate. |
protocol | http, socks5 | Applies when SOCKS5 gateway support is enabled for the subscription product. |
Example: change country and export
curl "https://api.thunderproxy.com/v1/api/subscriptions/sub_123/settings?apiKey=YOUR_API_KEY&country=DE&rotation=rotating"
curl "https://api.thunderproxy.com/v1/public/subscriptions/export/sub_123/txt?apiKey=YOUR_API_KEY"The exported usernames will target Germany until you change the subscription settings again.
Example: create sticky sessions
curl "https://api.thunderproxy.com/v1/api/subscriptions/sub_123/settings?apiKey=YOUR_API_KEY&country=US&rotation=sticky&sessions=10"
curl "https://api.thunderproxy.com/v1/public/subscriptions/export/sub_123/txt?apiKey=YOUR_API_KEY"Sticky exports include session IDs in the username, such as -sid-12345678. Each generated username can be used independently, so you can run multiple sessions at the same time as long as the subscription is active.
Example: export SOCKS5 URIs
curl "https://api.thunderproxy.com/v1/api/subscriptions/sub_123/settings?apiKey=YOUR_API_KEY&protocol=socks5"
curl "https://api.thunderproxy.com/v1/public/subscriptions/export/sub_123/txt?apiKey=YOUR_API_KEY"If the subscription supports SOCKS5 gateway export and the proxy format is URI output, exported lines use the socks5:// scheme.
Export formats
The dashboard controls the proxy output format. The export endpoint returns whichever format is saved on the subscription.
| Saved format | Output example |
|---|---|
host:port:user:pass | gw.thunderproxy.net:5959:username:password |
user:pass@host:port | username:[email protected]:5959 |
protocol://user:pass@host:port | http://username:[email protected]:5959 or socks5://username:[email protected]:9595 |
Product behavior
Residential and datacenter rotating subscriptions support location, rotation, sessions, and protocol updates.
Static ISP subscriptions use stable proxy entries. Static ISP export settings are controlled from the dashboard and do not use the /v1/api/subscriptions/{subscriptionId}/settings endpoint.
Exported proxy lists continue to work while the subscription is active. If a subscription expires, is deleted, or runs out of available usage, exported entries may stop authenticating.
Related endpoints
Generate city-combination usernames for rotating subscriptions:
GET https://api.thunderproxy.com/v1/api/subscriptions/{subscriptionId}/city-combinations?apiKey={apiKey}&amount=2
amount defaults to 2 and can be at most 5.