Ask
Search from a sentence your user typed.
People rarely think in filters. They say "somewhere cosy for a vegan date near Soho, open late, not too expensive". POST /v1/search/ask takes that sentence, reads it into search preferences, and returns venues straight away, along with how it read the text.
POST https://api.inbe.us/v1/search/ask| Field | Type | Required | Description |
|---|---|---|---|
| text | string | * | What the user typed, up to 400 characters. |
| interpretation | object | * | A reading returned earlier. With text, the text refines it. Without text, it is used as it is. |
| locations | array | No | The user's location, or the area they want, as in search. Send it whenever the text may not name a place. |
| mode | object | No | As in search. Defaults to POINT when you send locations. |
| preferences | object | No | As in search. Anything you send here wins over what is read from the text. |
* Send text, interpretation, or both. limit and offset work as in pagination.
Example
curl "https://api.inbe.us/v1/search/ask" \
-H "API-Key: $INBE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"text": "Somewhere cosy for a vegan date near Soho, open late, not too expensive"}'{
"interpretation": {
"places": ["Soho, London"],
"placeSize": "neighbourhood",
"partySize": 2,
"occasion": "date",
"timeWords": "open late",
"openAt": "2026-11-19T22:30",
"priceBand": "mid",
"mustCaters": ["vegan"],
"wantFlags": ["good_for_date"],
"wantVibes": ["cosy", "romantic", "intimate"],
"vibeText": "A cosy, intimate and romantic spot that is good for a date."
},
"notes": [],
"centerPoint": { "lat": 51.5136, "lon": -0.1365 },
"radius": 1500,
"totalFound": 8,
"page": 0,
"establishments": [
{
"id": "…",
"name": "Mortimer House Kitchen",
"distanceMeters": 839,
"match": {
"level": "partial",
"matched": [
"good for date",
"vegan",
"open Thu 22:30",
"about £30 a head"
],
"missed": ["cosy"]
}
}
]
}Each venue has every field a search result has, plus match.
Response
| Field | Description |
|---|---|
| interpretation | How the text was read. Show it to your user so they can see what was searched, and send it back to refine. |
| notes | Things to tell your user: the area was widened, nothing was open at the asked time, or a reminder to check allergies. |
| needsInput | Only present when nothing could be searched: the text names no place and you sent no locations. |
| establishments[] | Venues, best fit first. |
| match.level | full when the venue has everything asked for, otherwise partial. |
| match.matched | What the venue has of what was asked for, from its own data. |
| match.missed | What it lacks, or what we don't know about it ("price not known"). |
How the text is used
- Must lists (
mustCaters,mustAccessibility,mustFlags) and avoid lists (avoidGenres,avoidVibes) leave venues out. Dietary and access needs are always must-haves. - Want lists (
wantGenres,wantFlags,wantCaters,wantVibes) only rank venues higher, so close matches still appear when few venues have everything. - Venues are ranked by how well they fit the whole request: how close their description, menu and atmosphere are in meaning to what was asked, how many wanted genres, features and vibes they have, distance, and price.
matchScore(0 to 1) is that fit. - A time is used only when the text says when ("open late", "this Saturday", "right now"). "A brunch spot" ranks venues that serve brunch but doesn't ask for them to be open at a set time.
featuresare wishes no list covers ("real fire", "canal-side"). They count inmatchwhen a venue's description mentions them.- If few venues match close by, the search area doubles once. If none are open at the asked time, venues are shown regardless of hours. Each of these adds a note.
Refining a search
Send the interpretation you got back, with what your user said next:
{
"text": "somewhere cheaper",
"interpretation": {
"places": ["Soho, London"],
"mustCaters": ["vegan"],
"priceBand": "mid"
}
}The new text changes only what it mentions. To let users edit the reading themselves, for example by removing a chip, send the edited interpretation without text: no text is read and the search runs at once.
Things to know
- Send a location. If the text may not name a place, send the user's location in
locations. With no place and no location, nothing is searched andneedsInput.questionsays what's missing. - Allow about two seconds. Reading the text adds roughly a second to a search. Set a generous client timeout.
- Allergies. We know which venues offer, say, gluten-free dishes. We can't confirm how a kitchen handles allergens, so when the text mentions an allergy, a note says to check with the venue.
- Errors. Text over 400 characters, no
textand nointerpretation, or a place we can't find returns400.
API reference
Authorization
ApiKeyAuth Your public (pk_…) or secret (sk_…) API key from the dashboard access page.
In: header
Query Parameters
Number of results per page. Values above 100 are capped at 100.
1 <= value <= 10020Zero-based page number (not a row offset). Results skipped = offset × limit.
0 <= value0Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Send text, interpretation, or both. The fields of POST /v1/search (locations, mode, preferences) are optional here and win over the reading. mode defaults to POINT when you send locations.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/v1/search/ask" \ -H "Content-Type: application/json" \ -d '{ "text": "Somewhere cosy for a vegan date near Soho, open late, not too expensive" }'{ "interpretation": { "places": [ "Soho, London" ], "placeSize": "", "nearUser": true, "partySize": 0, "occasion": "first date", "timeWords": "open late", "openNow": true, "openAt": "2026-11-19T22:30", "maxPricePerHead": 0, "priceBand": "", "chains": "", "mustCaters": [ "alcohol_free" ], "mustAccessibility": [ "ENTRANCE" ], "mustFlags": [ "air_conditioned" ], "wantGenres": [ "Pub", "Wine Bar" ], "wantFlags": [ "air_conditioned" ], "wantCaters": [ "alcohol_free" ], "wantVibes": [ "calm" ], "avoidGenres": [ "string" ], "avoidVibes": [ "calm" ], "features": [ "real fire", "canal-side" ], "vibeText": "string", "allergyMentioned": true }, "needsInput": { "field": "location", "question": "Where should we look? Name a place in the text, or send the user's coordinates." }, "notes": [ "Few venues matched close by, so we looked further out (up to 3000 m)." ], "centerPoint": { "lat": 0, "lon": 0, "crs": 0 }, "radius": 0, "establishments": [ { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "name": "string", "displayName": "string", "formattedAddress": "string", "location": { "type": "Point", "coordinates": [ 0, 0 ] }, "websiteUri": "string", "contactEmail": "string", "contactNumber": "string", "description": "string", "primaryGenre": "string", "additionalGenres": [ "string" ], "wordOnTheStreet": "string", "isOpen": true, "isChain": true, "regularOpeningHours": [ { "weekday": "Sun", "openingTimes": [ { "openTime": "string", "closeTime": "string" } ] } ], "mainImageUrl": "string", "logo": "string", "establishmentFlags": [ "air_conditioned" ], "catersFlags": [ "alcohol_free" ], "vibes": [ "calm" ], "dressCode": { "level": "casual", "label": "Smart casual", "notes": "No sportswear, caps or flip-flops" }, "distanceMeters": 0, "memberFit": [ { "id": "string", "score": 0, "status": "match", "matched": [ "catersFilters:vegan", "goodFor:date" ], "unmet": [ "maxPricePerHead" ], "unknown": [ "openingConditions" ], "travel": { "distanceMeters": 0, "minutes": 0, "mode": "walk" } } ], "groupFit": { "score": 0, "worksForCount": 0, "memberCount": 0, "everyone": true, "worstTravelMinutes": 0 }, "match": { "level": "full", "matched": [ "vegan", "good for date", "open Thu 22:30", "about £30 a head" ], "missed": [ "cosy" ] }, "matchScore": 0 } ], "totalFound": 0, "page": 0}{ "error": "text can be at most 400 characters. docs: https://www.inbe.us/docs/api/search/ask"}{ "error": { "message": "Missing API key. Please include your API key in the API-Key header.", "type": "authentication_error", "code": "MISSING_API_KEY" }}{ "error": { "message": "You ran out of credit. Please top up!", "type": "billing_error", "code": "INSUFFICIENT_CREDIT" }}{ "error": { "message": "Rate limit exceeded. Too many requests per second.", "type": "rate_limit_error", "code": "SECOND_LIMIT_EXCEEDED", "limit": 5, "reset": "1s", "currentCount": 6, "retryAfterSeconds": 1 }}{ "error": "internal server fetching your data has occured. if the error persists please contact our support"}