For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LearnGraph LoginRequest a Demo
HomeAPIBulk DataSayari LibraryChange Log
  • Key Concepts
    • Introduction
    • Endpoint Overview
    • Authentication
    • Requests
    • Pagination
    • Response Status Codes
    • Data Types
    • Rate Limits
  • API Clients
    • Overview
    • Open API
    • Postman
    • Go
    • Python
    • Node
  • API Reference
  • Guides
    • Getting Started
    • Understanding Project Entity
    • Risk Factors
    • Entity Search
    • Advanced Entity Search
    • Resolution
    • Trade Search - Shipments
    • Trade Search - Suppliers & Buyers
    • v0 Migration
  • Implementation Patterns
    • Project Entity Supply Chain
  • Use Cases
    • Entity Screening & Verification
    • Investigations
LogoLogo
LearnGraph LoginRequest a Demo
On this page
  • Overview
  • Getting an Access Token
  • Using Your Token
  • Token Management
Key Concepts

Authentication

Access the Sayari API using JWT bearer tokens
Was this page helpful?
Previous

Requests

Next
Built with

Overview

The Sayari API uses OAuth 2.0 client credentials flow with JWT access tokens for authentication.

Getting an Access Token

Use your client credentials to obtain a bearer token via the authentication endpoint:

Token Request
$curl --request POST \
> --url https://api.sayari.com/oauth/token \
> --header 'accept: application/json' \
> --header 'content-type: application/json' \
> --data '{
> "client_id": "$CLIENT_ID",
> "client_secret": "$CLIENT_SECRET",
> "audience": "sayari.com",
> "grant_type": "client_credentials"
>}'
Token Response
1{
2 "access_token": "YOUR_ACCESS_TOKEN",
3 "expires_in": 86400,
4 "token_type": "Bearer"
5}

Using Your Token

Include the access token in the Authorization header for all API requests:

Authenticated Request
$curl 'https://api.sayari.com/search/entity?q=china' \
> -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Token Management

  • Lifetime: Tokens expire after 24 hours
  • Storage: Store tokens securely; never expose in client-side code