API Reference

Here we have the urls of the Beer Mapping API referenced and we have comments on the request parameters and comments on the types of responses you should expect when using these urls.

NOTE: the default return type for API queries is xml. If you want json returned instead, simply add &s=json to the end of any of these queries.

You can check out examples of code using the Beer Mapping API here.

Locquery Service

(May Return Multiple Locations.)
http://beermapping.com/webservice/locquery/API_KEY/piece

This service should be used to search for Locations by querying the location name. Partials will work.
This function will return multiple locations depending on the search query given.

This query can be made either with a location name or with a location id.
The location name could possibly return more than one location, but location id's are all unique so they will only return one location or none if that id is not being used.

	<bmp_locations>
		<location>
			<id>1000</id>
			<name>Piece Brewery and Pizzeria</name>
			<status>Brewpub</status>
			<reviewlink>https://beermapping.com/location/1000</reviewlink>
			<proxylink>http://beermapping.com/maps/proxymaps.php?locid=1000&amp;d=5</proxylink>
			<blogmap>http://beermapping.com/maps/blogproxy.php?locid=1000&amp;d=1&amp;type=norm</blogmap>
			<street>1927 West North Avenue</street>
			<city>Chicago</city>
			<state>IL</state>
			<zip>60622</zip>
			<country>United States</country>
			<phone>(773) 772-4422</phone>
			<url>piecechicago.com</url>
			<overall>78.888956666666</overall>
			<imagecount>9</imagecount>
		</location>
	</bmp_locations>
	

reviewlink: is the review page on beermapping.com
proxylink: is a map showing the location and all locations within a specific proximity. The default proximity of this map is 5 miles.
blogmap: is the url of a proximity map that is intended to be embedded in an iframe and it can be posted in a blog or site.


Loccity and Locstate Service

(May Return Multiple Locations.)
http://beermapping.com/webservice/loccity/API_KEY/lyons,co
http://beermapping.com/webservice/locstate/API_KEY/co

This service should be used to search for Locations when given a city or a city,state. Partials will work.
This function will return multiple locations depending on the search query given.

	<bmp_locations>
			<location>
			<id>972</id>
			<name>Oskar Blues Grill and Brewery</name>
			<status>Brewpub</status>
			<reviewlink>https://beermapping.com/location/972</reviewlink>
			<proxylink>http://beermapping.com/maps/proxymaps.php?locid=972&amp;d=5</proxylink>
			<blogmap>http://beermapping.com/maps/blogproxy.php?locid=972&amp;d=1&amp;type=norm</blogmap>
			<street>303 Main Street</street>
			<city>Lyons</city>
			<state>CO</state>
			<zip>80540</zip>
			<country>United States</country>
			<phone>(303) 823-6685</phone>
			<overall>90.5555</overall>
			<imagecount>13</imagecount>
			</location>
			</bmp_locations>		

reviewlink: is the review page on beermapping.com
proxylink: is a map showing the location and all locations within a specific proximity. The default proximity of this map is 5 miles.
blogmap: is the url of a proximity map that is intended to be embedded in an iframe and it can be posted in a blog or site.


Locmap Service

(Should Return One Unique Location.)
http://beermapping.com/webservice/locmap/API_KEY/ID

This service should be used to return coordinate and map information based on the location id given.
Location Id's are unique and should return only one location.

	<bmp_locations>
			<location>
			<name>21st Amendment Brewery Cafe</name>
			<status>Brewpub</status>
			<lat>37.782257</lat>
			<lng>-122.392395</lng>
			<map>pacific</map>
			<altmap>sanfran</altmap>
			</location>
			</bmp_locations>	

map: this will be the main map that this location will be found upon.
altmap: some locations (Breweries and Brewpubs) can be found on multiple maps. altmap is the second map where this location can be found.


Locscore Service

(Should Return One Unique Location.)
http://beermapping.com/webservice/locscore/API_KEY/ID

This service should be used to return score information based on the location id given.
Location Id's are unique and should return only one location.

		<bmp_locations>
			<location>
			<overall>80.500035</overall>
			<selection>4.2</selection>
			<service>3.875</service>
			<atmosphere>4</atmosphere>
			<food>4.3125</food>
			<reviewcount>10</reviewcount>
			<fbscore></fbscore>
			<fbcount></fbcount>
			</location>
			</bmp_locations>	
	

reviewcount This is the number of times this location has been reviewed by users
fbscore: facebook.com score from our Breweries I've Visited application. This is an averaged score from all visits. This is depreciated, but will still return if values are available.
fbcount: The number of facebook.com users who have logged a visit to this location. This is depreciated, but will still return if values are available.


Locimage Service

(May Return Multiple Image Objects.)
http://beermapping.com/webservice/locimage/API_KEY/ID

This service should be used to return image information based on the location id given.

 
		<bmp_locations>
				<location>
				<imageid>6380</imageid>
				<directurl>https://beermapping.com/maps/reviews/images.php?img=6380</directurl>
				<imageurl>https://s3.amazonaws.com/beermapping/locations/01_06_2017/6380_IMG_20170105_190126.jpg</imageurl>
				<width>0</width>
				<height>0</height>
				<thumburl>https://s3.amazonaws.com/beermapping/locations/01_06_2017/th_6380_IMG_20170105_190126.jpg</thumburl>
				<caption>They forgot to turn on the lights!</caption>
				<credit>beerinator</credit>
				<crediturl>https://beermapping.com/account/beerinator</crediturl>
				<imagedate>2017-01-06 01:06:04</imagedate>
				<score>0</score>
				</location>
				</bmp_locations>			
	

directurl: this is the link to the full sized image on beermapping.com.
imageurl: this is the direct image that can be included on your site.
thumburl: this is our generated thumbnail sized image for the full image that can be included on another site.
crediturl: this is the link to the beermapping.com user who uploaded the image originally.
imagedate: this is the date and time when the image was uploaded.