API Method /rest/a.pi/businesses/search

 
Choose a Category to see it's specific fields:

This function handles event search. It performs the requested search, returning the results as a JSON file.

Arguments

keyword string
Search the entire result set for events containing the specified keyword "keyword=Party". (optional)
lat & lngfloat
Common geocoordinate formats "lat=32.746682&lng=-117.162741" are required. To search by geocoordinate, the "radius" parameter is required. Also, if you search by geocoordinate the limit and sort arguments cannot be passed in. (optional)
category_filter string
Limit the results to category ID "category_filter=1,2,45,56". A list of categories may be specified separated by commas. See /rest/a.pi/business-categories/list for a list of categories and their IDs. (optional)
radius integer
If radius is set "radius=5" and the "latitude and longatude" parameters resolve to a specific geolocation, the search will be restricted to the specified radius. If the "latitude and longatude" parameters does not resolve to a specific location, this parameter is ignored. (optional)
kminteger
Set the radius parameter to search by kilometers "km=1". Defaults to search by miles. (optional)
srt string
You can sort alphabetically or numerically by a field name. "srt" must be defined as a JSON object "srt={dba_name : 1}" The value of the sort column should be "1" for ascending and "-1" for descending. (optional)
qry string
You can request parameters specific to a category, in the format qry={"PARAM1":1,"PARAM2":1} (optional)


Output Parameters

Output from this API will be in JSON format with the following attributes:

businesses array
An array of page_items businesses. Each business entry has the following structure:
datatable_entry_id integer
The unique ID for this Business.
url string
URL on this site to the business' detail page (optional)
dba_name string
The default name of the business.
name_override string
Override name based on category of business. If set, always use this field as display name of business.
prem_full_addressstring
The business street address.
prem_citystring
The business city.
prem_zipstring
The business postal code.
latsigned float
The business latitude.
lng signed float
The business longitude.