AEC Tenders icon

AEC Tenders

Fetches public construction tenders from Brazil's PNCP

Overview

This node, named "AEC Tenders," fetches public construction tender data from Brazil's PNCP (National Public Procurement Portal). Specifically, the "List by Publication Date" operation retrieves tenders published within a user-defined date range. This is useful for users who want to monitor new or recent public construction tenders in Brazil based on their publication dates.

Common scenarios include:

  • Construction companies tracking new tender opportunities.
  • Consultants analyzing market trends in public infrastructure projects.
  • Government oversight bodies auditing tender publications over specific periods.

For example, a user can specify a start date of "2025-01-01" and an end date of "2025-12-31" to get all tenders published in 2025, optionally limiting the number of results or retrieving all available data.

Properties

Name Meaning
Start Date The beginning date of the publication date range to search tenders (format: YYYY-MM-DD).
End Date The ending date of the publication date range to search tenders (format: YYYY-MM-DD).
Return All Boolean flag indicating whether to return all matching tenders or limit the number of results.
Limit Maximum number of tenders to return if "Return All" is false. Minimum value is 1, default 50.

Output

The output is an array of JSON objects, each representing a tender with detailed standardized fields including:

  • pncpId: Tender unique identifier.
  • procuringEntityName: Name of the entity issuing the tender.
  • procuringEntityCNPJ: CNPJ (Brazilian company ID) of the procuring entity.
  • tenderObject: Description of the contract object.
  • tenderModality: Type/modality of the tender.
  • tenderSituation: Current status of the tender.
  • publicationDate: Date when the tender was published.
  • proposalOpeningDate: Date when proposals will be opened.
  • estimatedTotalValue: Estimated total value of the tender in BRL.
  • Location details: municipality code/name, state code/name, unit name/code.
  • Legal and procedural information.
  • Links to the official portal tender page.
  • Additional metadata such as risk score, urgency level, data quality assessment, and category classification.

No binary data is output by this node.

Dependencies

  • Requires access to the Brazilian PNCP API endpoint (https://pncp.gov.br/api/consulta).
  • Needs an internet connection to make HTTP GET requests.
  • No explicit API key or authentication token is shown in the code; however, proper network access and possibly credentials configured in n8n may be required depending on the API setup.
  • Uses standard HTTP headers including a custom User-Agent and a unique request ID per call.
  • Implements retry logic with exponential backoff for transient errors like rate limits or timeouts.

Troubleshooting

Common Issues

  • Missing or invalid date parameters: Both start and end dates are mandatory. Omitting them or providing invalid formats will cause errors.
  • Rate limiting: The API enforces request limits. If exceeded, the node throws an error advising to wait before retrying.
  • Network connectivity problems: Connection refused or DNS not found errors indicate internet or API availability issues.
  • Invalid responses: Empty or malformed API responses trigger errors.
  • Invalid CNPJ format: For other operations requiring CNPJ, it must be exactly 14 digits without formatting.

Error Messages and Resolutions

  • "Start date and end date are required": Ensure both dates are provided in the correct format.
  • "PNCP API Error (RATE_LIMIT_EXCEEDED): Limite de requisições excedido": Wait the specified retry-after seconds before making new requests.
  • "Não foi possível conectar à API PNCP": Check internet connection and API server status.
  • "Timeout na consulta à API PNCP": Try reducing the date range or try again later.
  • "Operation \"<operation>\" is not supported": Use only supported operations listed in the node.
  • "Invalid CNPJ format. It must contain exactly 14 digits": Provide a valid CNPJ without punctuation.

Links and References

Discussion