Skip to main content

Quick Start

Make your first geolocation request in under 2 minutes.

1. Create an Account

Sign up for a free account at boxesnlines.com/register. The Starter plan includes 10,000 free requests per month.

2. Generate an API Key

After signing in, go to your API Keys dashboard and create a new API key. Your key will look like:

bnl_abc123_yourSecretKeyHere
warning

Save your API key immediately after creation. The full API key is only shown once.

3. Make Your First Request

Using cURL

curl "https://api.boxesnlines.com/geo/country/fromGps/40.7128,-74.0060" \
-H "X-API-Key: YOUR_API_KEY"

Using JavaScript

const response = await fetch(
"https://api.boxesnlines.com/geo/country/fromGps/40.7128,-74.0060",
{
headers: {
"X-API-Key": "YOUR_API_KEY"
}
}
);

const countryCode = await response.text();
console.log(countryCode); // "USA"

Using Python

import requests

response = requests.get(
"https://api.boxesnlines.com/geo/country/fromGps/40.7128,-74.0060",
headers={"X-API-Key": "YOUR_API_KEY"}
)

print(response.text) # "USA"

4. Understand the Response

The country lookup endpoint returns an ISO 3166-1 alpha-3 country code:

CoordinatesResponseLocation
40.7128, -74.0060USANew York, USA
51.5074, -0.1278GBRLondon, UK
35.6762, 139.6503JPNTokyo, Japan
-22.9068, -43.1729BRARio de Janeiro, Brazil

Next Steps