# Knowledge Graph API - Company, People and News Data Search (`nabeelbaghoor/knowledge-graph-search-api`) Actor

Search a global knowledge graph of organizations, people and articles with a simple query language, and export structured entity records - company firmographics, employee profiles, and news with sentiment. Pay per result. Bring your own API key.

- **URL**: https://apify.com/nabeelbaghoor/knowledge-graph-search-api.md
- **Developed by:** [Nabeel Hassan](https://apify.com/nabeelbaghoor) (community)
- **Categories:** Jobs, Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$15.00 / 1,000 entity results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Knowledge Graph API - company, people and news data search

**Knowledge Graph API** turns a global knowledge graph of organizations, people and articles into a clean, structured export. Write one query, choose an entity type, and export structured records - company firmographics, employee profiles, or news with sentiment - as JSON, CSV or Excel.

Bring your own API token and pay only for the records you keep.

### Why use this actor?

- **Three entity types, one query** - search organizations (companies), people, or articles (news) from a single actor.
- **Simple query language** - filter by name, city, industry, employee count or current employer with plain fields, or drop into the advanced query for full control.
- **Structured entity output** - company name, website, employee count, industry and location; person name, current title and employer, skills and location; article title, author, source, date and sentiment - parsed into flat columns.
- **Pay per result** - you are charged only for the entity records actually returned, up to 1,000 per run.
- **No proxies, no blocks** - data comes through a stable API, so runs are fast and reliable.

### Use cases

- **Lead generation and TAM building** - build company target lists by industry, location and size.
- **People search** - find people by current employer, title or location for recruiting and sourcing.
- **Media monitoring** - pull recent articles about a company or topic with sentiment scores.
- **Market and competitor mapping** - profile the organizations in a sector and rank them by size.
- **CRM enrichment** - append firmographics and entity records to your existing accounts.

### Input

Configure everything from the visual editor - every filter is a proper field, no code needed. Example JSON input:

```json
{
  "entityType": "Organization",
  "industry": "Artificial Intelligence Companies",
  "city": "San Francisco",
  "minEmployees": 100,
  "maxResults": 50,
  "apiKey": "YOUR_API_TOKEN"
}
```

Search people at a company:

```json
{
  "entityType": "Person",
  "employer": "Google",
  "city": "London",
  "maxResults": 50,
  "apiKey": "YOUR_API_TOKEN"
}
```

Advanced query for full control:

```json
{
  "entityType": "Organization",
  "query": "industries:\"Financial Services Companies\" nbEmployees>5000",
  "maxResults": 100,
  "apiKey": "YOUR_API_TOKEN"
}
```

### Output

One clean JSON object per entity (fields depend on entity type):

```json
{
  "name": "Acme AI",
  "entityType": "Organization",
  "homepageUri": "https://acme.ai",
  "nbEmployees": 240,
  "industries": ["Artificial Intelligence Companies"],
  "city": "San Francisco",
  "country": "United States",
  "entityUri": "https://example.com/entity/EABCDEF",
  "entityId": "EABCDEF"
}
```

### Do I need an API key?

Yes. This actor calls a knowledge graph API on your behalf, which requires your own **API token**. Sign up self-serve with the provider to get a free monthly credit allowance and a token, paste it into the input, and run. Your token is stored securely and never logged.

### Pay per result

You pay only for the entity records the actor actually returns - no subscriptions, no minimums. Set **Maximum results** to cap each run's spend exactly. Each returned entity also consumes credits against your own token, so keep the cap only as high as you need.

### FAQ

#### What is the Knowledge Graph API?

It is a data API that answers structured queries against a knowledge graph of organizations, people and articles. You write a query with a simple query language, pick an entity type, and it returns matching entity records - firmographics for companies, profiles for people, and metadata plus sentiment for articles. This actor runs that search and exports the matches as JSON, CSV or Excel.

#### What entity types can I search?

Three: **Organization** (companies, with firmographics and industries), **Person** (people, with current title, employer and skills), and **Article** (news, with author, source, date and sentiment). Set the Entity type field to choose.

#### What filters can I use?

Built-in fields for name, city, industry, minimum employee count and current employer. For any other supported attribute, use the Advanced query field to pass raw query-language conditions such as `revenue>1000000000` or `educations.{institution.name:"Stanford University"}`.

#### How does the query language work?

Each condition is `attribute:value`, combined with spaces, for example `type:Organization industries:"Artificial Intelligence Companies" locations.city.name:"San Francisco"`. Numeric comparisons use operators such as `nbEmployees>5000`. Nested conditions use braces, for example `employments.{employer.name:"Google" isCurrent:true}`. The entity type is added for you from the Entity type field.

#### How many results can I get per run?

Up to 1,000 entity records per run, paged automatically. The API caps deep paging at an offset of 10,000, so for larger universes split the search by industry, location or size across multiple runs.

#### How much does it cost?

Pricing is pay-per-result: a small fixed amount per entity record returned, plus standard Apify platform usage, plus your own API credits against your token. A run that returns nothing costs almost nothing.

#### Can I run this on a schedule?

Yes. Use Apify Schedules to run it daily or weekly and connect the dataset to Zapier, Make, n8n, webhooks or the API to push new records into your CRM or data warehouse.

#### Is this legal?

The actor returns organization, people and article data retrieved through a licensed knowledge graph API using your own credentials. It focuses on business and public web data.

### Keyword map

knowledge graph api, company data api, people search api, organization data api, firmographics api, entity search api, b2b data api, lead generation api, news api, article sentiment api, company database api, query language api.

### Support and feedback

Found an issue or missing a filter? Open an issue in the **Issues** tab - it is monitored daily.

# Actor input Schema

## `entityType` (type: `string`):

Which kind of entity to search for. This sets the `type:` token of the query.

## `name` (type: `string`):

Match entities by name, e.g. a company name like `Apple` or a person name like `Jane Doe`. Adds `name:"..."` to the query.

## `city` (type: `string`):

Filter to entities located in this city, e.g. `San Francisco`. Adds `locations.city.name:"..."` to the query.

## `industry` (type: `string`):

Organizations only. Filter to a knowledge-graph industry, e.g. `Artificial Intelligence Companies` or `Financial Services Companies`. Adds `industries:"..."` to the query.

## `minEmployees` (type: `integer`):

Organizations only. Keep only companies with more than this many employees. Adds `nbEmployees>N` to the query.

## `employer` (type: `string`):

People only. Find people currently employed at this company, e.g. `Google`. Adds `employments.{employer.name:"..." isCurrent:true}` to the query.

## `query` (type: `string`):

Power users: raw query-language conditions appended to the query, e.g. `revenue>1000000000` or `educations.{institution.name:"Stanford University"}`. Do not include the leading `type:` token - it is added from the Entity type field. If this string already contains a `type:` token, it is used verbatim.

## `startFrom` (type: `integer`):

0-based result offset to start from. Increase to skip earlier results (offset + max results must stay at or below 10,000).

## `maxResults` (type: `integer`):

Stop after this many entity records (1-1,000). Paged automatically. Note: each entity record returned consumes credits against your key, so keep this only as high as you need.

## `apiKey` (type: `string`):

Your knowledge graph API token. Required. Sign up self-serve with the provider for a free monthly credit allowance and copy your token from the dashboard. Stored securely and never logged.

## Actor input object example

```json
{
  "entityType": "Organization",
  "startFrom": 0,
  "maxResults": 50
}
```

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "maxResults": 50
};

// Run the Actor and wait for it to finish
const run = await client.actor("nabeelbaghoor/knowledge-graph-search-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "maxResults": 50 }

# Run the Actor and wait for it to finish
run = client.actor("nabeelbaghoor/knowledge-graph-search-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "maxResults": 50
}' |
apify call nabeelbaghoor/knowledge-graph-search-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=nabeelbaghoor/knowledge-graph-search-api",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/acts/EMR7qIpLNBqGvpFEK/builds/iiFxkraXP7h6J5qTa/openapi.json
