Open Brewery DB

Open Brewery DB

Food & Drink

Breweries, Cideries, and Craft Beer Bottle Shops

Visit API

📚 Documentation & Examples

Everything you need to integrate with Open Brewery DB

🚀 Quick Start Examples

Open Brewery DB Javascript Examplejavascript
// Open Brewery DB API Example
const response = await fetch('https://www.openbrewerydb.org', {
    method: 'GET',
    headers: {
        'Content-Type': 'application/json'
    }
});

const data = await response.json();
console.log(data);

OpenBreweryDB Public API Documentation

OpenBreweryDB is a public API that provides brewery information including the name, location, and type of brewery. This API is perfect for developers who are building beer-related applications.

API Endpoints

OpenBreweryDB provides several endpoints that allow you to retrieve information about breweries in various ways. These endpoints include:

  • /breweries: retrieves all the breweries in the database.
  • /breweries?by_city=city_name: retrieves all the breweries in the specified city.
  • /breweries?by_name=brewery_name: retrieves all breweries with the specified name.
  • /breweries/{id}: retrieves a brewery with a specific ID.

API Example in JavaScript

To use the OpenBreweryDB API in your JavaScript application, you need to send an HTTP request to the API. You can do this by using the fetch method.

Here's an example of how to retrieve all the breweries in the database:

const url = 'https://api.openbrewerydb.org/breweries';

fetch(url)
  .then(response => response.json())
  .then(data => {
    // Do something with the data
  });

Here's an example of how to retrieve breweries in a specific city:

const city = 'Los Angeles';
const url = `https://api.openbrewerydb.org/breweries?by_city=${city}`;

fetch(url)
  .then(response => response.json())
  .then(data => {
    // Do something with the data
  });

Here's an example of how to retrieve a specific brewery by ID:

const breweryId = 777;
const url = `https://api.openbrewerydb.org/breweries/${breweryId}`;

fetch(url)
  .then(response => response.json())
  .then(data => {
    // Do something with the data
  });

Conclusion

OpenBreweryDB API is a great resource for developers who are building beer-related applications. With the available endpoints, you can retrieve brewery information in various ways. If you're building an application that involves beer, OpenBreweryDB is a perfect API for you.

📊 30-Day Uptime History

Daily uptime tracking showing online vs offline minutes

Jul 3Jul 5Jul 7Jul 9Jul 11Jul 13Jul 15Jul 17Jul 19Jul 21Jul 23Jul 25Jul 27Jul 29Aug 104008001440Minutes
Online
Offline

Related APIs in Food & Drink