Skip to main content

Get Company Graph

Retrieve the knowledge graph for a specific company. The graph maps relationships, relevance signals, and cross-references between the company and related entities in your workspace. This endpoint calls PG:AI’s relevance engine to compute real-time relationship data.
company_id
string
required
The unique identifier (UUID) of the company. Must be a valid UUID format.
Permission: insights:read
curl -X GET "https://api.pipelinegeneration.ai/v1/companies/{company_id}/graph" \
  -H "x-api-key: your_api_key"
{
  "company_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "nodes": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "type": "company",
      "label": "Acme Corporation",
      "properties": {
        "industry": "Technology",
        "employee_count": 5000
      }
    },
    {
      "id": "c1d2e3f4-a5b6-7890-cdef-123456789012",
      "type": "contact",
      "label": "Jane Smith",
      "properties": {
        "job_title": "VP of Engineering",
        "relevance_score": 0.92
      }
    },
    {
      "id": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "type": "company",
      "label": "TechCorp",
      "properties": {
        "relationship": "competitor",
        "relevance_score": 0.78
      }
    }
  ],
  "edges": [
    {
      "source": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "target": "c1d2e3f4-a5b6-7890-cdef-123456789012",
      "type": "employs",
      "weight": 0.92
    },
    {
      "source": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "target": "b2c3d4e5-f6a7-8901-bcde-f23456789012",
      "type": "competes_with",
      "weight": 0.78
    }
  ]
}
This endpoint may take up to 60 seconds to respond as it computes relevance data in real time. Plan your timeout settings accordingly.

Validation

The company_id must be a valid UUID. Requests with invalid formats will receive a 400 error:
{
  "error": "Company ID must be a valid UUID"
}