πŸš€ Proton VPN API

RESTful API for accessing Proton VPN Servers data with flexible filtering options.

πŸš€ Get Lifetime API πŸ”‘ Recovery Token πŸ“Š Premium Dashboard πŸ”” Offline Notifications πŸ“Š Compare Plans
← Back to Browser

πŸ“‹ Available Endpoints

GET Get All Countries

Retrieve all servers from all countries

GET /api.php?country=all
GET Filter by Country

Get servers from a specific country

GET /api.php?country=CH
GET Search by City

Search servers by city name

GET /api.php?city=zurich
GET Total Servers worldwide

Get the total servers worldwide

GET /api.php?total
GET Get total servers by City

Total number of servers by city

GET /api.php?city=zurich&total
GET Get total servers by country

Total number of servers by city country

GET /api.php?country=ch&total
GET Combined Query

Filter by country and search by city

GET /api.php?country=US&city=Seattle
GET Disable Internal IDs

Disable server internal IDs in response

GET /api.php?country=CH&include_id=0
GET Multiple Filters

Use all parameters together for advanced queries

GET /api.php?country=CH&city=zurich&include_id=1
GET Ip Lookup (πŸ’Ž Premium only)

Lookup by IP

GET /api.php?ip=185.159.158.141
GET List Free Servers

List Free Servers

/api.php?free=1
GET Filter By Load

Filter by Load

/api.php?max_load=30
GET Online Status

Online Status- Online/Offline

/api.php?status=online
GET Get Best Server

Get Best Server Less Load

/api.php?country=US&best=1
GET Combine Filters

Combine Search Filters

/api.php?country=CH&free=1&status=online

Diff Load Endpoint (πŸ’Ž Premium only)

GET Check the load changes

Check the load changes of any server hourly. | i.e CH-4

/api_diff.php?diff_load=CH-4

Response Format


{
    "server": "CH#4",
    "current_load": 76,
    "previous_load": 76,
    "diff": 0,
    "direction": "stable",
    "since": "2025-12-28T12:06:27+01:00"
}

Diff Load Last Days (πŸ’Ž Premium only)

GET Check the load changes across 7 days

Check the load changes of any server up to the pastβ€―7β€―days. | lastN

/api_diff.php?last1=CH-4

Response Format


{
    "server": "AF#1",
    "current_load": 12,
    "previous_load": 100,
    "diff": -88,
    "direction": "down",
    "since": "2025-12-28T13:38:40+01:00"
}

Server Locations (πŸ’Ž Premium only)

GET Get the cordinates of any server

Get server location | i.e CH-4

/api_location.php?server=CH-4

Response Format


{
    "server": "CH#4",
    "domain": "node-ch-42.protonvpn.net",
    "entry_country": "CH",
    "exit_country": "CH",
    "city": "Zurich",
    "lat": 47.37,
    "long": 8.54,
    "load": 74,
    "status": 1
}


Server IP (πŸ’Ž Premium only)

GET Check server ip

Check the server ip entry/exit | i.e CH-4

/api_ip.php?server=CH-4

Response Format


{
    "server": "CH#4",
    "domain": "node-ch-42.protonvpn.net",
    "entry_ips": [
        "62.169.136.14"
    ],
    "exit_ips": [
        "62.169.136.14"
    ]
} 
GET 🚫 Console Api

Don’t use this unless you’re auditioning for a β€˜What Not to Do’ tutorial.

/api_console.php

Response Format


{
    "console": [
        "🧬 core console initialized",
        "",
        "type one command to begin",
        "",
        "available starting points:",
        "  ls        browse system",
        "  man       learn commands",
        "",
        "hint: try any linux command"
        "example: api_console.php?ifconfig"
    ]
}                                                                                                                                                              


πŸ”§ Query Parameters

country
2-letter country code (e.g., US, GB, CH) or all for all countries - Filter by exit country
city
City name (e.g., zurich, Seattle) - Filter by city (case-insensitive)
include_id
0 or 1 (default: 0) - Include internal server IDs in response

πŸ“Š Response Format

JSON Response

Example Response
[
{
        "Name": "MX-FREE#9",
        "EntryCountry": "MX",
        "ExitCountry": "MX",
        "Domain": "node-mx-14.protonvpn.net",
        "Tier": 0,
        "Features": 0,
        "Region": null,
        "City": "Mexico City",
        "Score": 4.9964906267,
        "HostCountry": "US",
        "OrganizationID": null,
        "VPNGatewayID": null,
        "ID": "fyfXaZsd_XsDLRyiKYfXr2LH8_ABZcruQEqH__R1lo5_5ha_UI4KoynBghg3KfHeWnlldUEakqR26p3s1gI3HA==",
        "Location": {
            "Lat": 19.43,
            "Long": -99.13
        },
        "Servers": [
            {
                "EntryIP": "84.20.27.46",
                "ExitIP": "84.20.27.46",
                "Domain": "node-mx-14.protonvpn.net",
                "ID": "wpgaRPFis_8Jr7pQeIIsZ4DTcEvC0NHDJ7IQD3X424TcRROWf6aAgSOrzMHK3q_CcNXZQwP1RG-C1VkHsE4pBw==",
                "Label": "0",
                "X25519PublicKey": "0WUvkg7\/WEHLS2XzmJctvE\/cvbDA0vNFJkoqbHKqezw=",
                "Generation": 0,
                "Status": 1,
                "ServicesDown": 0,
                "ServicesDownReason": null
            },


]

πŸ’‘ Examples

Get all servers worldwide

curl "https://carlostkd.ch/proton/api.php?country=all" | jq

Get all US servers

curl "https://carlostkd.ch/proton/api.php?country=US" | jq

Search for servers in a city

curl "https://carlostkd.ch/proton/api.php?city=zurich" | jq

Filter by country and city with internal IDs

curl "https://carlostkd.ch/proton/api.php?country=CH&city=zurich&include_id=1" | jq

ℹ️ Response Codes

200
Success - Valid request and response returned
400
Bad Request - Invalid parameters
500
Server Error - servers not found or server issue