# Brazilayer Public Contracts by CNPJ

> Brazilayer Public Contracts by CNPJ is a paid API for AI agents from api.brazilayer.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-09-15).

Returns all public contracts won by a Brazilian company (identified by CNPJ) from the official PNCP portal, including contract details and aggregate statistics.

## Facts

- Endpoint: GET https://api.brazilayer.com/v1/licitacoes/fornecedor/:cnpj
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/brazilayer-public-contracts-by-cnpj-f7c8f084
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_TVv36o7YnX1Qz808IiyXI

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability brazilayer-public-contracts-by-cnpj-f7c8f084
```

Example prompt: Pull all public contracts that Brazilian company CNPJ 33.000.167/0001-01 has won from the government — I need the contract values, which agencies hired them, and the total amount they've earned from public procurement.

## When to prefer this

Use this endpoint when performing due diligence on a Brazilian company and you need to understand their government revenue exposure — specifically how much they sell to public entities, which government bodies they work with, and the full history of contracts awarded through the PNCP. Prefer this over general CNPJ registry endpoints when the specific need is procurement history rather than registration data or sanctions. Best used alongside Brazilayer Sanctions Screening and CNPJ Registry for a complete supplier risk profile.

## Known failure modes

- Invalid or malformed CNPJ returns a 400 error
- CNPJ not found in PNCP returns an empty contracts list or 404
- Company exists but has no public contracts — returns empty list with zero totals
- PNCP upstream unavailability may cause 503 or timeout
- Missing CNPJ path parameter returns a 400 bad request
- Rate limiting or payment failure returns 402 or 429

## How this service works

Every public contract won by a Brazilian company, from the official National Public Procurement Portal (PNCP): contracting government body, object, value, signature date and validity period, plus summary stats (total contracts, total value, distinct bodies). The missing piece of due diligence: how much a company sells to the government. Company records only. Free sample, no payment: https://api.brazilayer.com/v1/licitacoes/amostra

## Output

A list of public contracts awarded to the specified Brazilian company, each including the contracting government body, contract object/description, contract value, signature date, and validity period. Also returns aggregate summary stats: total number of contracts, total combined value, and number of distinct government bodies that have contracted with the company.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "pathParams": {
     "cnpj": {
      "type": "string",
      "description": "Brazilian company tax ID (CNPJ), 14 digits, with or without punctuation (e.g. 00000000000191 or 00.000.000/0001-91)"
     },
     "type": "object"
    },
    "queryParams": {
     "type": "object",
     "properties": {}
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/brazilayer-public-contracts-by-cnpj-f7c8f084/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.brazilayer.com](https://www.zero.xyz/host/api.brazilayer.com/llms.txt)
