Skip to content

Geocode Address

This function will take a search string, attempt to geocode it, and return coordinates. Search string can be as simple as a zip code or as complex as a free form address field.

Path

https://api.b-fonline.com/api/geocode

Method

POST

Required Parameters

  • search_string (string to be geocoded)

Responses

  • 200 OK
    1
    2
    3
    4
    5
    6
    {
      "lat": 38.25569280000001,
      "lng": -85.751283,
      "accuracy": "APPROXIMATE",
      "formatted_address": "Louisville, KY 40202, USA"
    }
    
  • 422 (Unprocessable Entity)
    • Error message in JSON response
  • 500
    • Something has gone horribly wrong, please let us know.

Code Examples

1
2
3
4
5
curl -X POST \
  https://api.b-fonline.com/api/geocode \
  -H 'cache-control: no-cache' \
  -H 'content-type: application/json' \
  -d '{"search_string": "40202"}'