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) | lugares com preço; venues-all para todos os lugares |
/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, cheapest per litre first. Bars' prices, to drink there, come in deals; supermarkets' and depósitos' prices, to take away, come separately in shops (at most 5), never mixed with the bars'. Each price has the place and its category, the serving, the price, when it applies (happy hours) and when it was last checked. Filter by category (one kind only), neighbourhood, brand, format, kind or a maximum price per litre. Open-bar packages only come with kind=open_bar, ranked by package price.cheapest_now: The beer prices that hold right now in the city's time zone, cheapest per litre first, happy hours and timed promos included: bars' prices in deals, supermarkets' and depósitos' separately in shops. Give lat and lng to keep places within radius_m of a point (each price then carries distance_m). category=bar leaves the shops out.get_venue: Details of one bar, supermarket or depósito (kind, drink_on_site, bairro, address, location, Instagram, opening hours, attributes) and every beer price it has, each with its category, cheapest per litre first, open-bar packages last. The venue slug is the last part of the url on a price from search_deals or cheapest_now.list_neighbourhoods: The city's bairros (neighbourhoods) with beer prices: how many bars, shops and prices each has, and its cheapest price per litre at a bar and at a shop, kept apart, most bars first. Pass a slug as the neighbourhood argument of search_deals.price_index: The monthly Índice Cerveja Barata for a city: median, quartiles and minimum price per litre at bars, 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