Quick Start
Make your first InBe API request in under a minute, and see what comes back.
InBe lets you build user-centric place features, like "find somewhere good for both of us", with a single API call. This page takes you from zero to your first response.
Get your API key
- 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 two keys:
| Key | Prefix | Use it from |
|---|---|---|
| Secret key | sk_ | Your servers only. Never ship it to a browser or app. |
| Public key | pk_ | Browsers and mobile apps. |
Every request sends the key in the API-Key header. See Authentication for the details.
Make your first call
Find vegan-friendly places, open right now, that are good for a date and sit between two people in central London:
curl -X POST "https://api.inbe.us/v1/search" \
-H "Content-Type: application/json" \
-H "API-Key: $INBE_API_KEY" \
-d '{
"locations": [
{ "lat": 51.5072, "lon": -0.1276 },
{ "lat": 51.5154, "lon": -0.1419 }
],
"mode": { "mode": "POINT", "maxDistance": 750 },
"preferences": {
"goodFor": ["date"],
"catersFilters": ["vegan"],
"openingConditions": { "state": "OPEN" }
}
}'const response = await fetch("https://api.inbe.us/v1/search", {
method: "POST",
headers: {
"Content-Type": "application/json",
"API-Key": process.env.INBE_API_KEY!,
},
body: JSON.stringify({
locations: [
{ lat: 51.5072, lon: -0.1276 },
{ lat: 51.5154, lon: -0.1419 },
],
mode: { mode: "POINT", maxDistance: 750 },
preferences: {
goodFor: ["date"],
catersFilters: ["vegan"],
openingConditions: { state: "OPEN" },
},
}),
});
if (!response.ok) throw new Error(await response.text());
const data = await response.json();
console.log(data.establishments.map((e) => e.displayName));import os
import requests
response = requests.post(
"https://api.inbe.us/v1/search",
headers={"API-Key": os.environ["INBE_API_KEY"]},
json={
"locations": [
{"lat": 51.5072, "lon": -0.1276},
{"lat": 51.5154, "lon": -0.1419},
],
"mode": {"mode": "POINT", "maxDistance": 750},
"preferences": {
"goodFor": ["date"],
"catersFilters": ["vegan"],
"openingConditions": {"state": "OPEN"},
},
},
timeout=10,
)
response.raise_for_status()
for venue in response.json()["establishments"]:
print(venue["displayName"], round(venue.get("distanceMeters", 0)), "m")package main
import (
"fmt"
"io"
"net/http"
"os"
"strings"
)
func main() {
body := `{
"locations": [
{ "lat": 51.5072, "lon": -0.1276 },
{ "lat": 51.5154, "lon": -0.1419 }
],
"mode": { "mode": "POINT", "maxDistance": 750 },
"preferences": {
"goodFor": ["date"],
"catersFilters": ["vegan"],
"openingConditions": { "state": "OPEN" }
}
}`
req, _ := http.NewRequest(http.MethodPost, "https://api.inbe.us/v1/search", strings.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("API-Key", os.Getenv("INBE_API_KEY"))
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(resp.StatusCode, string(out))
}Read the response
You get a ranked list of venues, plus details of the search that was run. The response below is shortened to a single venue.
{
"centerPoint": { "lat": 51.5113, "lon": -0.13475 },
"radius": 750,
"totalFound": 38,
"page": 0,
"establishments": [
{
"id": "0b6f4f3e-5d0c-4a52-9d57-1e1f0d1a2b3c",
"name": "THE LEAKY CAULDRON LIMITED",
"displayName": "The Leaky Cauldron",
"formattedAddress": "1 Charing Cross Road, London, WC2H 0DA",
"location": { "type": "Point", "coordinates": [51.5115, -0.1281] },
"websiteUri": "https://www.example.com",
"contactEmail": "hello@example.com",
"contactNumber": "020 7946 0000",
"description": "A candle-lit wine bar with small plates and a vegan tasting menu.",
"primaryGenre": "Wine Bar",
"additionalGenres": ["Romantic", "Cozy"],
"wordOnTheStreet": "Locals rate the natural wine list and the quiet back room.",
"isOpen": true,
"isChain": false,
"regularOpeningHours": [
{ "weekday": "Sun", "openingTimes": [] },
{
"weekday": "Mon",
"openingTimes": [{ "openTime": "17:00", "closeTime": "23:00" }]
}
],
"mainImageUrl": "https://cdn.example.com/venues/leaky-cauldron.jpg",
"logo": "",
"establishmentFlags": ["good_for_date", "serves_wine", "serves_dinner"],
"catersFlags": ["vegan", "vegetarian"],
"distanceMeters": 482.6,
"matchScore": 4
}
]
}establishmentsare sorted best match first.- Use
idwith the Detail endpoints to get photos, ratings, booking links and menus. totalFoundandpagelet you paginate.