Brazil Government Contracts Check - CNPJ Contract Scraper avatar

Brazil Government Contracts Check - CNPJ Contract Scraper

Pricing

from $10.00 / 1,000 per contract founds

Go to Apify Store
Brazil Government Contracts Check - CNPJ Contract Scraper

Brazil Government Contracts Check - CNPJ Contract Scraper

Check Brazilian companies by CNPJ for active and historical federal government contracts. Get contract values, dates, status, procurement method, contracting agencies and supplier details for KYB, compliance, due diligence and supplier screening via Batch or Standby API.

Pricing

from $10.00 / 1,000 per contract founds

Rating

0.0

(0)

Developer

BrasilDados.org

BrasilDados.org

Maintained by Community

Actor stats

1

Bookmarked

5

Total users

0

Monthly active users

7 hours ago

Last modified

Share

Check whether Brazilian companies have active or historical federal government contracts. Submit one CNPJ or a list and receive company identification, contract values, dates, status, procurement method, legal basis and complete contracting-agency details.

This Brazil government contracts API and CNPJ contract scraper is built for supplier screening, KYB, compliance, due diligence, procurement intelligence and B2B risk analysis. Data comes from auditable Brazilian public records.

🔎 What this Actor does

  • Searches federal government contracts by CNPJ
  • Accepts one or many CNPJs in the same cnpjs field
  • Accepts formatted and unformatted CNPJs
  • Removes duplicate CNPJs automatically
  • Returns active and historical contracts
  • Calculates totals, active-contract counts and date ranges
  • Exports results as JSON, CSV, Excel, XML and other Apify Dataset formats
  • Works as a regular Batch Actor and as a real-time Standby API

Each Dataset row represents one unique CNPJ. Because a company can have many contracts, its records are returned in contracts[].

💼 Common use cases

  • Supplier due diligence: identify prior relationships with Brazil's federal government
  • KYB and compliance: add public-contract history to company screening
  • Procurement intelligence: analyze agencies, values, dates and contract objects
  • B2B qualification: identify companies that already sell to government entities
  • Risk analysis: compare active and historical contractual exposure
  • Market research: map federal suppliers and procurement activity

📥 Input

Only cnpjs is required. The second parameter controls how deeply the Actor searches each company.

FieldRequiredDefaultDescription
cnpjsYesTwo sample CNPJsOne or many Brazilian CNPJs, with or without punctuation. Maximum 1,000 entries.
maxContractsPerCnpjNo50Maximum contracts returned for each unique CNPJ. Range: 1-500.
{
"cnpjs": ["33.000.167/0001-01", "02341470000144"],
"maxContractsPerCnpj": 50
}

Both formats below are accepted and normalized internally:

InputNormalized CNPJ
33.000.167/0001-0133000167000101
0234147000014402341470000144

📤 Output

The Actor creates one row per unique CNPJ. contracts[] contains one object for every contract delivered and charged.

SectionMain fields
Companycnpj, formattedCnpj, supplier record ID, legal/trade names, classification, supplier CNPJ, masked CPF and social registration
SummarycontractCount, activeContractCount, total initial/current values, earliest/latest signature dates
Contractpublic record ID, number, description, status, procurement method, legal basis and process number
Procurementprocurement number, process, object and partially masked responsible contact
Datessignature, publication and validity period
Valuesinitial and current contract values
Government entitiescomplete contracting and purchasing unit structures: ministry, linked entity, management unit, acronyms, codes, CNPJ and branch
Controlvalidation, pages fetched, truncation and query error

Complete output example

The example below contains every public field and matches the real response structure. Values are illustrative.

{
"cnpj": "33000167000101",
"formattedCnpj": "33.000.167/0001-01",
"validCnpj": true,
"found": true,
"company": {
"supplierRecordId": 5120293,
"legalName": "EMPRESA BRASILEIRA DE ENERGIA S.A.",
"tradeName": "ENERGIA BRASIL",
"classification": "LEGAL ENTITY",
"supplierCnpj": "33.000.167/0001-01",
"maskedSupplierCpf": null,
"socialRegistrationNumber": null
},
"statistics": {
"contractCount": 1,
"activeContractCount": 1,
"totalInitialValue": 1250000,
"totalCurrentValue": 1375000,
"earliestSignedAt": "2025-01-15",
"latestSignedAt": "2025-01-15"
},
"contracts": [
{
"contractRecordId": 4759147,
"reference": "bd-a1b2c3d4e5f6",
"contractNumber": "000012025",
"description": "Supply of equipment and specialized technical services",
"status": "Published",
"procurementMethod": "Electronic auction",
"legalBasis": "Law 14,133/2021",
"processNumber": "00000.000001/2025-10",
"signedAt": "2025-01-15",
"publishedAt": "2025-01-20",
"validityStartsAt": "2025-01-15",
"validityEndsAt": "2027-01-14",
"active": true,
"initialValue": 1250000,
"currentValue": 1375000,
"procurement": {
"number": "000012025",
"processNumber": "00000.000001/2025-10",
"description": "Procurement of equipment and specialized technical services",
"responsibleContact": "MARIA ******"
},
"contractingEntity": {
"ministry": "MINISTRY OF MANAGEMENT AND INNOVATION",
"ministryAcronym": "MGI",
"ministryCode": "00000",
"entity": "FEDERAL PUBLIC AGENCY",
"entityAcronym": "FPA",
"entityCode": "000000",
"entityCnpj": "00000000000100",
"managementUnit": "PROCUREMENT MANAGEMENT UNIT",
"managementUnitCode": "000001",
"governmentBranch": "Executive"
},
"purchasingEntity": {
"ministry": "MINISTRY OF MANAGEMENT AND INNOVATION",
"ministryAcronym": "MGI",
"ministryCode": "00000",
"entity": "FEDERAL PUBLIC AGENCY",
"entityAcronym": "FPA",
"entityCode": "000000",
"entityCnpj": "00000000000100",
"managementUnit": "PROCUREMENT MANAGEMENT UNIT",
"managementUnitCode": "000001",
"governmentBranch": "Executive"
}
}
],
"pagesFetched": 1,
"truncated": false,
"error": null
}

If the CNPJ is valid but no contract is found, found is false, contracts is empty and no result event is charged. Invalid CNPJs are returned with validCnpj: false and error: "Invalid CNPJ.".

💰 Pay per result

The Actor uses Pay Per Event with event contrato-encontrado. One event is charged for each contract actually returned inside contracts[].

  • 1 CNPJ with 8 returned contracts = 8 events
  • 2 CNPJs with 3 and 5 returned contracts = 8 events
  • Valid CNPJ with no contracts = no event
  • Invalid CNPJ = no event

The current event price is shown in the Actor's Pricing tab. If the user's spending limit is reached, contracts that were not charged are not delivered.

⚡ API access

Batch

curl -X POST "https://api.apify.com/v2/acts/brasildados~government-contracts-check/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
--compressed \
-d '{"cnpjs":["33.000.167/0001-01","02341470000144"],"maxContractsPerCnpj":50}'

Standby

curl -X POST "https://brasildados--government-contracts-check.apify.actor/check" \
-H "Authorization: Bearer YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
--compressed \
-d '{"cnpjs":["33.000.167/0001-01","02341470000144"],"maxContractsPerCnpj":50}'

Open the Endpoints tab to test the request in the API Playground. Its Example Value contains the same complete structure returned by the Actor.

🧭 Understanding the fields

  • active is derived from validityEndsAt compared with the execution date.
  • truncated: true means the configured maximum was reached; increase maxContractsPerCnpj for more history.
  • reference is an opaque stable identifier created for convenient downstream matching.
  • Contract values are returned as BRL numeric values as recorded in the public source.
  • Empty public-source fields are returned as empty strings or null, according to the schema.

FAQ

Does it accept CPF?

No. This Actor is intentionally CNPJ-only to keep the company-contract workflow simple and predictable.

Are the contracts active only?

No. The Actor returns active and historical records. Use contracts[].active to filter active contracts.

Can I send one CNPJ?

Yes. Use the same cnpjs array with one item: {"cnpjs":["33000167000101"]}.

Why can one result contain many contracts?

The Dataset is organized by company. A company can have many federal contracts, so they are preserved in contracts[] instead of duplicating company information across many rows.

How fresh are the results?

Queries are performed at execution time against current auditable public records. Availability and update timing depend on the public source.

Can I export to Excel?

Yes. Open the Dataset and choose XLSX, CSV, JSON, XML or another format supported by Apify.

The Actor processes public company and procurement records. You remain responsible for using the results for a lawful purpose and complying with applicable rules.