BrasilAPI DDD icon

BrasilAPI DDD

Consulta DDD usando BrasilAPI

BrasilAPI DDD

AI-generated

Overview

This node queries the BrasilAPI service to retrieve information about a Brazilian telephone area code (DDD). It is useful when you need to validate or obtain details about a specific DDD, such as its associated state or region. For example, if you input the DDD "62", the node will return data related to that area code.

Properties

Name Meaning
DDD The Brazilian telephone area code (DDD) to query. Example: "62".

Output

The node outputs an array of JSON objects, each containing the response from the BrasilAPI for the requested DDD. The structure of the output JSON corresponds directly to the API response and typically includes details about the area code.

If an error occurs during the request (e.g., invalid DDD or network issue), the output JSON will contain an error field with the error message and the queried DDD, for example:

{
  "error": "Error message here",
  "ddd": "62"
}

Dependencies

  • Requires internet access to call the BrasilAPI endpoint at https://brasilapi.com.br/api/ddd/v1/{ddd}.
  • No special credentials or API keys are needed.
  • Uses n8n's built-in HTTP request helper.

Troubleshooting

  • Common issues:
    • Invalid or non-existent DDD codes may result in errors returned by the API.
    • Network connectivity problems can cause request failures.
  • Error messages:
    • If the API returns an error, it will be included in the output JSON under the error key.
    • To resolve, verify the DDD value is correct and ensure network connectivity.

Links and References

Discussion