PlugTypes API
Free public REST API for electrical plug and outlet information worldwide
Free, Open & Ready to Use
We believe that access to basic electrical information should be easy and free for everyone. That's why we've built this API with simplicity in mind: no registration, no API keys, no rate limits hassle. Just make a request and get the data you need.
Whether you're building a travel app, an e-commerce platform, or just a fun side project, feel free to use our API. We're happy to help developers around the world create awesome things!
Quick Start
The PlugTypes API is free to use with no authentication required. All endpoints return JSON data.
https://api.plugtypes.com
curl https://api.plugtypes.com/plugs/g
Endpoints
GET /plugs/{code}
Get details for a specific plug type
code - Plug type letter (A-O)
curl https://api.plugtypes.com/plugs/g
GET /plugs/{code}/countries
Get all countries that use a specific plug type
code - Plug type letter (A-O)
curl https://api.plugtypes.com/plugs/c/countries
GET /countries
List all countries with electrical information
region - Filter by region (e.g., Europe, Asia)
curl https://api.plugtypes.com/countries
curl https://api.plugtypes.com/countries?region=Europe
GET /countries/{code}
Get detailed electrical information for a country
code - ISO 3166-1 alpha-2 code or slug
curl https://api.plugtypes.com/countries/es
curl https://api.plugtypes.com/countries/spain
GET /travel
Get adapter requirements for traveling between countries
from - Origin country code
to - Destination country code
curl "https://api.plugtypes.com/travel?from=us&to=es"
GET /search
Search for countries by name
q - Search query (min 2 characters)
curl "https://api.plugtypes.com/search?q=spain"
Response Format
All responses are JSON objects with the following structure:
{
"success": true,
"data": {
// Response data here
}
}
Error responses include an error message:
{
"success": false,
"error": "Error message description"
}
Usage Notes
- No authentication required - The API is completely free and open
- CORS enabled - Access from any domain via JavaScript
- UTF-8 encoding - Full international character support
- HTTP methods - Only GET requests are supported
- Rate limiting - Please be respectful with request frequency
Code Examples
JavaScript (Fetch)
fetch('https://api.plugtypes.com/countries/es')
.then(response => response.json())
.then(data => console.log(data));
Python
import requests
response = requests.get('https://api.plugtypes.com/countries/es')
data = response.json()
print(data)
PHP
$response = file_get_contents('https://api.plugtypes.com/countries/es');
$data = json_decode($response, true);
print_r($data);