Entity Search

Introduction

This guide focuses on how to utilize the Entity Search endpoint. Entity Search is a powerful tool for discovering entities or records of interest within the Sayari Knowledge Graph, primarily designed for lead-generation activities.

For entity matching at scale, we recommend utilizing the Resolution Matching endpoint.

Getting Started

1

Basic Search Structure

Entity Search supports both GET and POST methods. Both examples below are equivalent:

1GET /v1/search/entity?q=Apple
2
3POST /v1/search/entity
4{
5 "q": "Apple"
6}

The request will search against all available fields: name, address, identifier, business_purpose, and contact information.

GET requests require URL encoding of all search arguments (e.g., foo OR (bar~5) becomes foo%20OR%20(bar~5)).

3

Apply Filters

Further refine your results using filters:

1{
2 "q": "Apple",
3 "fields": ["name"],
4 "filter": {
5 "entity_type": ["company"],
6 "country": ["USA"]
7 }
8}
4

Include Facets

Add facets to analyze your filtered results by country, source, and entity type:

1{
2 "q": "Apple",
3 "fields": ["name"],
4 "filter": {
5 "entity_type": ["company"],
6 "country": ["USA"]
7 },
8 "facets": true
9}
5

Submit the Query

1curl -X POST "https://api.sayari.com/v1/search/entity" \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "q": "apple",
6 "fields": ["name"],
7 "filter": {
8 "entity_type": ["company"],
9 "country": ["USA"]
10 },
11 "advanced": false,
12 "facets": true
13}'

Ready to learn about advanced search capabilities? Visit our Advanced Search Guide for details on using Lucene Query Syntax and complex search techniques.

Key Concepts

Corporate Extensions

Global company corporate extension terms that appear in names such as: Inc, LLC, private company, or s.a.g.r are treated as stop words / noise, and do not factor into matching logic.

Response Ranking

Entity Search prioritizes connections; entities with a higher degree (number of relationships) will be sorted to the top.

1{
2 "data": [
3 {
4 "id": "WS1zKrBef9JXaSL3BTk6Eg",
5 "label": "Apple Incorporated",
6 "degree": 81
7 }
8 ]
9}

Result Explainability

Sayari entities are resolved via multiple sources, resulting in arrays of attributes. The matches segment helps you understand which terms matched against the entity’s attributes.

1{
2 "matches": {
3 "name": [
4 "<em>Apple</em> Inc",
5 "<em>Apple</em> Incorporated"
6 ],
7 "address": [
8 "ONE APPLE PARK WAY, <em>Cupertino</em>, CA, 95014"
9 ]
10 }
11}