glint API version 2.2.1

The glint API enables partners to access data from glint systems programmatically. This API follows the OAuth 2.0 specification - before using this API please read the OAuth 2.0 documentation here: https://oauth.net/2/.

This API supports two grant types - authorization_code and client_credentials. Please contact glint for information on which grant type(s) you are authorised to use.


Authentication

Get an authorization code

If you use the authorization_code grant, you must complete this step to get an authorization code. If you use the client_credentials grant you do not need this step.

Visit the following URL in a browser to authenticate: https://api.glint.ai/oauth/authorize?client_id=YOUR_CLIENT_ID&response_type=code&scope=SCOPE1+SCOPE2

Once you have logged in you will be redirected to https://glint.ai/?code=AUTHORISATION_CODE where AUTHORISATION_CODE is the code you will need to retrieve an access token.


Get an access token POST

Access tokens are required to access protected resources. Access tokens are short lived - when they expire you should use your refresh token to get a new access token.

POST https://api.glint.ai/oauth/token

Request

Parameter Type Position # Description
Authorization String Header Required A basic authorisation String generated from your client id and client secret.
grant_type String Body Required authorization_code or client_credentials
redirect_uri String Body Required Should be set to https://glint.ai
code String Header Optional Your authorization code. Not required with the client_credentials grant type.

Response

{
  "access_token": "access-token",
  "expires_in": 3599,
  "scope": "the-scope",
  "token_type": "Bearer",
  "refresh_token": "refresh-token"
}

Use a refresh token POST

When your access token expires you can use your refresh token to create a new one. Using a refresh token is preferred over re-authenticating as it can be automated.

POST https://api.glint.ai/oauth/token

Request

Parameter Type Position # Description
Authorization String Header Required A basic authorisation String generated from your client id and client secret.
grant_type String Body Required refresh_token
refresh_token String Body Required Your refresh token

Response

{
  "access_token": "access-token",
  "expires_in": 3599,
  "scope": "the-scope",
  "token_type": "Bearer"
}

Results

Get results GET

Get a list of results currently stored in the system. The response fields will vary according to the permissions granted, but shall be similar to the example. Use your access token from the steps above for the authorization header.

GET https://api.glint.ai/data/results

Required scope: read_results

Request

Parameter Type Position # Description
Authorization String Header Required Bearer {access-token}
page Integer Body Required The page number. Zero based.
hours Integer Body Optional The number of hours you want to search. For example, for results from the last day this should be set to 24. Maximum value 72.
sandbox Boolean Body Optional Set sandbox mode. Defaults to false.
searchTerm String Body Optional Filter results by search term.
searchTermId Integer Body Optional Filter results by search term id.
type Integer Body Optional The type of result. See Result types for a list of available types. Defaults to all results.
flagged Boolean Body Optional Choose whether or not to return flagged results. Defaults to false.

Example response

[{
	"dateFound": "10-06-2021 06:06",
	"pageTitle": "Page Title",
	"searchTerm": "Title",
	"infringingUrl": "https://infringing-domain.com/123",
	"infringingUrlDomain": "infringing-domain.com",
	"infringingUrlLinkStatus": "UP"
}, {
	"dateFound": "10-06-2021 06:06",
	"pageTitle": "Page Title",
	"searchTerm": "Title",
	"infringingUrl": "https://infringing-domain.com/123",
	"infringingUrlDomain": "infringing-domain.com",
	"infringingUrlLinkStatus": "UP"
}]

Search terms

Get search terms GET

Get a list of search terms stored in the system. The response fields will vary according to the permissions granted, but shall be similar to the example. Use your access token from the steps above for the authorization header.

GET https://api.glint.ai/data/search-terms

Required scope: write_search_terms

Request

Parameter Type Position # Description
Authorization String Header Required Bearer {access-token}
page Integer Body Required The page number. Zero based.
sandbox Boolean Body Optional Set sandbox mode. Defaults to false.
search String Body Optional Search query
type Integer Body Optional The type of result. See Result types for a list of available types.

Example response

[{
	"id": 123456,
	"added": "10-06-2021 06:06",
	"searchTerm": "Title",
	"type": 1
}, {
	"id": 123457,
	"added": "10-06-2021 06:06",
	"searchTerm": "Title",
	"type": 1
}]

Create search term PUT

Add a search term to the system. Use your access token from the steps above for the authorization header.

PUT https://api.glint.ai/data/search-terms/create

Required scope: write_search_terms

Request

Parameter Type Position # Description
Authorization String Header Required Bearer {access-token}
searchTerm String Body Required The search term
type Integer Body Required The type of result to search for. See Result types for a list of available types.
sandbox Boolean Body Optional Set sandbox mode. Defaults to false.
keyTerms String Body Optional A comma separated list of key terms. Key terms are used by the system to consider a result a match. Max 400 characters.
blockTerms String Body Optional A comma separated list of block terms. Block terms are used by the system to consider a result a no match. Max 400 characters.
priorityTerms String Body Optional A comma separated list of priority terms. Priority terms are used by the system to consider a result a "priority result". Max 400 characters.
useRegex Boolean Body Optional Look for regular expressions in term lists. Defaults to false.

Example response

[{
	"success": true,
	"message": ""
}]

Update search term POST

Update an existing search term. Use your access token from the steps above for the authorization header.

POST https://api.glint.ai/data/search-terms/update

Required scope: write_search_terms

Request

Parameter Type Position # Description
Authorization String Header Required Bearer {access-token}
id Integer Body Required The ID of the search term to update.
sandbox Boolean Body Optional Set sandbox mode. Defaults to false.
searchTerm String Body Optional The search term
type Integer Body Optional The type of result to search for. See Result types for a list of available types.
keyTerms String Body Optional A comma separated list of key terms. Key terms are used by the system to consider a result a match. Max 400 characters.
blockTerms String Body Optional A comma separated list of block terms. Block terms are used by the system to consider a result a no match. Max 400 characters.
priorityTerms String Body Optional A comma separated list of priority terms. Priority terms are used by the system to consider a result a "priority result". Max 400 characters.
useRegex Boolean Body Optional Look for regular expressions in term lists.

Example response

[{
	"success": true,
	"message": ""
}]

Delete search term DELETE

Delete a particular search term in the system. Use your access token from the steps above for the authorization header.

DELETE https://api.glint.ai/data/search-terms/delete

Required scope: write_search_terms

Request

Parameter Type Position # Description
Authorization String Header Required Bearer {access-token}
id Integer Body Required The ID of the search term you wish to delete
sandbox Boolean Body Optional Set sandbox mode. Defaults to false.

Example response

[{
	"success": true,
	"message": ""
}]

Statistics

Get statistics GET

Get statistics from the system. Multiple statistics can be requested at a time (up to a maximum determined on a per client basis). Use your access token from the steps above for the authorization header.

GET https://api.glint.ai/data/statistics

Required scope: statistics

Request

Parameter Type Position # Description
Authorization String Header Required Bearer {access-token}
statistics String Body Required A comma separated list of statistics.
hours Integer Body Optional The number of hours you want to search. For example, for results from the last day this should be set to 24. Maximum value 72.

Example response

[
    {
        "TOTAL_LINKS_REPORTED": "1234",
        "TOTAL_LINKS_FOUND": "1234",
        "TOTAL_LINKS_REMOVED": "1234",
        "TOTAL_LINKS_REMAINING": "1234"
    }
]

Reference

Result types

The type field enables you to filter the type of result. This field is always optional - the following table shows the different result types currently available for this API. Contact glint for type(s) available to your account.

type description
13 Social profiles
21 Dark web