Get All Graph Nodes
GET
/api/v1/graph/nodes
⚠️ Large Response Warning
This endpoint returns 10,000+ nodes. Testing in Swagger UI may impact browser performance. Consider using command-line tools or applications designed for large datasets.
Returns all nodes for graph visualization, including projects, entities, people, DLT instances, regulations, standards, and DID methods. This is the same data used by the Web of Trust Map's interactive visualization.
Features
- Complete node dataset for network visualization
- Includes calculated importance scores
- Geographic coordinates for mapping
- Industry and country associations
- Optimized for graph rendering libraries (D3.js, Cytoscape, etc.)
Request
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
format |
string | No | json | Response format: "json" |
Example Request
bash
# Get all graph nodes
curl -X GET "https://www.weboftrust.org/api/v1/graph/nodes" \
-H "X-API-Key: YOUR_API_KEY" \
-o nodes.json
# With format parameter (for future compression support)
curl -X GET "https://www.weboftrust.org/api/v1/graph/nodes?format=json" \
-H "X-API-Key: YOUR_API_KEY"
Response
Success Response (200 OK)
Response Headers
| Header | Value | Description |
|---|---|---|
Cache-Control |
public, max-age=300, s-maxage=3600, stale-while-revalidate=7200 | Aggressive caching for performance |
Response Schema
typescript
interface GraphNodesResponse {
data: GraphNode[];
metadata: {
total: number; // Total number of nodes
compressed: boolean; // Whether data is compressed
format: "json" | "compressed";
cache_timestamp: string; // ISO 8601 timestamp
};
}
interface GraphNode {
// Required fields
id: string; // Prefixed ID (e.g., "project-118", "entity-456")
title: string; // Display name
type: NodeType; // Node category
countryCodes: string[]; // Array of relevant country codes
industryIds: string[]; // Array of industry IDs
// Optional fields
website?: {
Description: string;
Url: string;
};
status?: "Launched" | "Announced" | "Pilot" | "Discontinued" |
"Failed to Disclose" | "Active" | "Inactive";
image?: string; // Path to icon/logo
domain?: string; // Website domain
description?: string; // Node description
country?: string; // Primary country code
launch?: string; // Launch date
latitude?: number; // Geographic coordinates
longitude?: number;
score?: number; // Importance score (0-100)
total_links?: number; // Number of connections
}
type NodeType =
| "DID Project"
| "Consortium"
| "Public" // Public entity
| "Private" // Private entity
| "Person"
| "dltinstance"
| "dlt"
| "Regulation"
| "Standard"
| "didmethod";
Example Response (Abbreviated)
json
{
"data": [
{
"id": "project-118",
"title": "TradeTrust",
"type": "DID Project",
"website": {
"Description": "TradeTrust Official Website",
"Url": "https://www.tradetrust.io/"
},
"status": "Launched",
"image": "/icons/tradetrust.io.webp",
"domain": "tradetrust.io",
"description": "Digital trade documents platform",
"country": "SG",
"countryCodes": ["SG", "NL", "CN"],
"launch": "2019",
"latitude": 1.3521,
"longitude": 103.8198,
"score": 12.5,
"total_links": 85,
"industryIds": ["734"]
},
{
"id": "entity-649",
"title": "European Commission",
"type": "Public",
"website": {
"Description": "European Commission",
"Url": "https://commission.europa.eu/"
},
"image": "/icons/commission.europa.eu.webp",
"domain": "commission.europa.eu",
"country": "BE",
"countryCodes": ["BE"],
"latitude": 50.8422911,
"longitude": 4.3703692,
"score": 45.2,
"total_links": 122,
"industryIds": []
}
],
"metadata": {
"total": 10547,
"compressed": false,
"format": "json",
"cache_timestamp": "2025-01-09T10:30:00.000Z"
}
}
Node Scoring
The score field represents node importance calculated using:
- Number of direct connections (degree centrality)
- Quality of connections (weighted by connected nodes' scores)
- Type of relationships (some relationships weighted higher)
- Network position (betweenness centrality)
Scores range from 0-100, with higher scores indicating more central/important nodes in the network.
Node Types
| Type | ID Prefix | Description |
|---|---|---|
DID Project |
project- | Decentralized identity project |
Consortium |
project- | Industry consortium |
Public |
entity- | Government or public sector organization |
Private |
entity- | Private sector company |
Person |
person- | Person of interest |
dltinstance |
dltinstance- | Blockchain instance |
dlt |
dlt- | DLT technology |
Regulation |
regulation- | Legal regulation |
Standard |
standard- | Technical standard |
didmethod |
didmethod- | DID method specification |
Geographic Data
- countryCodes: All countries associated with the node (headquarters, operations, focus)
- country: Primary country code (usually headquarters)
- latitude/longitude: Coordinates for map visualization
Performance Considerations
Large Dataset: This endpoint returns the entire node dataset (10,000+ nodes)
- Response size: ~3-5 MB uncompressed JSON
- Parse time may be significant in browsers
- Consider implementing pagination in your application
- Cache the response locally to avoid repeated downloads
- Results are heavily cached at CDN level (1 hour)
Usage with Visualization Libraries
D3.js Example
javascript
// Fetch and visualize nodes
fetch('https://www.weboftrust.org/api/v1/graph/nodes', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
})
.then(response => response.json())
.then(result => {
const nodes = result.data;
// Create D3 force simulation
const simulation = d3.forceSimulation(nodes)
.force("charge", d3.forceManyBody().strength(-100))
.force("center", d3.forceCenter(width / 2, height / 2));
// Render nodes...
});
Cytoscape.js Example
javascript
// Convert to Cytoscape format
const elements = result.data.map(node => ({
data: {
id: node.id,
label: node.title,
type: node.type,
score: node.score
},
position: node.latitude && node.longitude ? {
x: node.longitude * 100,
y: node.latitude * 100
} : undefined
}));
Related Endpoints
- GET /graph/links - Get all relationships between nodes
- GET /projects/{id} - Get detailed information about specific project nodes
- GET /search - Search for specific nodes