Bulk Operations API
Efficient batch processing for multiple entities in a single request. Process up to 100 entities per request.
Bulk Operations
/api/v1/bulkPerform batch operations on multiple entities efficiently. Supports GET, EXISTS, and COUNT operations.
Request Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| operation | string | Yes | Operation type: get, exists, count |
| entity_type | string | Yes | Entity type: companies, people, investors |
| identifiers | array | Yes | Array of entity IDs (max 100) |
| fields | array | No | Specific fields to return (for GET operation) |
Bulk GET Operation
Retrieve multiple entities in a single request with optional field selection.
Example Request
curl -X POST "https://mentibus.xyz/api/v1/bulk" \
-H "Authorization: Bearer mk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"operation": "get",
"entity_type": "companies",
"identifiers": [1, 2, 3, 4, 5],
"fields": ["id", "name", "slug", "overview", "website"]
}'Example Response
{
"success": true,
"data": {
"operation": "get",
"entity_type": "companies",
"requested_count": 5,
"results": {
"companies": [
{
"id": 1,
"name": "OpenAI",
"slug": "openai",
"overview": "AI research and deployment company...",
"website": "https://openai.com"
},
{
"id": 2,
"name": "Anthropic",
"slug": "anthropic",
"overview": "AI safety company...",
"website": "https://anthropic.com"
}
]
},
"metadata": {
"processed_at": "2024-01-15T10:30:00Z",
"processing_time_ms": 45
}
},
"message": "Bulk get operation completed for 5 companies"
}Bulk EXISTS Operation
Check existence of multiple entities without retrieving full data.
Example Request
curl -X POST "https://mentibus.xyz/api/v1/bulk" \
-H "Authorization: Bearer mk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"operation": "exists",
"entity_type": "people",
"identifiers": [1, 2, 999, 1000, 5]
}'Example Response
{
"success": true,
"data": {
"operation": "exists",
"entity_type": "people",
"requested_count": 5,
"results": {
"people": [
{
"id": 1,
"exists": true
},
{
"id": 2,
"exists": true
},
{
"id": 999,
"exists": false
},
{
"id": 1000,
"exists": false
},
{
"id": 5,
"exists": true
}
]
}
},
"message": "Bulk exists operation completed for 5 people"
}Bulk COUNT Operation
Get count of existing entities from a list of identifiers.
Example Request
curl -X POST "https://mentibus.xyz/api/v1/bulk" \
-H "Authorization: Bearer mk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"operation": "count",
"entity_type": "investors",
"identifiers": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
}'Example Response
{
"success": true,
"data": {
"operation": "count",
"entity_type": "investors",
"requested_count": 10,
"results": {
"investors": {
"count": 7
}
}
},
"message": "Bulk count operation completed for 10 investors"
}Error Handling
Bulk operations include individual error tracking for each entity type.
Example Error Response
{
"success": true,
"data": {
"operation": "get",
"entity_type": "companies",
"requested_count": 3,
"results": {
"companies": [
{
"id": 1,
"name": "OpenAI",
"slug": "openai"
}
]
},
"errors": [
{
"entity_type": "companies",
"error": "Failed to fetch companies"
}
]
}
}Limitations
Request Limit
Maximum 100 identifiers per request
Rate Limiting
Bulk operations count as multiple API calls for rate limiting
Timeout
Large bulk requests may timeout. Consider smaller batches for better performance
Common Use Cases
Data Synchronization
Check which entities exist before attempting updates or creating relationships.
Batch Data Retrieval
Retrieve multiple entities efficiently with only the fields you need.
Analytics Preparation
Count entities for analytics without retrieving full data.
Cache Warming
Pre-load frequently accessed entities into your application cache.