Setup
Get your keys, store them safely, make an authenticated request and choose an integration pattern.
Create an account and get your keys
- If you have an account, open the access page in the dashboard.
- If you don't have an account yet, sign up first, then open the access page.
You get a secret key (sk_…) for servers and a public key (pk_…) for browsers and apps. See Authentication for what each can do.
Store the key outside your code
INBE_API_KEY=sk_your_secret_keyLoad it from the environment or your secret manager. Don't commit it to source control.
Make an authenticated request
Send the key in the API-Key header. This request looks up venues called "padella" near London Bridge:
curl "https://api.inbe.us/v1/find?name=padella&locationName=London%20Bridge&maxDistanceMeters=2000" \
-H "API-Key: $INBE_API_KEY"const params = new URLSearchParams({
name: "padella",
locationName: "London Bridge",
maxDistanceMeters: "2000",
});
const response = await fetch(`https://api.inbe.us/v1/find?${params}`, {
headers: { "API-Key": process.env.INBE_API_KEY! },
});
const data = await response.json();import os
import requests
response = requests.get(
"https://api.inbe.us/v1/find",
headers={"API-Key": os.environ["INBE_API_KEY"]},
params={"name": "padella", "locationName": "London Bridge", "maxDistanceMeters": 2000},
timeout=10,
)
print(response.json())q := url.Values{}
q.Set("name", "padella")
q.Set("locationName", "London Bridge")
q.Set("maxDistanceMeters", "2000")
req, _ := http.NewRequest(http.MethodGet, "https://api.inbe.us/v1/find?"+q.Encode(), nil)
req.Header.Set("API-Key", os.Getenv("INBE_API_KEY"))
resp, err := http.DefaultClient.Do(req)Choosing an integration pattern
If you're not sure, use a server proxy.
Server proxy (recommended)
Your app → your server → InBe API.
Your server holds the secret key, authenticates your own users, and forwards requests to InBe. You control who can search, can add your own rate limiting and caching, and the key never leaves your infrastructure.
app.post("/api/places/search", requireUser, async (req, res) => {
const response = await fetch("https://api.inbe.us/v1/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"API-Key": process.env.INBE_SECRET_KEY!, // sk_…
},
body: JSON.stringify(req.body),
});
res.status(response.status).json(await response.json());
});The trade-off is an extra network hop and a server to run.
Direct access with a public key
Your app → InBe API.
Your app embeds the public key and calls InBe directly. This is simpler and faster to build, and suits prototypes and smaller apps. The API supports CORS, so browsers can call it from any website and read the billing headers.
const response = await fetch("https://api.inbe.us/v1/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"API-Key": "pk_your_public_key",
},
body: JSON.stringify({
locations: [{ lat: 51.5072, lon: -0.1276 }],
mode: { mode: "POINT", maxDistance: 500 },
}),
});Public keys can be extracted
Anything shipped in an app or web page can be extracted, and requests made with your public key are billed to your account. Watch your usage, and if a key is misused, revoke it and create a new one on the access page.
Security checklist
- Keep secret keys on your servers, in environment variables or a secret manager.
- Never log full keys.
- Don't pass InBe error messages straight through to end users.
- Monitor usage in the dashboard and revoke any key you think is exposed.