Astro API: Documentation and Request Examples
24 June 2026

In this article, we will explain what a proxy service API (Application Programming Interface) is and how it allows you to manage proxies via HTTPS requests without using a web interface. We will briefly cover the key benefits of an API and go through the main Astro API commands and their purpose.
This will be useful if you need to automate proxy management, set up integration with a proxy service, or work with a large number of proxies through an API without manual operations in the interface.
New users can get a $3 trial balance to explore Astro's features. Simply contact our support team to activate it.
What is a proxy management API and why is it needed
An API (Application Programming Interface) allows you to interact with a proxy service directly via HTTPS requests, without using the interface. It is useful for automation, integrations, and managing large numbers of proxies.
API benefits and capabilities:
- automation of proxy management without the interface;
- integration of the Astro proxy service into your own systems;
- management of a large number of proxies;
- optimization of traffic usage and costs;
- reduction of manual operations and human errors;
- execution of actions in real time via requests.
Retrieving Account Balance
This endpoint allows you to retrieve your current account balance via the API. It is useful for automated balance monitoring, integration with internal billing systems, or creating low-balance notifications.
To retrieve account information, send a GET request with your API token. The response will include the current account balance and currency information.
Method: GET
Endpoint: https://astroproxy.com/api/v1/balance
Required parameter:
- token – API token used for request authentication.
Successful response example:
{
"status": "string",
"data": {
"balance": "number",
"currency": "number"
}
}
If the request is successful, the balance field will contain the current account balance.
Retrieving the List of Ports
This endpoint allows you to retrieve a list of ports available in your Astro account. It can be used to export information about created proxies, monitor their settings and traffic usage, and synchronize data with external systems.
The request supports filtering and sorting, making it convenient to work with a large number of ports.
Method: GET
Endpoint: https://astroproxy.com/api/v1/ports
Required parameter:
- token – API token used for request authentication.
Optional parameters:
- count – number of records returned in the response.
- order – sorting field. Supported values: random, created, id, name.
By default, sorting is performed by id.
- orderDirection – sorting direction: asc or desc. Default value: desc.
- status – port status:
- active – active ports only.
- archived – archived ports.
Successful response example:
{
"id": "integer",
"name": "string",
"country": "string",
"city": "string",
"network": "string",
"operator": "string",
"node": {
"ip": "string",
"address": "string"
},
"ports": {
"http": "integer",
"socks": "integer"
},
"traffic": {
"total": "integer",
"used": "integer",
"left": "integer"
},
"vpn": "string"
}
The response contains detailed information about each port, including its ID, name, location, network settings, connection node address, HTTP and SOCKS port numbers, and traffic usage statistics.
Renewing a Port
This endpoint allows you to renew a port by its ID.
Method: POST
Endpoint: https://astroproxy.com/api/v1/ports/{id}/renew
Request parameters:
- token – API token.
- id – port identifier.
Request body parameters:
- volume – traffic volume.
Successful response example:
{
"status": "string",
"data": {
"id": "integer",
"name": "string",
"country": "string",
"city": "string",
"network": "string",
"operator": "string",
"node": {
"ip": "string",
"address": "string"
},
"ports": {
"http": "integer",
"socks": "integer"
},
"traffic": {
"total": "integer",
"used": "integer",
"left": "integer"
},
"vpn": "string"
}
}
Requesting a New External IP Address
This endpoint allows you to obtain a new external IP address for a specified port.
Method: GET
Endpoint: https://astroproxy.com/api/v1/ports/{id}/newip
Request parameters:
- token – API token.
- id – client port identifier.
Successful response example (HTTP 200):
{
"status": "string",
"data": {
"ip": "string"
}
}
Response example (HTTP 423):
{
"status": "string",
"data": {
"message": "string"
}
}
Retrieving the List of Available Countries
This endpoint allows you to retrieve a list of countries available for a specific network type.
Method: GET
Endpoint: https://astroproxy.com/api/v1/countries
Request parameters:
- token – API token.
- network – network type.
Successful response example:
{
"status": "string",
"data": {
"name": "string"
}
}
Retrieving the List of Available Cities
This endpoint allows you to retrieve a list of cities for a selected country.
Method: GET
Endpoint: https://astroproxy.com/api/v1/cities
Request parameters:
- token – API token.
- country – country.
Successful response example:
{
"status": "string",
"data": {
"name": "string"
}
}
Retrieving the List of Available Operators
This endpoint allows you to retrieve a list of operators for a specified country, city, and network type.
Method: GET
Endpoint: https://astroproxy.com/api/v1/operators
Request parameters:
- token – API token.
- country – country.
- city – city.
- network – network type.
Successful response example:
{
"status": "string",
"data": {
"name": "string"
}
}
Retrieving a Structured List of Countries, Cities, and Operators
This endpoint allows you to retrieve a structured list of countries, cities, and operators.
Method: GET
Endpoint: https://astroproxy.com/api/v1/lists
Request parameters:
- token – API token.
Successful response example:
{
"status": "string",
"data": {
"countries": {
"name": "string",
"code": "string",
"cities": {
"name": "string",
"operators": {
"name": "string"
}
}
}
}
}
Calculating Port Cost
This endpoint allows you to calculate the cost of a port based on the specified configuration.
Method: POST
Endpoint: https://astroproxy.com/api/v1/calculate
Request body parameters:
- name – port name.
- network – network type.
- country – country.
- city – city.
- rotation_by – rotation type (time, link, request).
- rotation_time_type – rotation period type (hours, minutes).
- rotation_time – rotation interval.
- is_unlimited – unlimited traffic flag.
- volume – traffic volume.
- username – username for authentication.
- password – password for authentication.
- ip – list of allowed IP addresses.
Successful response example:
{
"status": "string",
"data": {
"cost": "number",
"currency": "string"
}
}
Conclusion
The Astro API enables you to automate key service operations, including port management, balance monitoring, IP rotation, and access to location data. Your API key can be found in the API Settings section of your dashboard.
All requests to the Astro API must be made over HTTPS. For each endpoint, the dashboard provides PHP examples as well as a built-in tool for sending test requests and viewing responses directly from your account.
If you have any questions or need assistance with integration, feel free to contact our support team.
Related questions
-
An API (Application Programming Interface) enables different applications and services to communicate and exchange data automatically. The Astro API allows you to automate port management, balance retrieval, IP rotation, and other service operations.
-
An API token / API key is a unique authentication key used to authorize requests and securely access your account.
-
Your API key is available in the Astro dashboard under the API settings section.
-
The Astro API supports common HTTP methods such as GET, POST, PATCH, and DELETE.
-
Yes. The Astro dashboard includes request examples and a built-in tool for testing API calls.
-
Yes. All Astro API requests are made over secure HTTPS connections to protect data in transit.


