InBetween
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}
ParameterTypeRequiredDescription
textstringYesThe 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"
200 OK
{
  "restaurant": [
    {
      "name": "Padella",
      "location": "Borough Market, London",
      "additional_information": "Fresh pasta restaurant known for long queues."
    }
  ]
}
FieldDescription
restaurant[].nameThe venue name the model identified.
restaurant[].locationWhere the model thinks the venue is, as free text.
restaurant[].additional_informationAny 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 text is missing, the API returns 400.

API reference

GET
/v1/find/deduce

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.

Lengthlength <= 1000

Response 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"}

On this page