Enterprise API v1

The Search API v1 is now deprecated. We strongly advise you to use the Search API v2. You may continue to use the Address Complete API v1 and Unit Complete API v1.

Search API v1

Request

Base Url
POST https://api.beans.ai/enterprise/v1/search/beans
Authentication
The Beans Search API uses a standard authorization header to authenticate client requests. You must sign in and create an enterprise account here to get your key before you access the API. If you use an unauthorized key or do not provide one, you will get a NOT_ALLOWED response.
Once you have your key and secret available, you are required to specify them in the Authorization header of all your requests, as below, where a2V5OnNlY3JldA== is the base64 encoding of the string "key:secret". For more information, see wiki:Basic access authentication

Authorization: Basic a2V5OnNlY3JldA==
Request Body
You must send the address and the unit that you are searching for as members of a JSON object in the body.
Request Object Type Required? Description
address String Yes Full street address (line 1, city, state zip).
unit String No Unit number of address (line 2).
Example Request
$ curl -X POST \
  'https://api.beans.ai/enterprise/v1/search/beans' \
  --data '{"address": "2255 Showers Dr, Mountain View, CA 94040", "unit": "352"}' \
  -H 'Authorization: Basic a2V5OnNlY3JldA==' \
  -H 'Content-Type: application/json'

Response

There may be some extra fields in the objects below that are not documented. We advise that your response parsers ignore such fields.

Example Search Response
{
  "unit": {
    "text": "352",
    "marker": {
      "latitude": 37.40689034284607,
      "longitude": -122.1081139235705
    },
    "floor": 3,
    "directEntry": false,
    "numberOfBuildings": 1,
    "numberOfApartments": 132,
    "gateCode": "",
    "accuracy": null
  },
  "stairs": [],
  "entrances": [
    {
      "text": "EN",
      "marker": {
        "latitude": 37.40763712181316,
        "longitude": -122.10813628668951
      },
      "floor": 0,
      "directEntry": false,
      "numberOfBuildings": 0,
      "numberOfApartments": 0,
      "gateCode": "",
      "accuracy": null
    }
  ],
  "elevators": [
    {
      "text": "EL",
      "marker": {
        "latitude": 37.407575433559444,
        "longitude": -122.10818204463993
      },
      "floor": 0,
      "directEntry": false,
      "numberOfBuildings": 0,
      "numberOfApartments": 0,
      "gateCode": "",
      "accuracy": null
    },
    {
      "text": "EL",
      "marker": {
        "latitude": 37.4071231819686,
        "longitude": -122.10837127454096
      },
      "floor": 0,
      "directEntry": false,
      "numberOfBuildings": 0,
      "numberOfApartments": 0,
      "gateCode": "",
      "accuracy": null
    }
  ],
  "parkings": [
    {
      "text": "P",
      "marker": {
        "latitude": 37.40767193796654,
        "longitude": -122.10810358918582
      },
      "floor": 0,
      "directEntry": false,
      "numberOfBuildings": 0,
      "numberOfApartments": 0,
      "gateCode": "",
      "accuracy": null
    },
    {
      "text": "P",
      "marker": {
        "latitude": 37.40767104948917,
        "longitude": -122.10810243791622
      },
      "floor": 0,
      "directEntry": false,
      "numberOfBuildings": 0,
      "numberOfApartments": 0,
      "gateCode": "",
      "accuracy": null
    },
    {
      "text": "P",
      "marker": {
        "latitude": 37.40672514649847,
        "longitude": -122.10823938009317
      },
      "floor": 0,
      "directEntry": false,
      "numberOfBuildings": 0,
      "numberOfApartments": 0,
      "gateCode": "",
      "accuracy": null
    }
  ],
  "societyGates": [],
  "searchExtraItems": [],
  "gmap": null,
  "polygon": {
    "points": [
      {
        "latitude": 37.407216109939625,
        "longitude": -122.10878561226696
      },
      {
        "latitude": 37.40678904474598,
        "longitude": -122.10809168220868
      },
      {
        "latitude": 37.407239237176,
        "longitude": -122.10758147238448
      },
      {
        "latitude": 37.40775021962394,
        "longitude": -122.10829399140448
      },
      {
        "latitude": 37.40729965291945,
        "longitude": -122.10875999999917
      },
      {
        "latitude": 37.40727432644777,
        "longitude": -122.1087256588803
      }
    ]
  },
  "uiData": {
    "mapCenter": {
      "latitude": 37.40689034284607,
      "longitude": -122.1081139235705
    },
    "content": "",
    "zoom": 0.0,
    "link": "https://www.beans.ai/maps/address/2255+Showers+Dr,+Mountain+View,+CA/352?share",
    "linkText": "2255 Showers Dr, Mountain View, CA - Unit 352",
    "replaceTextFields": true,
    "replacementAddress": "2255 Showers Dr, Mountain View, CA",
    "replacementApt": "352",
    "includeGMaps": false
  },
  "queryBuid": "KrbwjrxbzTFUmfhXU8VN4xiDAQzJk3mLhZbDQuAksxF4y9wc0tly3R5aq9Llt7USqMxiHJIJgpQmizsQgEIoB6zanbumSRWGcaE15oTYjdudXtJXkpGiEIiP9aj_sLYYtWbkWA"
}

Address Complete API v1

Request

Base Url
POST https://api.beans.ai/enterprise/v1/search/auto-complete
Authentication
The Beans Search API uses a standard authorization header to authenticate client requests. You must sign in and create an enterprise account here to get your key before you access the API. If you use an unauthorized key or do not provide one, you will get a NOT_ALLOWED response.
Once you have your key and secret available, you are required to specify them in the Authorization header of all your requests, as below, where a2V5OnNlY3JldA== is the base64 encoding of the string "key:secret". For more information, see wiki:Basic access authentication

Authorization: Basic a2V5OnNlY3JldA==
Request Body
You must send the prefix of the address and the current position as members of a JSON object in the body.
Request Object Type Required? Description
address String Yes Prefix of the street address.
center LatLng Object Yes Current position that helps bias address complete results.
searchRadius Double No The maximum radius to restrict address complete results.
LatLng Object
A latlng object specifies the coordinates of a given location.
LatLng Object Type Required? Description
latitude double Yes Latitude of the location to maximum precision.
longitude double Yes Longitude of the location to maximum precision.

Response

Response Object
The response for an address complete request is a list of beans, each representing a potential address for the given prefix.
Response Object Type Required? Description
beans Array No Address Complete Beans object
Address Complete Beans Object
Each address complete bean specifies one street address that matches the given prefix, along with some other attributes that may help ease further processing.
Address Complete Beans Object Type Required? Description
address String Yes Full street address (line 1, city, state zip).
society String No The name of the society or business, if known.
placeId String No A unique Id associated with the address.
found String No Boolean that specifies if the Beans Search API and Unit Complete is likely to result a positive hit.
Example Address Complete Response
{
  beans: [
    {
      address: "2255 Showers Dr, Mountain View, CA",
      society: "Parc Crossings"
      placeId: "2255 Showers Dr, 94040",
      found: true
    },
    {
      address: "2211 Beach Dr, Mountain View, CA",
      society: "Beach Condos"
      placeId: "2211 Beach Dr, 94043",
      found: true
    }
  ]
}

Unit Complete API v1

Request

Base Url
POST https://api.beans.ai/enterprise/v1/search/unit-complete
Authentication
The Beans Search API uses a standard authorization header to authenticate client requests. You must sign in and create an enterprise account here to get your key before you access the API. If you use an unauthorized key or do not provide one, you will get a NOT_ALLOWED response.
Once you have your key and secret available, you are required to specify them in the Authorization header of all your requests, as below, where a2V5OnNlY3JldA== is the base64 encoding of the string "key:secret". For more information, see wiki:Basic access authentication

Authorization: Basic a2V5OnNlY3JldA==
Request Body
You must send the address and the unit that you are searching for as members of a JSON object in the body.
Request Object Type Required? Description
address String Yes Full street address (line 1, city, state zip).
unit String Yes Prefix of the unit number.

Response

Response Object
The response for a unit complete request is a list of beans, each representing a potential unit for the given address.
Response Object Type Required? Description
beans Array No Unit Complete Beans object
Unit Complete Beans Object
Each unit complete bean has just one string value that is the textual descriptor of the unit.
Unit Complete Beans Object Type Required? Description
unit String Yes Textual descriptor of the unit.
Example Unit Complete Response
{
  beans: [
    {
      unit: "351"
    },
    {
      unit: "352"
    },
    {
      unit: "353"
    }
  ]
}