Discovery API

Discover companies from the open web using natural language queries. Describe the companies you're looking for, define match conditions, and let the API search, evaluate, and enrich candidates automatically.

API Endpoint

https://api.nyne.ai/company/discovery

What's Included

  • Natural Language Search: Describe the companies you want to find in plain English
  • Match Evaluation: Define requirements and get per-company match status with evidence
  • Custom Extractions: Specify enrichment fields to extract for each discovered company
  • Source Citations: Every evaluation backed by reasoning, confidence scores, and source citations

How It Works

Input: Provide a natural language query describing the companies you want to find, along with optional match requirements, extraction fields, quality tier, and exclusion lists.

Processing Pipeline:

  1. Search: The query is used to search the open web for matching companies
  2. Evaluation: Each company is evaluated against your requirements with evidence-based matching
  3. Extraction: Requested enrichment fields are extracted for each matched company
  4. Ranking: Results are ranked by match quality and returned with full citations

Output: A list of discovered companies with match status, evaluations, extractions, and source citations.

Try the API Playground

Test the API with our interactive playground to make real requests and see live responses.

Launch Discovery Playground

Authentication

All API requests require authentication using your API key and secret in the request headers:

X-API-Key: your_api_key
X-API-Secret: your_api_secret
API Key Required

You need to log in to access your API credentials.

Log In & Get API Keys

Rate Limits

Limit Type Default Limit Description
Per Minute 10 requests Maximum requests per minute
Per Hour 100 requests Maximum requests per hour

Credit Cost: 10 credits per request

Submit Discovery Request

Submit a request to discover companies from the open web matching your criteria.

POST /company/discovery

Request Parameters

Parameter Type Required Description
query string Yes Natural language query describing the companies to find (max 2000 characters)
requirements array No Array of match conditions, each with name and description (max 20 items)
extract array No Array of enrichment fields to extract, each with name and description (max 10 items)
limit integer No Maximum number of results to return. Range: 5-100. Default: 10
quality string No Quality tier for discovery. One of: basic, standard, premium. Default: standard
exclude array No Array of entities to exclude from results, each with name and url (max 100 items)
metadata object No Pass-through metadata returned with results. Values must be string, number, or boolean.
callback_url string No HTTPS URL to receive webhook notification when processing completes

Requirements Object

Field Type Description
name string Short identifier for the requirement (e.g., "series_a_funded")
description string Description of the match condition (e.g., "Has raised a Series A funding round")

Extract Object

Field Type Description
name string Short identifier for the field (e.g., "ceo_name")
description string Description of what to extract (e.g., "Name of the CEO or founder")

Exclude Object

Field Type Description
name string Name of the company or entity to exclude
url string URL associated with the entity to exclude

Example Request

curl -X POST "https://api.nyne.ai/company/discovery" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "AI startups in healthcare that have raised Series A funding",
    "requirements": [
      {
        "name": "series_a_funded",
        "description": "Has raised a Series A funding round"
      },
      {
        "name": "healthcare_focus",
        "description": "Primary business focus is in healthcare or medical technology"
      }
    ],
    "extract": [
      {
        "name": "ceo_name",
        "description": "Name of the CEO or founder"
      },
      {
        "name": "funding_amount",
        "description": "Total funding amount raised"
      }
    ],
    "limit": 10,
    "quality": "standard",
    "callback_url": "https://yourapp.com/webhook/discovery"
  }'

Response (202 Accepted)

{
  "success": true,
  "data": {
    "request_id": "a1b2c3d4e5f6...",
    "status": "pending",
    "message": "Discovery request queued for processing. Use GET with request_id to check status.",
    "created_on": "2026-02-19T10:30:00"
  },
  "timestamp": "2026-02-19T10:30:00Z"
}

Check Request Status

Check the status of a pending discovery request and retrieve results when complete.

GET /company/discovery?request_id={request_id}

Query Parameters

Parameter Type Required Description
request_id string Yes The request ID returned from the POST request

Processing Stages

Status Description
pending Request queued for processing
searching Searching the web, evaluating candidates, and extracting data
completed Discovery complete, results available
failed Processing failed
Polling Recommendations:
  • Recommended poll interval: 5 seconds
  • Typical processing time: 1-3 minutes
  • Maximum wait time: 10 minutes before considering timeout

Example Request

curl -X GET "https://api.nyne.ai/company/discovery?request_id=a1b2c3d4e5f6..." \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"

Response Format

When the request is completed, the response includes all discovered companies with match evaluations, extractions, and source citations.

Completed Response

{
  "success": true,
  "data": {
    "request_id": "a1b2c3d4e5f6...",
    "status": "completed",
    "completed": true,
    "completed_on": "2026-02-19T10:33:00",
    "created_on": "2026-02-19T10:30:00",
    "result": {
      "entity_type": "companies",
      "query": "AI startups in healthcare that have raised Series A funding",
      "results_count": 10,
      "results": [
        {
          "name": "MedAI Corp",
          "url": "medai.com",
          "description": "AI-powered medical diagnostics startup specializing in early disease detection using machine learning",
          "match_status": "matched",
          "evaluations": {
            "series_a_funded": {
              "value": "yes",
              "matched": true
            },
            "healthcare_focus": {
              "value": "yes",
              "matched": true
            }
          },
          "extractions": {
            "ceo_name": "John Smith",
            "funding_amount": "$15M Series A"
          },
          "sources": [
            {
              "field": "series_a_funded",
              "reasoning": "Found Series A announcement from 2025 with confirmed funding round",
              "confidence": "high",
              "citations": [
                {
                  "title": "TechCrunch - MedAI Corp Raises Series A",
                  "url": "https://techcrunch.com/2025/medai-series-a",
                  "excerpts": ["MedAI Corp announced a $15M Series A round led by Andreessen Horowitz..."]
                }
              ]
            },
            {
              "field": "healthcare_focus",
              "reasoning": "Company website and press coverage confirm healthcare AI as primary focus",
              "confidence": "high",
              "citations": [
                {
                  "title": "MedAI Corp - About Us",
                  "url": "https://medai.com/about",
                  "excerpts": ["MedAI Corp is building AI-powered diagnostic tools for healthcare providers"]
                }
              ]
            }
          ]
        }
      ],
      "metrics": {
        "candidates_evaluated": 50,
        "candidates_matched": 10
      }
    }
  },
  "timestamp": "2026-02-19T10:33:00Z"
}

Result Fields

Field Type Description
entity_type string Always "companies" for company discovery
query string The original query submitted
results_count integer Number of matched results returned
results array Array of discovered company objects
metrics object Processing metrics including candidates evaluated and matched

Company Result Fields

Field Type Description
name string Name of the discovered company
url string Primary URL associated with the company
description string Brief description of the company and its relevance
match_status string Overall match status (e.g., "matched")
evaluations object Per-requirement evaluation results with value and matched boolean
extractions object Extracted field values as specified in the extract parameter
sources array Source citations with field, reasoning, confidence, and citation details

Code Examples

cURL

# Submit a discovery request
curl -X POST "https://api.nyne.ai/company/discovery" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "AI startups in healthcare that have raised Series A funding",
    "requirements": [
      {"name": "series_a_funded", "description": "Has raised a Series A funding round"},
      {"name": "healthcare_focus", "description": "Primary business focus is in healthcare"}
    ],
    "extract": [
      {"name": "ceo_name", "description": "Name of the CEO or founder"}
    ],
    "limit": 10,
    "quality": "standard"
  }'

# Check status (replace REQUEST_ID with the returned request_id)
curl -X GET "https://api.nyne.ai/company/discovery?request_id=REQUEST_ID" \
  -H "X-API-Key: your_api_key" \
  -H "X-API-Secret: your_api_secret"

Python

import requests
import time

API_KEY = "your_api_key"
API_SECRET = "your_api_secret"
BASE_URL = "https://api.nyne.ai"

headers = {
    "X-API-Key": API_KEY,
    "X-API-Secret": API_SECRET,
    "Content-Type": "application/json"
}

# Step 1: Submit discovery request
payload = {
    "query": "AI startups in healthcare that have raised Series A funding",
    "requirements": [
        {"name": "series_a_funded", "description": "Has raised a Series A funding round"},
        {"name": "healthcare_focus", "description": "Primary business focus is in healthcare"}
    ],
    "extract": [
        {"name": "ceo_name", "description": "Name of the CEO or founder"},
        {"name": "funding_amount", "description": "Total funding amount raised"}
    ],
    "limit": 10,
    "quality": "standard"
}

response = requests.post(f"{BASE_URL}/company/discovery", json=payload, headers=headers)
data = response.json()

if not data.get("success"):
    print(f"Error: {data}")
    exit(1)

request_id = data["data"]["request_id"]
print(f"Request submitted: {request_id}")

# Step 2: Poll for results
while True:
    time.sleep(5)
    response = requests.get(
        f"{BASE_URL}/company/discovery",
        params={"request_id": request_id},
        headers=headers
    )
    result = response.json()
    status = result["data"]["status"]
    print(f"Status: {status}")

    if status == "completed":
        discovery = result["data"]["result"]
        print(f"Found {discovery['results_count']} companies")
        for company in discovery["results"]:
            print(f"  - {company['name']}: {company['description']}")
            if company.get("extractions"):
                for key, value in company["extractions"].items():
                    print(f"    {key}: {value}")
        break
    elif status == "failed":
        print(f"Discovery failed: {result['data'].get('error', 'Unknown error')}")
        break

JavaScript (Node.js)

const API_KEY = "your_api_key";
const API_SECRET = "your_api_secret";
const BASE_URL = "https://api.nyne.ai";

const headers = {
  "X-API-Key": API_KEY,
  "X-API-Secret": API_SECRET,
  "Content-Type": "application/json"
};

async function discoverCompanies() {
  // Step 1: Submit discovery request
  const payload = {
    query: "AI startups in healthcare that have raised Series A funding",
    requirements: [
      { name: "series_a_funded", description: "Has raised a Series A funding round" },
      { name: "healthcare_focus", description: "Primary business focus is in healthcare" }
    ],
    extract: [
      { name: "ceo_name", description: "Name of the CEO or founder" },
      { name: "funding_amount", description: "Total funding amount raised" }
    ],
    limit: 10,
    quality: "standard"
  };

  const submitResponse = await fetch(`${BASE_URL}/company/discovery`, {
    method: "POST",
    headers,
    body: JSON.stringify(payload)
  });
  const submitData = await submitResponse.json();

  if (!submitData.success) {
    console.error("Error:", submitData);
    return;
  }

  const requestId = submitData.data.request_id;
  console.log(`Request submitted: ${requestId}`);

  // Step 2: Poll for results
  while (true) {
    await new Promise(resolve => setTimeout(resolve, 5000));

    const statusResponse = await fetch(
      `${BASE_URL}/company/discovery?request_id=${requestId}`,
      { headers }
    );
    const statusData = await statusResponse.json();
    const status = statusData.data.status;
    console.log(`Status: ${status}`);

    if (status === "completed") {
      const discovery = statusData.data.result;
      console.log(`Found ${discovery.results_count} companies`);
      discovery.results.forEach(company => {
        console.log(`  - ${company.name}: ${company.description}`);
        if (company.extractions) {
          Object.entries(company.extractions).forEach(([key, value]) => {
            console.log(`    ${key}: ${value}`);
          });
        }
      });
      return statusData;
    } else if (status === "failed") {
      console.error("Discovery failed:", statusData.data.error || "Unknown error");
      return statusData;
    }
  }
}

discoverCompanies();

PHP

<?php

$apiKey = "your_api_key";
$apiSecret = "your_api_secret";
$baseUrl = "https://api.nyne.ai";

// Step 1: Submit discovery request
$payload = [
    "query" => "AI startups in healthcare that have raised Series A funding",
    "requirements" => [
        ["name" => "series_a_funded", "description" => "Has raised a Series A funding round"],
        ["name" => "healthcare_focus", "description" => "Primary business focus is in healthcare"]
    ],
    "extract" => [
        ["name" => "ceo_name", "description" => "Name of the CEO or founder"],
        ["name" => "funding_amount", "description" => "Total funding amount raised"]
    ],
    "limit" => 10,
    "quality" => "standard"
];

$ch = curl_init("$baseUrl/company/discovery");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode($payload),
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-API-Key: $apiKey",
        "X-API-Secret: $apiSecret",
        "Content-Type: application/json"
    ]
]);

$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);

if (!$data["success"]) {
    echo "Error: " . print_r($data, true);
    exit(1);
}

$requestId = $data["data"]["request_id"];
echo "Request submitted: $requestId\n";

// Step 2: Poll for results
while (true) {
    sleep(5);

    $ch = curl_init("$baseUrl/company/discovery?request_id=$requestId");
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            "X-API-Key: $apiKey",
            "X-API-Secret: $apiSecret"
        ]
    ]);

    $response = curl_exec($ch);
    curl_close($ch);

    $result = json_decode($response, true);
    $status = $result["data"]["status"];
    echo "Status: $status\n";

    if ($status === "completed") {
        $discovery = $result["data"]["result"];
        echo "Found " . $discovery["results_count"] . " companies\n";
        foreach ($discovery["results"] as $company) {
            echo "  - " . $company["name"] . ": " . $company["description"] . "\n";
            if (isset($company["extractions"])) {
                foreach ($company["extractions"] as $key => $value) {
                    echo "    $key: $value\n";
                }
            }
        }
        break;
    } elseif ($status === "failed") {
        echo "Discovery failed: " . ($result["data"]["error"] ?? "Unknown error") . "\n";
        break;
    }
}

?>

Error Codes

HTTP Status Error Code Description
400 INVALID_PARAMETERS Missing or invalid request parameters
400 MISSING_PARAMETER Required parameter not provided
401 AUTHENTICATION_FAILED Invalid or missing API credentials
402 INSUFFICIENT_CREDITS Not enough credits (requires 10 credits)
403 NO_ACTIVE_SUBSCRIPTION No active subscription found
403 PRODUCT_NOT_AVAILABLE Discovery not available on your plan
403 ACCESS_DENIED Not authorized to access this resource
404 NOT_FOUND Request not found
429 RATE_LIMIT_EXCEEDED Too many requests, please slow down
500 QUEUE_ERROR Failed to queue request for processing

Callback Notifications

When you provide a callback_url, we'll send a POST request to that URL when processing completes:

POST your_callback_url
Content-Type: application/json

{
  "request_id": "a1b2c3d4e5f6...",
  "status": "completed",
  "completed": true,
  "result": {
    "entity_type": "companies",
    "query": "AI startups in healthcare that have raised Series A funding",
    "results_count": 10,
    "results": [...],
    "metrics": {
      "candidates_evaluated": 50,
      "candidates_matched": 10
    }
  }
}

Ready to Get Started?

Try the API in our interactive playground or contact us for support.

Open API Playground

Email: support@nyne.ai

Open Playground