ContentGems Developer Documentation

Developer documentation home

API documentation

Website widget documentation

ContentGems web app

API info page

Domains

This endpoint allows you to retrieve the ContentGems domain_id for a given Domain. This is used for blocking Recommendations from certain Domains.

Please follow this procedure for every Domain you want to block:

Resource URL

GET https://contentgems.com/api/v1/domains/lookup_id.json

Request Parameters

NameDescriptionOptional, required, defaults
domain_nameThe name of the domain. The primary domain contentgems.com is considered different from the subdomain www.contentgems.com. This parameter is case insensitive.Required

Response Attributes

The response is a Domain JSON object with the following attributes:

NameDescription
domain_nameThe name of the domain after it has been normalized by ContentGems.
domain_idThe id of the domain if it exists. Otherwise null.
errorAn error message if there is a problem handling the request.

Example

Request:

GET https://contentgems.com/api/v1/domains/lookup_id.json?domain_name=ContentGems.com

Response:

{
  "domain_name": "contentgems.com",
  "domain_id": 962209
}