Carriers API — 39+ Live Carriers Endpoint
Query metadata for 39+ live shipping carriers in production — USPS, UPS, FedEx, DHL, OnTrac and more. Don't see yours? Request and we add fast.
Overview
Retrieve list and metadata of 39+ carriers. Free API - does not count towards usage quota.
Example Request
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const carriers = await wp.getCarriers();
console.log(carriers); curl -X GET https://api.whereparcel.com/v2/carriers \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data); <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $headers = [ 'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY', 'Content-Type: application/json' ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests
url = 'https://api.whereparcel.com/v2/carriers'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} Replace the test API key with your actual API key from the dashboard.
Response
Success Response (200)
{
"success": true,
"data": [
"us.usps",
"us.fedex",
"us.ups",
"us.ontrac",
"ca.post",
"gb.fedex"
]
} Error Response (401)
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} Overview
Retrieve list of countries supported for parcel tracking. Free API - does not count towards usage quota.
Example Request
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const countries = await wp.getCountries();
console.log(countries); curl -X GET https://api.whereparcel.com/v2/countries \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/countries', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data); <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/countries'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $headers = [ 'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY', 'Content-Type: application/json' ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests
url = 'https://api.whereparcel.com/v2/countries'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/countries"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} Replace the test API key with your actual API key from the dashboard.
Response
Success Response (200)
{
"success": true,
"data": [
{
"code": "US",
"name": "United States"
},
{
"code": "CA",
"name": "Canada"
},
{
"code": "GB",
"name": "United Kingdom"
}
]
} Error Response (401)
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} Overview
Filter and retrieve carriers available in a specific country. Free API - does not count towards usage quota.
Example Request
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const carriers = await wp.getCarriersByCountry('us');
console.log(carriers); curl -X GET https://api.whereparcel.com/v2/carriers/us \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers/us', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data); <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers/us'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $headers = [ 'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY', 'Content-Type: application/json' ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests
url = 'https://api.whereparcel.com/v2/carriers/us'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers/us"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} Replace the test API key with your actual API key from the dashboard.
Path Parameters
countryCode string · required | <p>Country code (ISO 3166-1 alpha-2)</p>
us |
Response
Success Response (200)
{
"success": true,
"data": [
{
"code": "us.usps",
"name": "USPS (United States Postal Service)",
"serviceScope": "international"
},
{
"code": "us.fedex",
"name": "FedEx",
"serviceScope": "international"
},
{
"code": "us.ups",
"name": "UPS (United Parcel Service)",
"serviceScope": "international"
},
{
"code": "us.ontrac",
"name": "OnTrac",
"serviceScope": "national",
"region": "WEST"
},
{
"code": "us.ca.ontrac",
"name": "OnTrac (California)",
"serviceScope": "national",
"region": "CA"
}
]
} Error Response (401)
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} Error Response (404)
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "No carriers found for country: ZZ"
}
} Overview
Filter and retrieve carriers available in a specific region of a country. Useful for countries with large territories (e.g., USA, China) where some carriers operate only in specific regions. Not needed for countries where all carriers operate nationwide. Free API - does not count towards usage quota.
Example Request
// npm install whereparcel
import { WhereParcel } from 'whereparcel';
const wp = new WhereParcel('YOUR_API_KEY', 'YOUR_SECRET_KEY');
const carriers = await wp.getCarriersByRegion('us', 'ca');
console.log(carriers); curl -X GET https://api.whereparcel.com/v2/carriers/us/ca \ -H "Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY" \ -H "Content-Type: application/json"
const response = await fetch('https://api.whereparcel.com/v2/carriers/us/ca', {
method: 'GET',
headers: {
"Authorization": "Bearer YOUR_API_KEY:YOUR_SECRET_KEY",
"Content-Type": "application/json"
}
});
const data = await response.json();
console.log(data); <?php $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, 'https://api.whereparcel.com/v2/carriers/us/ca'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $headers = [ 'Authorization: Bearer YOUR_API_KEY:YOUR_SECRET_KEY', 'Content-Type: application/json' ]; curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); print_r($result);
import requests
url = 'https://api.whereparcel.com/v2/carriers/us/ca'
headers = {
'Authorization': 'Bearer YOUR_API_KEY:YOUR_SECRET_KEY',
'Content-Type': 'application/json'
}
response = requests.get(url, headers=headers)
result = response.json()
print(result) package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://api.whereparcel.com/v2/carriers/us/ca"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer YOUR_API_KEY:YOUR_SECRET_KEY")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
} Replace the test API key with your actual API key from the dashboard.
Path Parameters
countryCode string · required | <p>Country code (ISO 3166-1 alpha-2)</p>
us |
region string · required | <p>Region code (state, province, etc.)</p>
ca |
Response
Success Response (200)
{
"success": true,
"data": [
{
"code": "us.usps",
"name": "USPS (United States Postal Service)",
"serviceScope": "international"
},
{
"code": "us.fedex",
"name": "FedEx",
"serviceScope": "international"
},
{
"code": "us.ups",
"name": "UPS (United Parcel Service)",
"serviceScope": "international"
},
{
"code": "us.ca.ontrac",
"name": "OnTrac (California)",
"serviceScope": "national",
"region": "CA"
}
]
} Error Response (401)
{
"success": false,
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid or missing API key"
}
} Error Response (404)
{
"success": false,
"error": {
"code": "NOT_FOUND",
"message": "No carriers found for ZZ/CA"
}
}