Para desenvolvedores
Três caminhos, sem chave: arquivos estáticos com tudo, uma API ao vivo para perguntas e um servidor MCP para agentes de IA.
Arquivos estáticos
Cada publicação grava os dados completos em /api/v1/: JSON (os campos do banco, dinheiro em centavos, datas em unix) e CSV (reais, datas locais). CORS aberto, cache de 5 minutos, sem limite de uso. Para volume, comece por aqui.
/api/v1/index.json | todos os arquivos, por cidade, com contagens |
|---|---|
/api/v1/cities.json · /api/v1/catalog.json | cidades; marcas, cervejas e formatos |
/api/v1/salvador/deals.json (.csv) | preços publicados, com horários |
/api/v1/salvador/venues.json (.csv) | bares com preço; venues-all para todos os bares |
/api/v1/salvador/price-index.json (.csv) | o índice mensal |
/api/v1/salvador/neighbourhoods.geojson | limites dos bairros |
Página de dados abertos (downloads e citação)
API ao vivo
Para perguntas que os arquivos não respondem de forma barata: no máximo 50 preços por resposta, em cache por 10 a 15 minutos. Com o banco no limite, os endereços respondem 503 com Retry-After e apontam para os arquivos estáticos.
curl "https://cervejabarata.com.br/api/v1/search?city=salvador&brand=brahma&limit=5"
curl "https://cervejabarata.com.br/api/v1/cheapest?city=salvador&lat=-13.0109&lng=-38.4915&radius_m=1500"
curl "https://cervejabarata.com.br/api/v1/venues/12?lang=en"Documento OpenAPI (/api/v1/openapi.json)
Servidor MCP
Para agentes de IA (Claude, ChatGPT e outros que falam o Model Context Protocol): um servidor remoto por HTTP, sem sessão e sem login. Adicione este endereço como conector personalizado, ou na configuração do cliente:
https://cervejabarata.com.br/mcp
{
"mcpServers": {
"cerveja-barata": {
"type": "http",
"url": "https://cervejabarata.com.br/mcp"
}
}
}Ferramentas
price_per_litre: Convert a Brazilian beer price into reais per litre, the unit Cerveja Barata ranks by. Give the price paid in BRL, the volume of one unit in ml and how many units the price buys (e.g. 5 for a bucket of 5 long necks).search_deals: Beer prices in a city's bars, cheapest per litre first, each with the bar, the serving, the price, when it applies (happy hours) and when it was last checked. Filter by bairro, brand, format, kind or a maximum price per litre. Open bars only come with kind=open_bar, ranked by package price.cheapest_now: The cheapest beer prices on right now in the city's time zone, happy hours and timed promos included. Give lat and lng to keep bars within radius_m of a point (distance in metres comes back with each price).get_venue: A bar's details (kind, bairro, address, location, Instagram, opening hours, attributes) and every beer price it has, cheapest per litre first. The venue slug comes from search_deals or cheapest_now URLs.list_neighbourhoods: The city's bairros that have beer prices: how many bars and prices each has and its cheapest price per litre, most covered first. The slugs filter search_deals.price_index: The monthly Índice Cerveja Barata for a city: median, quartiles and minimum price per litre, for the whole city and by format, bairro and brand, with how many prices and bars each cell rests on. Latest month by default; final once the month is closed.catalog: The cities covered (with how many prices each has), the beer brands and the serving formats: the slugs the other tools take.
Uso justo e licença
Os dados são abertos sob a ODbL 1.0: cite “Cerveja Barata (cervejabarata.com.br)” e mantenha abertas as bases feitas com eles. Prefira os arquivos estáticos para volume, guarde seu próprio cache e conte pra gente o que você construiu: contato@cervejabarata.com.br