Skip to Content
Docs are evolving — expect frequent updates.
CompanyRetrieve Companies

Retrieve Companies

Retrieve all companies in your portfolio with detailed information including analysis results, scores, project status, and owner details. Results are paginated for efficient data handling.

Endpoint

GET https://api.kruncher.ai/api/integration/projects

Headers

HeaderRequiredDescription
AuthorizationYesYour API key (format: YOUR_API_KEY)
Content-TypeYesMust be application/json

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (0-indexed, default: 0)
orderbystringNoField name to sort by (ascending)

Code Examples

JavaScript/TypeScript

CODE
const API_KEY = "YOUR_API_KEY_HERE";
 
const response = await fetch("https://api.kruncher.ai/api/integration/projects", {
  method: "GET",
  headers: {
    "Authorization": `${API_KEY}`,
    "Content-Type": "application/json"
  }
});
 
const data = await response.json();
console.log(`Found ${data.pagination.totalCount} companies`);
console.log("Companies:", data.data);

Result: Retrieves first page of companies with default pagination.

Python

CODE
import requests
 
API_KEY = "YOUR_API_KEY_HERE"
url = "https://api.kruncher.ai/api/integration/projects"
 
headers = {
    "Authorization": f"{API_KEY}",
    "Content-Type": "application/json"
}
 
response = requests.get(url, headers=headers)
 
if response.status_code == 200:
    data = response.json()
    print(f"Found {data['pagination']['totalCount']} companies")
    print(f"Companies on this page: {len(data['data'])}")
else:
    print(f"Error: {response.status_code} {response.text}")

Result: Retrieves first page of companies.

cURL

CODE
curl -X GET "https://api.kruncher.ai/api/integration/projects" \
  -H "Authorization: YOUR_API_KEY_HERE" \
  -H "Content-Type: application/json"

Response Structure

Success Response (200 OK)

CODE
{
  "code": "1000",
  "title": "Successful",
  "description": "",
  "data": [
    {
      "id": "proj_abc123",
      "name": "TechStartup",
      "companyName": "TechStartup Inc.",
      "companyLegalName": "TechStartup Incorporated",
      "companyEmail": "contact@techstartup.com",
      "companyWebsite": "https://techstartup.com",
      "companyIndustry": "Software",
      "companyCountry": "US",
      "companyBusinessModel": "b2b",
      "companyStage": "seriesA",
      "companyRevenueRange": "$1M-$10M",
      "isVisible": true,
      "isPending": false,
      "isUnread": false,
      "processing": "completed",
      "projectUser": {
        "role": "owner"
      },
      "analyses": [
        {
          "id": "analysis_xyz789",
          "type": "company",
          "status": "completed",
          "createdAt": "2024-01-15T10:30:00Z"
        }
      ],
      "projectscores": [
        {
          "status": "done",
          "scoreText": "Strong Fit",
          "score": 8.5
        }
      ],
      "projectstatus": {
        "name": "Active",
        "code": "active",
        "order": 1,
        "isVisible": true,
        "hasProjectPhase": true
      },
      "projectphase": {
        "name": "Due Diligence",
        "code": "dueDiligence",
        "order": 2,
        "isVisible": true
      },
      "projectowner": {
        "fullName": "John Smith",
        "email": "john@example.com",
        "status": "active"
      }
    }
  ],
  "pagination": {
    "page": 1,
    "totalCount": 150,
    "pageSize": 20,
    "nextPage": true
  }
}

Response Fields

Metadata

FieldTypeDescription
codestringStatus code ("1000" for success)
titlestringStatus message (e.g., "Successful")
descriptionstringAdditional context or error details

Company Data Fields

FieldTypeDescription
idstringUnique project identifier
namestringShort project nickname
companyNamestringFull company name
companyLegalNamestringLegal entity name
companyEmailstringCompany contact email
companyWebsitestringCompany website URL
companyIndustrystringIndustry classification
companyCountrystringCountry code (ISO 3166-1)
companyBusinessModelstringb2b, b2c, b2b2c, etc.
companyStagestringpreSeed, seed, seriesA, seriesB, etc.
companyRevenueRangestringRevenue bracket
isVisiblebooleanVisibility in lists
isPendingbooleanPending review status
isUnreadbooleanUnread notification flag
processingstringProcessing status
projectUserobjectUser role information

Analysis Object

FieldTypeDescription
idstringUnique analysis identifier
typestringAnalysis type (e.g., "company")
statusstringcompleted, progress, pending, failed
createdAtstringISO 8601 timestamp

Project Score Object

FieldTypeDescription
statusstringScore calculation status
scoreTextstringHuman-readable score description
scorenumberNumerical score (typically 0-10)

Project Status Object

FieldTypeDescription
namestringStatus display name
codestringStatus identifier
orderintegerDisplay order
isVisiblebooleanVisibility flag
hasProjectPhasebooleanWhether project has phases

Project Phase Object

FieldTypeDescription
namestringPhase display name
codestringPhase identifier
orderintegerPhase sequence number
isVisiblebooleanVisibility flag

Project Owner Object

FieldTypeDescription
fullNamestringOwner’s full name
emailstringOwner’s email address
statusstringOwner account status

Pagination Object

FieldTypeDescription
pageintegerCurrent page number
totalCountintegerTotal number of companies
pageSizeintegerResults per page
nextPagebooleanWhether more pages exist

Common Use Cases

Filter by Analysis Status

CODE
const companies = await api.getCompanies();
const completed = companies.data.filter(company =>
  company.analyses?.some(a => a.status === 'completed')
);

Sort by Score

CODE
const companies = await api.getCompanies();
const sorted = companies.data.sort((a, b) => {
  const scoreA = a.projectscores?.[0]?.score || 0;
  const scoreB = b.projectscores?.[0]?.score || 0;
  return scoreB - scoreA;
});

Group by Industry

CODE
from collections import defaultdict
 
companies = api.get_all_companies()
by_industry = defaultdict(list)
 
for company in companies:
    industry = company.get('companyIndustry', '')
    if industry:
        by_industry[industry].append(company)
 
print(f"Software companies: {len(by_industry['Software'])}")

Error Responses

401 Unauthorized

CODE
{
  "code": "4010",
  "title": "Unauthorized",
  "description": "Invalid or missing API key"
}

500 Internal Server Error

CODE
{
  "code": "5000",
  "title": "Internal Server Error",
  "description": "An unexpected error occurred"
}

Best Practices

Pagination

  • Use appropriate page sizes (20-50 for UI, 100 for batch processing)
  • Implement page caching for frequently accessed data
  • Handle the nextPage flag to avoid unnecessary requests

Performance

  • Cache company lists when appropriate
  • Use search parameters to reduce data transfer
  • Fetch all pages only when necessary

Data Handling

  • Always check for null or missing fields
  • Handle empty arrays in analyses and projectscores
  • Validate data types before processing

Need Help?

  • Large datasets? Contact support for bulk export options
  • Custom filtering? Let us know what filters you need
  • Rate limits? Check your plan for API limits
Last updated on