Carbon Interest Graph

As part of the Carbon API, we expose a lightweight Profile view, which provides a summary of interests identified over a given time range along with demographic data.

The preferred date format is yyyy-MM-dd

The endpoint for this is:

https://api.carbon.clicksco.com/api/profiles/{profileId}/interests/{date-from}/{date-to}

Example:

https://api.carbon.clicksco.com/api/profiles/123/interests/2018-01-01/2018-03-01

This endpoint provides the same data a user would see in the Carbon Dashboard, with the ability to filter interests by date range.

Sample response:

{
  "interests": [
    {
      "category": "personal finance",
      "subCategories": ["investing"],
      "discovered": "2017-08-16T12:37:33.1303457+00:00",
      "lastUpdated": "2018-02-22T13:36:32.1844777+00:00"
    },
    {
      "category": "consumer electronics",
      "subCategories": ["digital cameras"],
      "discovered": "2017-09-06T09:47:33.1671569+00:00",
      "lastUpdated": "2018-01-30T10:09:20.0928644+00:00"
    },
    {
      "category": "indoor living",
      "subCategories": ["bedding"],
      "discovered": "2017-10-23T16:19:56.9362104+00:00",
      "lastUpdated": "2018-01-22T11:42:28.1197343+00:00"
    },
    {
      "category": "cameras",
      "subCategories": ["digital cameras"],
      "discovered": "2017-09-05T13:51:22.7964887+00:00",
      "lastUpdated": "2018-01-22T11:03:04.7270989+00:00"
    }
  ],
  "demographic": {
    "gender": {
      "result": {
        "data": "Female",
        "confidence": 40
      }
    },
    "lifeStage": {
      "result": {
        "data": "Parent",
        "confidence": 40
      }
    }
  }
}

Carbon Profile ID

In order to obtain the carbon ID for a user, you can use this example JavaScript function:

window._ccReady = window._ccReady || [];
window._ccReady.push(function (result) {
  console.log(result.user.id); // Returns the current userID, pass this into the API call.
});