Welcome to MatrixAPI - your source for comprehensive, immutable reference data. Our APIs provide high-performance, cacheable data including vehicles, countries, geographic subdivisions, and more.
https://matrixapi.dev/api/v1/
# Get minimal vehicle data (perfect for dropdowns)
curl -H "X-API-Key: your_api_key_here" https://matrixapi.dev/api/v1/vehicles
# Get comprehensive vehicle data
curl -H "X-API-Key: your_api_key_here" https://matrixapi.dev/api/v1/vehicles?all=true
# Get specific vehicle models
curl -H "X-API-Key: your_api_key_here" https://matrixapi.dev/api/v1/vehicles/2025/bmw
MatrixAPI offers both free and premium endpoints with different authentication requirements.
π Geographic Data (Free): Countries, subdivisions, and cities - no authentication required.
π Vehicle Data (Premium): Requires API key in production. Free during development/testing.
For endpoints that require authentication, include your API key in the request header:
# Include API key in header
curl -H "X-API-Key: your_api_key_here" https://matrixapi.dev/api/v1/vehicles
# For JavaScript/fetch
fetch('https://matrixapi.dev/api/v1/vehicles', {
headers: {
'X-API-Key': 'your_api_key_here'
}
})
Getting an API Key: Contact us to request production access for vehicle data endpoints.
All MatrixAPI endpoints follow a consistent, developer-friendly pattern optimized for both dropdown/UI components and comprehensive data access.
Perfect for dropdowns, forms, and UI components
{
"vehicles": [
{
"name": "bmw",
"endpoint": "/api/v1/vehicles/2025/bmw"
}
],
"total": 99,
"statistics": {...}
}
Complete data with all available fields
{
"vehicles": [
{
"name": "bmw",
"full_name": "bmw, INC.",
"country": "UNITED STATES (USA)",
"vehicle_types": ["Passenger Car"],
"total_models": 15,
"endpoint": "/api/v1/vehicles/2025/bmw"
}
]
}
{
"[resource_name]": [...], // Main data array
"total": 249, // Count of items
"statistics": {...}, // Performance metrics
"available_[filters]": [...], // Available filter options
"cache_duration": "immutable", // Cache information
"examples": {...}, // Usage examples
"endpoints": {...}, // Related endpoints
"available_fields": [...], // Current response fields
"query_parameters": {...} // Parameter descriptions
}
β οΈ Authentication Required: Vehicle API endpoints require an API key in production. See authentication section for details.
/vehicles
All vehicle makes index
/vehicles/{make}
Current year models for make
/vehicles/{year}/{make}
Specific year models
country
- Filter by manufacturer country (e.g., 'UNITED STATES (USA)', 'GERMANY')type
- Filter by vehicle type (car, mpv, truck, motorcycle, all) - supports comma-separatedall
- Set to 'true' to include comprehensive data fields# Minimal data for dropdowns
curl -H "X-API-Key: your_api_key" https://matrixapi.dev/api/v1/vehicles
# Filter by country
curl -H "X-API-Key: your_api_key" https://matrixapi.dev/api/v1/vehicles?country=GERMANY
# Filter by vehicle types
curl -H "X-API-Key: your_api_key" https://matrixapi.dev/api/v1/vehicles?type=car,mpv,truck
# Comprehensive data
curl -H "X-API-Key: your_api_key" https://matrixapi.dev/api/v1/vehicles?all=true
# Specific vehicle models
curl -H "X-API-Key: your_api_key" https://matrixapi.dev/api/v1/vehicles/2025/bmw
Access countries, subdivisions, and cities with comprehensive geographic data. All endpoints support human-readable, case-insensitive names.
/countries
All countries index with filtering
/countries/{identifier}
Individual country details (supports names)
Countries API seamlessly connects to:
/countries/{country}/subdivisions
/countries/{country}/{subdivision}/cities
/countries/{country}/{subdivision}/{city}
region
- Filter by world region (e.g., 'Europe', 'Asia', 'Africa')subregion
- Filter by subregion (e.g., 'Northern Europe', 'Southern Asia')all
- Set to 'true' to include comprehensive data including subdivision infoname
- Country nameiso2
- Two-letter ISO codeendpoint
- Detail URLiso3
, region
, subregion
capital
, currency
, phone_code
subdivision_type
, total_subdivisions
subdivisions_endpoint
# Minimal countries for dropdowns
GET /api/v1/countries
# Filter by region
GET /api/v1/countries?region=Europe
# Individual country (human-readable)
GET /api/v1/countries/kosovo
# Get subdivisions for a country
GET /api/v1/countries/kosovo/subdivisions
# Get cities in a subdivision
GET /api/v1/countries/kosovo/ferizaj/cities
Access cities within specific subdivisions with coordinates and comprehensive data. All endpoints support human-readable, case-insensitive names.
/countries/{country}/{subdivision}/cities
All cities in a subdivision
/countries/{country}/{subdivision}/{city}
Specific city details
All parameters support case-insensitive, human-readable names:
/countries/kosovo/ferizaj/cities
(human-readable)/countries/XK/XUF/cities
(formal codes)/countries/Kosovo/Ferizaj/cities
(mixed case)all
- Set to 'true' to include comprehensive data with coordinatesid
- City IDname
- City namelatitude
- GPS latitudelongitude
- GPS longitude# Cities in Kosovo's Ferizaj district
GET /api/v1/countries/kosovo/ferizaj/cities
# Cities with coordinates (included by default)
GET /api/v1/countries/kosovo/ferizaj/cities
# Specific city details
GET /api/v1/countries/kosovo/ferizaj/shtime
{
"country": "Kosovo",
"subdivision": "Ferizaj",
"subdivision_code": "XUF",
"subdivision_type": "districts",
"cities": [
{
"id": 157206,
"name": "Ferizaj"
},
{
"id": 157207,
"name": "Shtime"
}
],
"total": 5,
"examples": {
"all_subdivisions": "/api/v1/countries/kosovo/subdivisions"
}
}
Access states, provinces, departments, and other administrative subdivisions with intelligent type detection.
/countries/{code}/subdivisions
Get subdivisions for a specific country
states
provinces
states
departments
prefectures
cantons
name
- Subdivision namecode
- Official code (e.g., "CA", "TX")type
- Subdivision typelatitude
, longitude
- Coordinates# US states (minimal for dropdowns)
GET /api/v1/countries/US/subdivisions
# Canadian provinces (coordinates included by default)
GET /api/v1/countries/CA/subdivisions
# German states
GET /api/v1/countries/DE/subdivisions
Access world regions and subregions for geographic organization and filtering.
/regions
World regions (7 continents)
/subregions
Subregions within continents
# All world regions
GET /api/v1/regions
# All subregions
GET /api/v1/subregions
MatrixAPI implements aggressive multi-layer caching for exceptional performance worldwide.
Server-side Rails caching with Redis
Browser & CDN caching with ETags
Cache-Control: max-age=31556952, public
ETag: W/"2725d4a3b4575afe5a838dd205f326d7"
X-Runtime: 0.051136
See the API in action with live dynamic dropdowns for countries, subdivisions, cities, and vehicles.
Try Live DemoFeatures: Real-time API calls, performance monitoring, and intelligent subdivision filtering
// Get minimal data for dropdowns
const response = await fetch('https://matrixapi.dev/api/v1/countries');
const data = await response.json();
// Populate dropdown
data.countries.forEach(country => {
dropdown.innerHTML += `<option value="${country.iso2}">${country.name}</option>`;
});
// Data already includes all available fields by default
console.log(data.countries[0].currency); // Currency info included
console.log(data.countries[0].latitude); // Coordinates included
import requests
# Get vehicle data with filtering
response = requests.get('https://matrixapi.dev/api/v1/vehicles', params={
'country': 'GERMANY',
'type': 'car,mpv'
})
vehicles = response.json()
# Get specific vehicle models
bmw_response = requests.get('https://matrixapi.dev/api/v1/vehicles/2025/bmw')
bmw_models = bmw_response.json()
# Check cache headers
curl -I "https://matrixapi.dev/api/v1/countries/kosovo"
# Test response times (cache verification)
time curl -s "https://matrixapi.dev/api/v1/countries/kosovo" > /dev/null
# Get US states for dropdown
curl "https://matrixapi.dev/api/v1/countries/US/subdivisions" | jq '.subdivisions'