Skip to main content
GET
/
api
/
v1
/
public
/
graph
/
company
/
{cnpj_or_id}
curl "https://api.bracc.app/api/v1/public/graph/company/12345678000190?depth=2"
{
  "nodes": [
    {
      "id": "4:abc123:456",
      "label": "ACME COMERCIO LTDA",
      "type": "company",
      "document_id": "12.345.678/0001-90",
      "properties": {
        "razao_social": "ACME COMERCIO LTDA",
        "cnpj": "12.345.678/0001-90",
        "situacao_cadastral": "ATIVA",
        "capital_social": 100000.0,
        "data_abertura": "2010-01-15",
        "uf": "SP",
        "municipio": "SAO PAULO"
      },
      "sources": [
        {
          "database": "rfb_cnpj",
          "record_id": null,
          "extracted_at": null
        }
      ],
      "is_pep": false,
      "exposure_tier": "public_safe"
    },
    {
      "id": "4:def789:123",
      "label": "CONTRACT-2023-001",
      "type": "contract",
      "document_id": null,
      "properties": {
        "contract_number": "2023-001",
        "contract_value": 150000.0,
        "start_date": "2023-01-01",
        "end_date": "2023-12-31",
        "object": "Prestacao de servicos de consultoria",
        "contracting_agency": "MINISTERIO DA ECONOMIA"
      },
      "sources": [
        {
          "database": "comprasnet",
          "record_id": "2023001",
          "extracted_at": "2024-01-15"
        }
      ],
      "is_pep": false,
      "exposure_tier": "public_safe"
    }
  ],
  "edges": [
    {
      "id": "5:rel123:789",
      "source": "4:abc123:456",
      "target": "4:def789:123",
      "type": "HAS_CONTRACT",
      "properties": {
        "role": "supplier",
        "year": 2023
      },
      "confidence": 1.0,
      "sources": [
        {
          "database": "comprasnet",
          "record_id": null,
          "extracted_at": null
        }
      ],
      "exposure_tier": "public_safe"
    }
  ],
  "center_id": "4:abc123:456"
}
Retrieve the relationship graph for a specific company, including connected entities and their relationships. This endpoint supports lookup by CNPJ (formatted or unformatted) or internal entity ID.
This endpoint enforces public access policies. Person entities are automatically filtered out, and only public-safe information is returned.

Path Parameters

cnpj_or_id
string
required
Company identifier. Can be:
  • CNPJ with formatting: 12.345.678/0001-90
  • CNPJ without formatting: 12345678000190
  • Internal entity ID: 4:a1b2c3d4:123

Query Parameters

depth
integer
default:"2"
Graph traversal depth. Controls how many relationship hops to include.
  • Minimum: 1
  • Maximum: 3
  • Default: 2
curl "https://api.bracc.app/api/v1/public/graph/company/12345678000190?depth=2"
{
  "nodes": [
    {
      "id": "4:abc123:456",
      "label": "ACME COMERCIO LTDA",
      "type": "company",
      "document_id": "12.345.678/0001-90",
      "properties": {
        "razao_social": "ACME COMERCIO LTDA",
        "cnpj": "12.345.678/0001-90",
        "situacao_cadastral": "ATIVA",
        "capital_social": 100000.0,
        "data_abertura": "2010-01-15",
        "uf": "SP",
        "municipio": "SAO PAULO"
      },
      "sources": [
        {
          "database": "rfb_cnpj",
          "record_id": null,
          "extracted_at": null
        }
      ],
      "is_pep": false,
      "exposure_tier": "public_safe"
    },
    {
      "id": "4:def789:123",
      "label": "CONTRACT-2023-001",
      "type": "contract",
      "document_id": null,
      "properties": {
        "contract_number": "2023-001",
        "contract_value": 150000.0,
        "start_date": "2023-01-01",
        "end_date": "2023-12-31",
        "object": "Prestacao de servicos de consultoria",
        "contracting_agency": "MINISTERIO DA ECONOMIA"
      },
      "sources": [
        {
          "database": "comprasnet",
          "record_id": "2023001",
          "extracted_at": "2024-01-15"
        }
      ],
      "is_pep": false,
      "exposure_tier": "public_safe"
    }
  ],
  "edges": [
    {
      "id": "5:rel123:789",
      "source": "4:abc123:456",
      "target": "4:def789:123",
      "type": "HAS_CONTRACT",
      "properties": {
        "role": "supplier",
        "year": 2023
      },
      "confidence": 1.0,
      "sources": [
        {
          "database": "comprasnet",
          "record_id": null,
          "extracted_at": null
        }
      ],
      "exposure_tier": "public_safe"
    }
  ],
  "center_id": "4:abc123:456"
}

Response Fields

nodes
array
Array of graph nodes (entities) in the company’s network.
edges
array
Array of relationships (edges) connecting the nodes.
center_id
string
ID of the center/focus node (the company being queried).

Common Entity Types

  • company: Brazilian companies (identified by CNPJ)
  • contract: Public contracts
  • sanction: Administrative sanctions (CEIS/CNEP/TCU)
  • finance: Financial transactions (loans, grants)
  • bid: Public bidding processes
  • embargo: Environmental embargoes (IBAMA)
  • amendment: Congressional budget amendments
  • election: Electoral data
  • health: Healthcare facility operations

Common Relationship Types

  • HAS_CONTRACT: Company has a public contract
  • HAS_SANCTION: Entity has a sanction record
  • PARTNER_OF: Ownership/partnership relationship
  • DONATED_TO: Electoral campaign donation
  • RECEIVED_AMENDMENT: Received budget amendment funds
  • HAS_EMBARGO: Environmental embargo record
  • OPERATES: Operates a facility or service

Use Cases

  • Due Diligence: Investigate company relationships and risk factors
  • Network Analysis: Visualize business networks and connections
  • Compliance Screening: Check for sanctions, embargoes, or adverse records
  • Investigative Journalism: Discover connections between entities
  • Risk Assessment: Analyze relationship patterns and red flags

Build docs developers (and LLMs) love