# Compras.gov.br Tender ID Decoder

> Compras.gov.br Tender ID Decoder is a paid API for AI agents from brdata.thomenz.me, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-13).

Offline decodes a Brazilian Compras.gov.br 17-digit tender ID into its structured components (UASG, modality, number, year) with the modality name in English.

## Facts

- Endpoint: GET https://brdata.thomenz.me/tender/decode/:id
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/compras-gov-br-tender-id-decoder-39b37234
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_JnSnKe05uum-uqOBhvXIS

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 compras-gov-br-tender-id-decoder-39b37234
```

Example prompt: Can you decode this Compras.gov.br tender ID for me — 98791305900292026 — and tell me the UASG, modality in English, tender number, and year?

## When to prefer this

Use this endpoint whenever you need to decompose a Compras.gov.br 17-digit tender identifier into its structural parts, especially when you need the procurement modality name in English. It is deterministic and instant with no dependency on upstream Brazilian government APIs, making it reliable for bulk parsing or offline-style workflows.

## Known failure modes

- ID is not exactly 17 digits — fails schema validation
- Non-numeric characters in the ID — rejected by pattern match
- Unknown modality code — modality name may be missing or generic
- Payment not provided or insufficient — 402 Payment Required

## How this service works

Offline decode of a Compras.gov.br 17-digit tender id (UASG + modality + number + year) into its parts, with the modality name in English. Deterministic, instant.

## Output

Returns the parsed components of the 17-digit Compras.gov.br tender ID: the 6-digit UASG (purchasing unit) code, the 2-digit modality code with its English name, the 5-digit tender number, and the 4-digit year — all derived deterministically offline with no external data fetch.

## 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": {
     "type": "object",
     "required": [
      "id"
     ],
     "properties": {
      "id": {
       "type": "string",
       "pattern": "^\\d{17}$",
       "examples": [
        "98791305900292026"
       ],
       "description": "Compras.gov.br 17-digit id: UASG(6)+modality(2)+number(5)+year(4)."
      }
     }
    },
    "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/compras-gov-br-tender-id-decoder-39b37234/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from brdata.thomenz.me](https://www.zero.xyz/host/brdata.thomenz.me/llms.txt)
