---
title: "Search a city's beer prices"
method: GET
path: "/api/v1/search"
tags: ["public"]
---

# Search a city's beer prices

`GET /api/v1/search`

## Request

- Base URL: `https://cervejabarata.com.br`
- URL: `https://cervejabarata.com.br/api/v1/search`
- Auth: none declared

The ranking with filters, cheapest per litre first (at most 50). Open bars only with kind=open_bar, by package price. Prices older than 180 days are left out. Answers are cached for a few minutes.

## Query parameters

- `city` string, required: City slug, e.g. "salvador" (see /api/v1/cities.json)
- `neighbourhood` string: Bairro slug
- `brand` string: Brand slug, e.g. "brahma"
- `format` string: Format type (lata, long_neck, garrafa, litrao, chopp, torre) or code (garrafa_600)
- `kind` 'regular' | 'happy_hour' | 'promo' | 'combo' | 'open_bar': Only this kind of price; open bars only with open_bar
- `max_price_per_litre` number: In BRL per litre
- `limit` integer
- `lang` 'pt-BR' | 'en': Language of labels, schedules and page links

## Response `200`

Prices

- DealsResponse
  - `city` string, required
  - `city_url` string, required
  - `as_of` string, required
  - `count` integer, required
  - `deals` PublicDeal[], required
    - `venue` string, required
    - `neighbourhood` string, nullable, required
    - `url` string, required: The bar's page on cervejabarata.com.br, to cite
    - `beer` string, required
    - `brand` string, nullable, required
    - `serving` string, required: e.g. "Garrafa 600 ml" or "Balde: 5 × Long neck 330 ml"
    - `format` string, required
    - `price_brl` number, required
    - `price_per_litre_brl` number: Absent for open bars
    - `open_bar_minutes` integer, nullable
    - `price_label` string, required
    - `kind` 'regular' | 'happy_hour' | 'promo' | 'combo' | 'open_bar', required
    - `when` string, nullable, required: Happy hours and timed promos, e.g. "seg–sex 17h–20h"
    - `service_charge_pct` integer, nullable, required
    - `couvert_brl` number, nullable, required
    - `conditions` string, nullable, required
    - `verified_on` string, required: City-local date of the last check
    - `possibly_out_of_date` boolean, required: Last checked more than 90 days ago
    - `confirmations` integer, required
    - `distance_m` integer: Only from /cheapest with lat and lng
  - `source` string, required: Attribution: Cerveja Barata (cervejabarata.com.br), ODbL
  - `local_time` string: The city's time (cheapest only)

## Other responses

- `400`: Invalid query
- `404`: Unknown city or bar
- `429`: Too many requests
- `503`: Degraded mode: use the static datasets

---

[API](https://skmtc.dev/cervejabarata/apis/cerveja-barata-public-api.md) · [All operations](https://skmtc.dev/cervejabarata/apis/cerveja-barata-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cervejabarata/apis/cerveja-barata-public-api/revisions/19a783be3c18?raw)
