Search
Deduce
Identify venues from social media posts.
People often describe places rather than name them: "that tiny pasta place in Borough Market", or a caption full of hashtags. GET /v1/find/deduce reads text like this and returns the venues it thinks are mentioned.
GET https://api.inbe.us/v1/find/deduce?text={text}| Parameter | Type | Required | Description |
|---|---|---|---|
| text | string | Yes | The free text to analyse. URL-encode it. Only the first 1,000 characters are used. |
Example
curl -G "https://api.inbe.us/v1/find/deduce" \
--data-urlencode "text=finally tried padella!! queue was worth it #boroughmarket #pasta #london" \
-H "API-Key: $INBE_API_KEY"{
"restaurant": [
{
"name": "Padella",
"location": "Borough Market, London",
"additional_information": "Fresh pasta restaurant known for long queues."
}
]
}| Field | Description |
|---|---|
| restaurant[].name | The venue name the model identified. |
| restaurant[].location | Where the model thinks the venue is, as free text. |
| restaurant[].additional_information | Any other useful context the model picked up. |
restaurant can contain several candidates, or none if nothing was found.
Resolving candidates to InBe venues
Deduce returns names, not InBe venue IDs. To get a venue you can pass to the Detail endpoints, look each candidate up with find:
const deduced = await inbe(
`/v1/find/deduce?text=${encodeURIComponent(caption)}`,
);
for (const candidate of deduced.restaurant) {
const params = new URLSearchParams({
name: candidate.name,
locationName: candidate.location,
maxDistanceMeters: "1000",
});
const { establishments } = await inbe(`/v1/find?${params}`);
// establishments[0]?.id → /v1/establishments/basic/{id}
}inbe() is the helper from Authentication & errors.
Things to know
- Results are suggestions. They come from a language model and can be wrong or incomplete. Confirm with the user before you act on them.
- Expect higher latency than other endpoints, typically a few seconds. Set a generous client timeout.
- More context helps. Place names, neighbourhoods, cuisines and hashtags all improve the results.
- If
textis missing, the API returns400.
API reference
Authorization
ApiKeyAuth API-Key<token>
Your public (pk_…) or secret (sk_…) API key from the dashboard access page.
In: header
Query Parameters
text*string
Free text describing one or more venues. URL-encode the value.
Length
length <= 1000Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/find/deduce?text=best+pasta+in+soho%2C+padella%2C+borough+market"{ "restaurant": [ { "name": "string", "location": "string", "additional_information": "string" } ]}{ "error": "you submitted an incorrectly formatted request. please refer to our documentation and double check that the request body is formatted correctly. docs: https://www.inbe.us/docs/api/search"}{ "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"}