Authentication

Access the Sayari API using JSON Web Token (JWT) access tokens. Set CLIENT_ID and CLIENT_SECRET to obtain a bearer token.

Interested and need credentials? Fill out this form and our team will get in touch.

Example 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"
>}
>'

Example token response

1{
2 "access_token": "sk_test_4eC39HqLyjWDarjtT1zdp7dc",
3 "expires_in": 86400,
4 "token_type": "Bearer"
5}

Token usage

  • Valid for 24 hours; renew as needed.
  • Include the token in the Authorization header for API requests.

Example request

$curl 'https://api.sayari.com/search/entity?q=china' -H"Authorization: Bearer sk_test_4eC39HqLyjWDarjtT1zdp7dc"