The Graph API lets you access your organization's knowledge system from external applications. Query entities, relationships, and graph intelligence to build custom integrations, create visualization tools, or power AI-driven workflows.
Secure AccessAPI keys with scoped permissions
Fast & ReliableRESTful endpoints with pagination
Rate LimitedFair usage with clear limits
Get your first API response in under 60 seconds.
Base URL
https://api.simplyasking.io/functions/v1
1
Get your API key
Go to Organization > Graph API and create a key with entities:read scope.
2
Make your first request
Use cURL, JavaScript, or Python to call the API:
cURL
curl -H "Authorization: Bearer gak_YOUR_API_KEY" \ -H "Content-Type: application/json" \ "https://api.simplyasking.io/functions/v1/graph-api/entities?limit=5"
JavaScript
// Store your API key securely (never hardcode in production)
const API_KEY = 'your-api-key-here';
const BASE_URL = 'https://api.simplyasking.io/functions/v1';
async function listEntities() {
const response = await fetch(`${BASE_URL}/graph-api/entities?limit=20`, {
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json',
},
});
if (!response.ok) {
const error = await response.json().catch(() => ({}));
throw new Error(`API error: ${response.status} - ${error.message || 'Unknown'}`);
}
return response.json();
}
// Usage
const data = await listEntities();
console.log(`Found ${data.entities.length} entities`);
console.log('First entity:', data.entities[0]);Python
import os
import requests
# Store API key in environment variable (never hardcode in production)
API_KEY = os.environ.get('GRAPH_API_KEY')
BASE_URL = 'https://api.simplyasking.io/functions/v1'
def list_entities():
try:
response = requests.get(
f'{BASE_URL}/graph-api/entities',
headers={
'Authorization': f'Bearer {API_KEY}',
'Content-Type': 'application/json'
},
params={'limit': 20}
)
response.raise_for_status()
return response.json()
except requests.HTTPError as e:
error_msg = e.response.json().get('message', str(e))
raise Exception(f'API error: {error_msg}')
# Usage
data = list_entities()
print(f"Found {len(data['entities'])} entities")
print('First entity:', data['entities'][0])3
Check the response
A successful response looks like this:
JSON Response
{
"entities": [
{
"id": "ent_abc123def456",
"name": "Acme Corporation",
"type": "organization",
"description": "Global technology company",
"mentions": 47,
"created_at": "2024-01-15T10:30:00Z"
},
{
"id": "ent_789ghi012jkl",
"name": "John Smith",
"type": "person",
"description": "Chief Technology Officer at Acme",
"mentions": 23,
"created_at": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"limit": 20,
"offset": 0,
"total": 156,
"has_more": true
}
}