Brazil Municipal Gazettes API

Keyword search across the official gazettes of Brazilian cities, newest first: city and state, publication date, edition, links to the gazette PDF and text, and the passages that matched your words.

$0.50 per 1,000 records

You pay only for the records you get. Zero records cost zero. 10,000 free records of this API to start (5,000 at the base price of $1 per 1,000), no card.

Try it
Ready-made, maintained by usRecords, 11 fieldsv1.0

Data from queridodiario.ok.org.br/api

Get this data

Try it here with a few records, download the sample, fill a Google Sheet, or call it from your own code.

Try it

Queryoptional
Words to find in the gazettes. Put a phrase in quotes, for example "pregao eletronico".
Example: licitacao
Municipality IDoptional
IBGE 7-digit city code to search only that city, for example 3550308 for São Paulo.
Example: 3550308
Sinceoptional
Only gazettes published on or after this day, as YYYY-MM-DD.
Example: 2026-11-01
Untiloptional
Only gazettes published on or before this day, as YYYY-MM-DD.

Run it on this page, or call it from your code with the endpoint in the developer section. A free key covers 10,000 records of this API, no card. Create a free key

For developers: the API and MCPThe endpoint, code in curl, JavaScript and Python, every input, and files for your tools
Endpoint
POSThttps://pullrow.dev/v1/apis/brazil-querido-diario-gazettes/run
  • Small runs answer in the same request; longer ones answer 202 with a run to poll.
  • fields returns only the fields you name. The examples send the ones picked on this page.
  • Idempotency-Key is optional. A retry with it is never charged twice.
  • You pay for records returned. Zero records cost zero.

Every run option, explained

Calling it needs a key
10,000 free records of this API to start. No card.
curl
curl -X POST "https://pullrow.dev/v1/apis/brazil-querido-diario-gazettes/run" \
  -H "Authorization: Bearer $PULLROW_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":{"query":"licitacao"},"max_items":50}'

Inputs

Send them as input in the request body. Leave one out to use its default.

querytext
Words to find in the gazettes. Put a phrase in quotes, for example "pregao eletronico".
example: licitacao
municipality_idtext
IBGE 7-digit city code to search only that city, for example 3550308 for São Paulo.
example: 3550308
sincetext
Only gazettes published on or after this day, as YYYY-MM-DD.
example: 2026-11-01
untiltext
Only gazettes published on or before this day, as YYYY-MM-DD.

What's in each record

11 fields: 8 here, 3 technical ones under Technical details.

Basics

  • Municipality

    City name.

    Example Araçatuba

  • Edition

    Edition number, when the city gives one.

    Example 1637

  • Extra edition

    Whether this is an extra edition.

    Example No

  • Excerpts

    Passages of the gazette that matched the words.

    Example ............................................................................ Secretaria Municipal de Administração 16…

Location

  • Two-letter state code

    Example SP

Dates

  • Date

    Publication date of the gazette.

    Example Dec 5, 2026

Technical detailsField names and types for developers, and the 3 fields hidden above

Hidden by default

These 3 fields come with each record too. They are internal codes, notes about how the record was read or a copy of what was searched for, so the lists above leave them out.

  • ID idId of the gazette file, taken from its address.
  • Territory ID territory_idIBGE 7-digit code of the city.
  • Collected scraped_atWhen the project collected the gazette (UTC).

Field names and types

The names your code reads in each record. "Filled" counts how many of the 3 sample records carry the field.

Field nameTypeShown on this page asFilled
idtextID (hidden)3 of 3
territory_idtextTerritory ID (hidden)3 of 3
municipalitytextMunicipality3 of 3
statetextTwo-letter state code3 of 3
datedateDate3 of 3
editiontextEdition3 of 3
is_extra_editionyes or noExtra edition3 of 3
urllinkLink3 of 3
text_urllinkText link3 of 3
scraped_atdate and timeCollected (hidden)3 of 3
excerptslistExcerpts3 of 3

How it reads the site

Runs on a reader we built and maintain by hand for this site.

Sample records

Sample records
RecordMunicipalityEditionExtra editionExcerptsTwo-letter state codeDateLinkText link
1Araçatuba1637No............................................................................ Secretaria Municipal de Administração 16 ........................................................................................................................... Licitações e Contratos 16…SPDec 5, 2026data.queridodiario.ok.org.br/3502804/2026-12-05/c582e41885704d0cb788139bf8a1f2c5b2987e0d.pdfdata.queridodiario.ok.org.br/3502804/2026-12-05/c582e41885704d0cb788139bf8a1f2c5b2987e0d.txt
2Salto2380Node Educação ........................................................................................................... EDITAL – PREGÃO ELETRÔNICO Nº 67/2026 PROCESSO ADMINISTRATIVO Nº 4125/2026 SISTEMA DE REGISTRO DE PREÇOS Encontra-se aberta licitação visando a convocação de…SPDec 5, 2026data.queridodiario.ok.org.br/3545209/2026-12-05/bf31cb7037335d77b97fab7a5bb9f957ff66fa3f.pdfdata.queridodiario.ok.org.br/3545209/2026-12-05/bf31cb7037335d77b97fab7a5bb9f957ff66fa3f.txt
3Mogi Guaçu1226Noa b i t a ç ã o d e Mo g i Guaçu - Proguaçu CNPJ 54.672.845/0001-52 Rua João Persinotti, 38 - Chácara Gonçalo Telefone: (19) 3861-1015 SUMÁRIO Poder Executivo 2 ............................................................................. Licitações e Contratos 2…SPDec 5, 2026data.queridodiario.ok.org.br/3530706/2026-12-05/bbbadc8933d49e63e0bf13396fcf97525dd37fbe.pdfdata.queridodiario.ok.org.br/3530706/2026-12-05/bbbadc8933d49e63e0bf13396fcf97525dd37fbe.txt

Sample records from the example output this API publishes. Email addresses and phone numbers in them are masked. Hover over a column name to see the field name your code reads.

Reliability

Counted from real runs. Our own health checks are left out. A run succeeded when it finished and the site neither blocked it nor broke it.

Incidents and repairs

How it is kept working What a repair can't do

A ready-made API, maintained by us. It is not part of the daily check or the automatic rebuild yet.

  • You pay only for records returned. A run that returns none costs nothing.
Known limits
  • A search returns at most 10,000 gazettes in total; narrow it with a city code or a date range to reach further.
  • Coverage depends on the city: only municipalities the Querido Diario project collects are included, and some publish with a delay.
  • Excerpts are the passages around your words, in Portuguese, and can start or end mid-sentence. Gazette text is OCR-extracted and may contain errors.
  • Open Knowledge Brasil's Querido Diario project; credit it when you republish. Requests are kept to about two per second to stay polite.

Version history

A run uses the live version unless the request names another one with version.