API Documentation
Everything you need to integrate global location and banking data into your applications — one API, unlimited potential.
curl -H "x-api-key: <token>" https://api.trebtaai.com/v1/continentshttps://api.trebtaai.com/v1Location API
Auth RequiredGeographic Hierarchy
Access the full global geographic hierarchy — from continents down to individual cities — through a consistent, filterable REST interface.
| Method | Endpoint |
|---|---|
| GET | /continentsList all 7 continents |
| GET | /continents/:idGet a single continent by ID |
| GET | /countriesList all countries (filter by continent) |
| GET | /countries/:idGet a single country by ID |
| GET | /statesList all states (filter by country) |
| GET | /states/:idGet a single state by ID |
| GET | /citiesPaginated cities (filter by state) |
| GET | /cities/:idGet a single city by ID |
Banking API
Auth RequiredFinancial Institutions
Query a comprehensive database of 5,000+ banks — with SWIFT codes, country mappings, founding year, and full metadata.
| Method | Endpoint |
|---|---|
| GET | /banksPaginated bank list (filter by country) |
| GET | /banks/:idGet full details of a single bank |
Branch Network API
Auth RequiredBank Branch Locator
Locate 50,000+ bank branches worldwide — full address, phone, email, city mapping, and services offered.
| Method | Endpoint |
|---|---|
| GET | /branchesPaginated branches (filter by bank or city) |
| GET | /branches/:idGet full details of a single branch |
Authentication
X API KEY
Every endpoint requires a valid API KEY. Obtain one by registering and logging in — the X API KEY you can generate your self. One Key for all.
How to Authenticate
- 01Create a free accountRegister with email or OAuth (Google, GitHub, Facebook) — no credit card needed.
- 02Login to get your tokenPOST to /auth/login. The response contains your accessToken.
- 03Add the API Key headerInclude the api key on every API request as shown below.
- 04Make requests freelyNo rate limits, no usage caps — use the API as much as you need.
// Add to every request
x-api-key: <your_api_key>{
"success": true,
"data": [...],
"total": 195,
"page": 1,
"totalPages": 10
}{
"success": false,
"error": {
"code": 102,
"type": "invalid_access_key",
"info": "Your API key is invalid or inactive."
}
}Built for Developers
Everything you expect from a production-grade API
REST & JSON
Standard HTTP methods with clean, predictable JSON responses on every endpoint.
99.9% Uptime
Production-grade infrastructure with SLA-backed availability guarantees.
X API KEY Authentication
Stateless, secure API key authentication — no session management needed.
Pagination
Large datasets are paginated with page, pageSize, total, and totalPages in every response.
100% Free
No credit card, no rate limits, no paywalls. Free forever for all developers.
CORS Enabled
Call the API directly from browser clients and single-page apps without a proxy.
Ready to Start Building?
Create your free account in seconds and get instant access to all TREBTA AI APIs — no approval process, no waiting.