rss feed Twitter Feed Facebook Fan Page
Sign In
 
 
Not Registered Yet? Register to have access to all content.

Did you miss your activation email?
Latest Reviews
Latest Drinks
Latest Beers Added

TheBeerSpot API Reference

This page lists how you can access TheBeerSpot API to reference our data and also publish infomation on behalf of the users.

All data is sent to TheBeerSpot API via POST which we will process and send you a reply in JSON format so you can parse and display the data however you'd like.

You can check out examples of code using TheBeerSpot API on our examples page.

Beer Services
Beer Search Service
 
Send a POST to the following URL
https://www.thebeerspot.com/api/search
This service should be used to search for beers by querying the beer name. Partials and apostrophes will work.
This function will return multiple beers depending on the search query given.
Here are the variables you can send
    "function" : "beer" // required
    "dev_key" : "DEV_API_KEY" // required - your dev api key
    "search_term" : "YOUR_SEARCH_TERM" // required - what to search on
    "limit" : "NUMBER_OF_RESULTS"  // optional - MAX = 50 results
    
Once received, validated and processed, a JSON array will be returned with the following information.
Multiple results will be enclosed in {}
    [{
        "beer_id":"12232",
        "beer":"KBS",
        "brewery_id":"418",
        "brewery":"Founders Brewing Company",
        "style":"American Double \/ Imperial Stout",
        "abv":"11.20",
        "beer_url":"http:\/\/www.thebeerspot.com\/beer\/info\/founders-brewing-company\/kbs"
    }]
    

Beer Information Service
 
Send a POST to the following URL
https://www.thebeerspot.com/api/info
This service should be used to get detailed information on a beer by supplying the unique ID for that beer.
This function returns beer information including review averages and an image location if available.
Here are the variables you can send
    "function" : "beer" // required
    "dev_key" : "DEV_API_KEY" // required - your dev api key
    "beer_id" : "BEER_ID" // required - the unique id for a beer
    
Once received, validated and processed, a JSON array will be returned with the following information.
    [{
        "beer_id":"4481",
        "beer_name":"Saint Lamvinus",
        "brewery_name":"Brasserie Cantillon",
        "brewery_id":"140",
        "style":"Lambic - Fruit",
        "abv":"5.00",
        "reviews":"6",
        "avg_score":"93.333333",
        "high_score":"100.00",
        "low_score":"88.00",
        "image":"http:\/\/www.thebeerspot.com\/beers\/4481.jpg"
    }]
    

Recently Consumed Beer Service
 
Send a POST to the following URL
https://www.thebeerspot.com/api/info
This service can be used to list what beers are currently being consumed via TheBeerSpot "What I'm Drinking Module"
Here are the variables you can send
    "function" : "drink" // required
    "dev_key" : "DEV_API_KEY" // required - your dev api key
    "limit" : "NUMBER_OF_RESULTS" // optional - MAX = 200 results
    
Once received, validated and processed, a JSON array will be returned with the following information.
Multiple results will be enclosed in {}
    [{
        "drink_id":"51111",
        "member_name":"Tip Top",
        "beer_name":"Risgoop",
        "beer_id":"24401",
        "style":"American Barleywine",
        "brewery_name":"Three Floyds Brewing LLC",
        "brewery_id":"975",
        "drink_date":"2012-09-03 11:21:35"
    }]
    

Drink a Beer User Action
 
Send a POST to the following URL
https://www.thebeerspot.com/api/update
This action can mark a beer as "consumed" to TheBeerSpot "What I'm Drinking Module" and also post on the users behalf in this thread on our forum (optional).
Here are the variables you can send
    "function" : "drink_beer" // required
    "dev_key" : "DEV_API_KEY" // required 
    "user_key" : "USER_API_KEY" // required - see note below on how to get this
    "beer_id" : "BEER_ID" // required
    "post_forum" : "on" // optional - default = on. also post to the thread mentioned above
    "comment" : "COMMENT" // optional - if post_forum is on, this will post a comment also.
    "test_mode" : "on" // optional - default = off. 
    
Once received, validated and processed, a JSON message will return the following information.
    {
        "status":100
        "messsage":"Success!"
    }
    
If you have test mode on and post the correct information, you will recieve the following JSON validation.
No data will be saved to the DB when test_mode = on
    {
        "status":100
        "messsage":"Test Mode Success!"
    }
    
*** You can have the user see what their unique User API Key is by going to http://www.thebeerspot.com/api/me while they are logged into TheBeerSpot.com

Brewery Services
Brewery Search Service
 
Send a POST to the following URL
https://www.thebeerspot.com/api/search
This service should be used to search for Locations by querying the location name. Partials and apostrophes will work.
This function will return multiple locations depending on the search query given.
Here are the variables you can send
    "function" : "place" // required
    "dev_key" : "DEV_API_KEY" // required - your dev api key
    "search_term" : "YOUR_SEARCH_TERM" // required - what to search on
    "limit" : "NUMBER_OF_RESULTS"  // optional - MAX = 50 results
    
Once received, validated and processed, a JSON array will be returned with the following information.
Multiple results will be enclosed in {}
    [{
        "brewery_id":"418",
        "name":"Founders Brewing Company",
        "brewery_url":"http:\/\/www.thebeerspot.com\/beer\/brewery\/founders-brewing-company",
        "street":"235 Grandville Ave SW",
        "city":"Grand Rapids",
        "state":"MI",
        "zip":"49503",
        "country":"USA",
        "phone":" (616) 776-1195",
        "web":"foundersbrewing.com",
        "facebook":"http:\/\/www.facebook.com\/foundersbrewingofficial",
        "twitter":"http:\/\/twitter.com\/foundersbrewing"
    }]
    

Brewery Information Service
 
Send a POST to the following URL
https://www.thebeerspot.com/api/info
This service should be used to get detailed information on a brewery by supplying the brewery unique ID.
Here are the variables you can send
    "function" : "brewery" // required
    "dev_key" : "DEV_API_KEY" // required - your dev api key
    "brewery_id" : "BREWERY_ID" // required - the unique id for a brewery
    
Once received, validated and processed, two JSON arrays will be returned with the following information.
Multiple beer results will be enclosed in {}
    [{
        "brewery":"Bell's Brewery - Eccentric Cafe",
        "address":"355 E. Kalamazoo Ave.",
        "city":"Kalamazoo",
        "state":"MI",
        "zip":"49007",
        "country":"USA",
        "phone":"(269) 382-2332",
        "web":"bellsbeer.com",
        "facebook":"https:\/\/www.facebook.com\/BellsBreweryInc",
        "twitter":"http:\/\/twitter.com\/#!\/BellsBrewery"}
    }]
    

Brewery Beers Information Service
 
Send a POST to the following URL
https://www.thebeerspot.com/api/info
This service should be used to get detailed information on all beers for a brewery by supplying the brewery unique ID.
Here are the variables you can send
    "function" : "brewery" // required
    "dev_key" : "DEV_API_KEY" // required - your dev api key
    "brewery_id" : "BREWERY_ID" // required - the unique id for a brewery
    "limit" : "NUMBER_OF_RESULTS"  // optional - MAX = 50 results
    "start" : "RESULTS_START_KEY" // Optional - what beer to start returning results
    
Once received, validated and processed, two JSON arrays will be returned with the following information.
Multiple beer results will be enclosed in {}
    [{
        "beer_id":"12514",
        "beer":"Amber Ale",
        "brewery_id":"79",
        "brewery":"Bell's Brewery - Eccentric Cafe",
        "style":"American Amber \/ Red Ale",
        "abv":"",
        "beer_url":"http:\/\/www.thebeerspot.com\/beer\/info\/bells-brewery-inc\/amber-ale"
    },
    {
        "beer_id":"20604",
        "beer":"Batch 10,000",
        "brewery_id":"79",
        "brewery":"Bell's Brewery - Eccentric Cafe",
        "style":"American Strong Ale",
        "abv":"9.20",
        "beer_url":"http:\/\/www.thebeerspot.com\/beer\/info\/bells-brewery-inc\/batch-10-000"
    }]
    

Brewery Information Service (deprecated)
 
Send a POST to the following URL
https://www.thebeerspot.com/api/info
This service should be used to get detailed information on a brewery by supplying the brewery unique ID.
This function will also return all beers associated with a brewery.
Here are the variables you can send
    "function" : "place" // required
    "dev_key" : "DEV_API_KEY" // required - your dev api key
    "brewery_id" : "BREWERY_ID" // required - the unique id for a brewery
    
Once received, validated and processed, two JSON arrays will be returned with the following information.
Multiple beer results will be enclosed in {}
    [{
        "brewery":"Bell's Brewery - Eccentric Cafe",
        "address":"355 E. Kalamazoo Ave.",
        "city":"Kalamazoo",
        "state":"MI",
        "zip":"49007",
        "country":"USA",
        "phone":"(269) 382-2332",
        "web":"bellsbeer.com",
        "facebook":"https:\/\/www.facebook.com\/BellsBreweryInc",
        "twitter":"http:\/\/twitter.com\/#!\/BellsBrewery"}
    ]
    
    [{
        "beer_id":"12514",
        "beer":"Amber Ale",
        "brewery_id":"79",
        "brewery":"Bell's Brewery - Eccentric Cafe",
        "style":"American Amber \/ Red Ale",
        "abv":"",
        "beer_url":"http:\/\/www.thebeerspot.com\/beer\/info\/bells-brewery-inc\/amber-ale"
    },
    {
        "beer_id":"20604",
        "beer":"Batch 10,000",
        "brewery_id":"79",
        "brewery":"Bell's Brewery - Eccentric Cafe",
        "style":"American Strong Ale",
        "abv":"9.20",
        "beer_url":"http:\/\/www.thebeerspot.com\/beer\/info\/bells-brewery-inc\/batch-10-000"
    }]