Introduction
Welcome to the Socialmetrix Quantum API! Quantum provides relevant information about audience behavior through actionable metrics focused in quantitative analysis, allowing you to designate which actions need to be taken to meet your goals.
This documentation will help you through Quantum API, all its functionalities and endpoints, to make sure you have the best experience with our product.
Understand Information Organization
Your Account is the top element on the structure, as an Account Owner you can create all elements
Accessing your account, you can create several projects, on each project you can load profiles for Facebook, Twitter, YouTube and Instagram, on each profile you can query specific metrics for the Social Network, also you can add content to a campaign and access those as consolidate metrics.
URL Structure
Currently our API is on version 1 and all HTTP requests are made using this base: https://api.quantum.socialmetrix.com/v1
.
Authentication
This API relies on Json Web Token (JWT) as autorization/authentication mechanism, to issue a JWT you will need your Quantum API Secret.
Getting your API Secret
Follow these steps to obtain your API secret:
1) Login at Socialmetrix Quantum using Facebook or Twitter and go to Settings:
2) Select the API tab and copy your API Secret:
Issuing a Json Web Token
You need POST a json containing the "method": “API-SECRET”
and your secret
.
curl -XPOST 'https://api.quantum.socialmetrix.com/login' \
-H "Content-Type: application/json" \
-d '{ "method":"API-SECRET",
"secret":"0220a22d27be69e4.........54aa9840e5c4136e"}'
A valid response will contains relevant data of your account:
{
"jwt": "eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJTTVgiLCJpYXQiOjE0.......zdkOGY5ZDFiMjM0ZiIsIm1ldGhvZCI6IkFwaVNlY3JldExvZ2luIn19.wcHGZaXN.......wMWAC7Vzg3r6I1jREqF_oIV8",
"user": {
"id": "806d642b4a6.......937d8f9d1b234f",
"firstName": "John",
"lastName": "Smith",
"email": "jsmith@socialmetrix.com",
"timezone": "America/New_York",
"role": "OWNER",
"facebookAuth": {
"userId": "557905121"
},
"twitterAuth": {
"userId": "15092087"
},
"accountId": 790,
"projectIds": [],
"createdAt": "2015-07-23T19:53:13Z",
"lastLogin": "2016-11-25T01:55:31Z"
}
}
Response
From the response json you’ll receive a lot information about the user, for authentication purposes, the most important values are:
Field | Description | Example |
---|---|---|
accountId | All requests originates from an account | 790 |
jwt | The authentication token | eyJhbGc… |
Storing JWT for convenience
Store the value of jwt
on a variable, so you can follow along all the next examples without having to constantly edit each line:
export JWT='eyJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJTTVgiLCJpYXQiOjE0....'
export ACCOUNT=790
Projects
Any metric, profile or campaigns belongs to a project, so we need to known which project we want to work with. As our first interaction with the API.
List all projects
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}/projects" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
[
{
"id": 0,
"name": "Demo",
"createdAt": "2016-11-17T09:58:51Z",
"accountId": 790,
"isDemo": true,
"brands": [
... omitted ...
]
},
{
"id": 2,
"name": "Telecom US Market",
"createdAt": "2014-10-17T19:18:01Z",
"accountId": 790,
"isDemo": false,
"brands": [
... omitted ...
]
}
]
This endpoint has a complete list of projects and its profiles.
HTTP Request
GET /accounts/<ACCOUNT>/projects
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
Response
The response contains an array of projects (object) with an id, name and another array brands containing profiles:
Field | Description | Example |
---|---|---|
id | The project ID | 0 |
name | The project name, given by the user | Demo |
brands | An array containing all profiles belonging to this project |
Project Detail
# Selecting the Demo Project (id=0)
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}/projects/0" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"id": 0,
"name": "Demo",
"createdAt": "2016-10-07T22:22:16Z",
"accountId": 1896,
"isDemo": true,
"brands": [
{
"sourceType": "TWITTER",
"id": "TWITTER_415859364",
"name": "Nike",
"source": {
"kind": "TWITTER",
"id": "415859364",
"url": "http://twitter.com/Nike"
},
"nextFetch": 0,
"crawlingData": {
"initialCrawlingDate": 1415119279,
"disabled": false
},
"screenName": "Nike",
"status": "1",
"icon": "https://pic.socialmetrix.com/twitter/415859364/picture"
},
{
"sourceType": "FACEBOOK",
"id": "FACEBOOK_15087023444",
"name": "Nike",
"source": {
"kind": "FACEBOOK",
"id": "15087023444",
"url": "http://www.facebook.com/nike"
},
"nextFetch": 0,
"crawlingData": {
"initialCrawlingDate": 1399989600,
"disabled": false
},
"username": "nike",
"hasParent": false,
"status": "1",
"icon": "https://pic.socialmetrix.com/facebook/15087023444/picture"
},
{
"sourceType": "YOUTUBE",
"id": "YOUTUBE_UCUFgkRb0ZHc4Rpq15VRCICA",
"name": "Nike",
"source": {
"kind": "YOUTUBE",
"id": "UCUFgkRb0ZHc4Rpq15VRCICA",
"url": "https://www.youtube.com/channel/UCUFgkRb0ZHc4Rpq15VRCICA"
},
"nextFetch": 0,
"crawlingData": {
"initialCrawlingDate": 1441304646,
"disabled": false
},
"status": "1",
"icon": "https://pic.socialmetrix.com/youtube/UCUFgkRb0ZHc4Rpq15VRCICA/picture"
},
{
"sourceType": "INSTAGRAM",
"id": "INSTAGRAM_13460080",
"name": "nike",
"source": {
"kind": "INSTAGRAM",
"id": "13460080",
"url": "https://instagram.com/nike/"
},
"nextFetch": 0,
"crawlingData": {
"initialCrawlingDate": 1423748093,
"disabled": false
},
"username": "nike",
"status": "1",
"icon": "https://pic.socialmetrix.com/instagram/13460080/picture"
}
]
}
This endpoint gives you information about the selected project. Including all profiles that belongs to this project. Knowing the source.id
value is necessary to request metrics.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | The ID of desired project | 0 |
Response
Besides the id and name of the project, the most relevant part of response is the brands array of object which contains profiles:
Field | Description | Example |
---|---|---|
id | A composite ID containing the source and its id | INSTAGRAM_13460080 |
name | Name of the Social Profile | Nike |
icon | Social Profile Icon/Photo url | https://pic.socialmetrix… |
username / screenName | Username or Screen Name for the Profile | nike |
source | Object containing profile’s meta-data | |
crawlingData | Object containing crawling meta-data |
Source Object
Field | Description | Example |
---|---|---|
id | ID on the social network | 13460080 |
kind | Supported social network, currently can be: FACEBOOK, TWITTER, YOUTUBE, INSTAGRAM | |
url | social network’s profile url | https://instagram.com/nike/ |
crawlingData Object
Field | Description | Example |
---|---|---|
initialCrawlingDate | epoch representation when data becomes available for this profile | 1423748093 |
disabled | If true this profile is not active |
false |
All metrics belonging to Facebook will be displayed on the endpoints explained here.
fb.Profile Summary
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/stat-summary?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query": {
"id": "/accounts/1896/projects/0/facebook/profiles/stat-summary",
"filters": {
"timezone": "America/Argentina/Buenos_Aires",
"ids": [
"182162001806727",
"15087023444"
],
"since": "2016-09-09",
"until": "2016-10-08"
}
},
"results": [
{
"id": "182162001806727",
"data": {
"current": {
"totalFans": 22611837,
"newFans": 172184,
"newPosts": 34,
"newInteractions": 94045,
"engagementRate": 0.0041750576
},
"previous": {
"totalFans": 22439653,
"newFans": 208958,
"newPosts": 29,
"newInteractions": 28519,
"engagementRate": 0.0012755521
}
}
},
{
"id": "15087023444",
"data": {
"current": {
"totalFans": 27003826,
"newFans": 289127,
"newPosts": 1,
"newInteractions": 8833,
"engagementRate": 0.0003281974
},
"previous": {
"totalFans": 26722160,
"newFans": 1844729,
"newPosts": 16,
"newInteractions": 447742,
"engagementRate": 0.017771263
}
}
}
]
}
This endpoint brings all the facebook pages that are listed on the project, among with the info about them. Here you can check the total number of fans, new fans, new posts, new interactions and the engagement rate of all the pages that were added to the account.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/stat-summary
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
totalFans | Number of fans (net) at the end of the selected period | 22611837 |
newFans | Number of fans gained in the selected period | 172184 |
newPosts | Posts created during the selected period. It is the sum of Admin and User Posts | 34 |
newInteractions | Sum of likes, comments and shares generated during the selected period | 94045 |
engagementRate | This indicator measures what portion of the page’s audience, engaged with the published content | 0.0041750576 |
fb.Profile Interactions
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/0/facebook/profiles/interactions/count/interaction-type?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query": {
"id": "/accounts/ACCOUNT/projects/PROJECT/facebook/profiles/interactions/count/interaction-type",
"filters": {
"timezone": "America/Argentina/Buenos_Aires",
"ids": [
"182162001806727",
"15087023444"
],
"since": "2016-09-09",
"until": "2016-10-08"
}
},
"results": [
{
"id": "15087023444",
"data": {
"current": {
"likes": 6920,
"comments": 655,
"shares": 1258,
"interactions": 8833
},
"previous": {
"likes": 291808,
"comments": 8313,
"shares": 147621,
"interactions": 447742
}
}
},
{
"id": "182162001806727",
"data": {
"current": {
"likes": 83275,
"comments": 2519,
"shares": 8251,
"interactions": 94045
},
"previous": {
"likes": 24525,
"comments": 680,
"shares": 3314,
"interactions": 28519
}
}
}
]
}
This endpoint gives a sum of all interactions metrics (likes, shares, comments) that belongs to the selected profiles.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/interactions/count/interaction-type
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
likes | Sum of likes over posts in the selected period | 83275 |
comments | Sum of comments over posts in the selected period | 2519 |
shares | Sum of shares over posts in the selected period | 3314 |
interactions | Sum of likes, comments and shares generated during the selected period | 94045 |
fb.Profile Post Ranking by Interactions
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/0/facebook/profiles/posts/ranking/interactions?\
ids=15087023444&since=2016-09-09&until=2016-10-08&owner=admin" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query": {
"id": "/accounts/790/projects/0/facebook/profiles/posts/ranking/interactions",
"filters": {
"timezone": "America/Argentina/Buenos_Aires",
"ids": [
"15087023444"
],
"since": "2016-09-09",
"until": "2016-10-08"
}
},
"results": [
{
"id": "15087023444",
"data": [
{...},
{...},
{...},
{
"campaignInfo": null,
"contentInfo": {
"category": "post",
"id": null,
"sourceId": null,
"contentCreatedTime": null
},
"id": "15087023444_10154080895133445",
"type": 247,
"message": "Brilliant as individuals. Unstoppable as a nation. Unlimited Together. #justdoit",
"permalink": "http://www.facebook.com/15087023444/posts/10154080895133445",
"attachment": "{\"picture\":\"https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/14022109_10154080895133445_9205327802348821423_n.jpg?oh=50a3f784512782346243c4eab8eb473a&oe=5845ACE9\",\"description\":\"Brilliant as individuals. Unstoppable as a nation. Unlimited Together. #justdoit\",\"name\":\"Timeline Photos\",\"link\":\"https://www.facebook.com/nike/photos/a.440612488444.242105.15087023444/10154080895133445/?type=3\"}",
"user": {
"id": "15087023444",
"name": "Nike",
"comments": 0,
"posts": 0
},
"pageId": "15087023444",
"createdTime": "2016-08-20T20:12:36-03:00",
"lastInteractionTime": null,
"stats": {
"likes": 374,
"comments": 24,
"shares": 43,
"engagementRate": 1.6385718e-05,
"interactions": 441
},
"adStatus": "promoted"
},
{...},
{...},
{...},
{...},
{...},
{...}
]
}
]
}
This endpoint brings the top ten posts with the most interactions in the selected period (regardless if the post was created on the selected range).
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/posts/ranking/interactions
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
owner | Filter the creators of posts, you can see Page’s Admin (admin ) or Page’s Audience (user ) |
user |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The results
is array of objects, it contains an id
field which identifies the profile id and the data
array contains a top 10 ordered list from the most popular to least popular by the number of interactions. The content fields are related to Facebook Post official doc.
Field | Description | Example |
---|---|---|
id | Post Id on the social network | 15087023444_10154216095368445 |
type | Kind of posts. link , status , photo , video |
247 |
message | Text of the original post | Brilliant as individuals. Unstoppable as a nation. Unlimited Together. #justdoit |
permalink | The permanent link to Facebook | http://www.facebook.com/… |
attachment | An object containing meta-data of the post. It includes picture, link to the photo, etc | |
user | Contains information about the post’s owner. Like Id and Name |
"name": "Nike" |
pageId | The page Id where this post belongs | 15087023444 |
createdTime | Date and Time of the post creation. Adjusted to your Time-zone | 2016-08-20T20:12:36-03:00 |
adStatus | Automatic detection of the kind of posts organic or promoted |
promoted |
stats | Object containing the interactions for the post, that occurred on the selected period |
stats object
Field | Description | Example |
---|---|---|
likes | Sum of Likes of the post in the selected period | 374 |
comments | Sum of Comments of the post in the selected period | 24 |
shares | Sum of Shares of the post in the selected period | 43 |
engagementRate | Engagement Rate of the post in the selected period | 1.6385718e-05 |
interactions | Sum of interactions of the post in the selected period | 441 |
fb.Post Count by Date
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/posts/count/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08&\
owner=admin&type=link" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/1896/projects/0/facebook/profiles/posts/count/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"182162001806727"
],
"since":"2016-10-30",
"until":"2016-11-28"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"182162001806727",
"data":[
1,
1,
1,
1,
1,
2,
1,
... omitted ...
],
"currentTotal":26,
"previousTotal":30
}
]
}
This endpoint gives information about the quantity of posted content from a Facebook page in a given period day by day, it also provides a sum of current period activity and previous period activity. The analysis can be filtered by whom created the content owner and by content type.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/posts/count/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
owner | (Optional): Filter posts only from the page owner admin or by the audience user |
admin |
type | (Optional): Filter posts by its type:status , link , photo , video .If value is missing all types will be used |
photo |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing a Time Series with an element for each day of the selected period, so the first element is the value for date passed as since and the last element is the value for until.
Field | Description | Example |
---|---|---|
id | ID of the social profile | 182162001806727 |
data | Daily variations of posts published, each element represents a day | [1,1,2,1,3,3] |
currentTotal | Total posts published during the current period | 26 |
previousTotal | Total posts published during the previous period | 20 |
fb.Post Count by Type
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/posts/count/type?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/posts/count/type",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"32654646532"
],
"since":"2016-10-30",
"until":"2016-11-28"
}
},
"results":[
{
"id":"182162001806727",
"data":{
"current":{
"statuses":0,
"links":0,
"videos":8,
"photos":18
},
"previous":{
"statuses":0,
"links":0,
"videos":13,
"photos":17
}
}
}
]
}
This endpoint gives information about the quantity of current and previously posted content from a Facebook page according to their type: statuses, links, videos or photos.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/posts/count/type
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
owner | Owner of the project | admin |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
statuses | Current or previously posted statuses. | 18 |
links | Current or previously posted links. | 20 |
videos | Current or previously posted videos. | 15 |
photos | Current or previously posted photos. | 12 |
fb.Post Count by Weekday by Hour
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/posts/count/weekday/hour?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/profiles/posts/count/weekday/hour",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"18216234235326727"
],
"since":"2016-10-30",
"until":"2016-11-28"
}
},
"results":[
{
"id":"18216234235326727",
"data":[
[
0,
0,
... omitted ...
],
[
0,
1,
... omitted ...
],
[
0,
0,
... omitted ...
],
[
0,
0,
... omitted ...
],
[
0,
1,
... omitted ...
],
[
0,
0,
... omitted ...
],
[
0,
0,
... omitted ...
]
]
}
]
}
This endpoint gives information about the quantity of posted content from a Facebook page for each day of the week, each hour of the day. The array on data field contains the values of our Time Series, for each day of the selected period, so the first element is the value for date passed as since
and the last element is the value for until
. You probably want to use these information together to generate a table o chart.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/posts/count/weekday/hour
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
owner | Owner of the project | admin |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing a Time Series with an element for each day of the selected period, so the first element is the value for date passed as since and the last element is the value for until.
Field | Description | Example |
---|---|---|
data | Each array stands for one day of the week. | [0,0,0,0,0,0,0,0,0,0,0,0,0,1…] |
data | Each line stands for one hour of the day. | 1 |
fb.Post Interactions by Date
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/interactions/count/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/1896/projects/0/facebook/profiles/interactions/count/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"1842342346727"
],
"since":"2016-10-30",
"until":"2016-11-28"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"1842342346727",
"data":[
{
"likes":22336,
"comments":297,
"shares":3209,
"engagementRate":0.0015449481,
"interactions":25842
},
{
"likes":2537,
"comments":64,
"shares":621,
"engagementRate":1.9262529E-4,
"interactions":3222
},
{
"likes":4207,
"comments":132,
"shares":591,
"engagementRate":2.9473702E-4,
"interactions":4930
},
{
"likes":1799,
"comments":24,
"shares":192,
"engagementRate":1.20465535E-4,
"interactions":2015
}
],
"currentTotal":{
"likes":111616,
"comments":2606,
"shares":19102,
"engagementRate":0.007970693,
"interactions":133324
},
"previousTotal":{
"likes":101317,
"comments":1710,
"shares":9532,
"engagementRate":0.004969201,
"interactions":112559
}
}
]
}
This endpoint gives the number of likes, comments, shares, interactions and the engagement rate of a Facebook page for each day of the selected period. The array on data field contains the values of our Time Series, for each day of the selected period, so the first element is the value for date passed as since
and the last element is the value for until
. You probably want to use these information together to generate a table o chart.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/interactions/count/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
owner | Owner of the project | admin |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing a Time Series with an element for each day of the selected period, so the first element is the value for date passed as since and the last element is the value for until.
Field | Description | Example |
---|---|---|
likes | The number of likes in a date of the selected period. | 111616 |
comments | The number of comments in a date of the selected period. | 2606 |
shares | The number of shares in a date of the selected period. | 19102 |
engagementRate | The engagement rate of the page in a date of the selected period. | 0.007970693 |
interactions | Sum of likes, comments and shares generated during a date of the selected period. | 133324 |
fb.Fans Count by Date
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/fans/count/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/fans/count/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"182162321546727"
],
"since":"2016-10-30",
"until":"2016-11-28"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"182162321546727",
"data":[
7259,
6056,
3488,
-8587420,
-2861409
... omitted ...
],
"currentTotal":-11343999,
"previousTotal":188739
}
]
}
This endpoint gives the number of fans of a Facebook page for each day of the selected period. The array on data field contains the values of our Time Series, for each day of the selected period, so the first element is the value for date passed as since
and the last element is the value for until
. You probably want to use these information together to generate a table o chart.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/fans/count/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing a Time Series with an element for each day of the selected period, so the first element is the value for date passed as since and the last element is the value for until.
Field | Description | Example |
---|---|---|
data | Each line stands for the number of fans on a date of the selected period. | 7259 |
fb.Fans Count by Country
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/fans/count/country/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/fans/count/country/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"444462001806727"
],
"since":"2016-10-30",
"until":"2016-11-28"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"182162001806727",
"data":[
{
"id":"DE",
"data":[
{
"newFans":149,
"uniqueUsers":686
},
{
"newFans":32,
"uniqueUsers":593
},
... omitted ...
]
{
]
}
This endpoint brings information about new fans and unique users of a Facebook page on a selected period according to their country. Every country has an ID and the array on data field contains the values of our Time Series, for each day of the selected period, so the first element is the value for date passed as since
and the last element is the value for until
. You probably want to use these information together to generate a table o chart.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/fans/count/country/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing a Time Series with an element for each day of the selected period, so the first element is the value for date passed as since and the last element is the value for until.
Field | Description | Example |
---|---|---|
newFans | Number of new fans on the selected date. | 32 |
uniqueUsers | Number of unique users on the selected date. | 593 |
fb.User Ranking
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/users/ranking/comments?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/users/ranking/comments",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"1822115806727"
],
"since":"2016-10-30",
"until":"2016-11-28"
}
},
"results":[
{
"id":"1822115806727",
"data":[
{
"id":"413531845481303",
"name":"Juan Perez",
"comments":11,
"posts":0
},
{
"id":"1775081599427091",
"name":"Maria Gonzalez",
"comments":9,
"posts":0
},
{
"id":"1439934276307218",
"name":"Diego Lopez",
"comments":4,
"posts":0
}
]
}
]
}
This endpoint returns a ranking of the most active users on a Facebook page, bringing the number of comments and posts they’ve created in a selected time period, alongside with their name
and ID
.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/users/ranking/comments
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing the name, number of posts and number of comments made by the most active users of the page during the selected time period, starting from the date selected in since
and ending the date selected in until
.
Field | Description | Example |
---|---|---|
id | The user’s ID. | 413531845481303 |
name | The user’s name | Maria Gonzalez |
comments | The number of comments that the user has posted on the page. | 9 |
posts | The number of posts that the user has created on the page. | 0 |
fb.Profile Interactions
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/0/facebook/profiles/interactions/count/interaction-type?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query": {
"id": "/accounts/ACCOUNT/projects/PROJECT/facebook/profiles/interactions/count/interaction-type",
"filters": {
"timezone": "America/Argentina/Buenos_Aires",
"ids": [
"182162001806727",
"15087023444"
],
"since": "2016-09-09",
"until": "2016-10-08"
}
},
"results": [
{
"id": "15087023444",
"data": {
"current": {
"likes": 6920,
"comments": 655,
"shares": 1258,
"interactions": 8833
},
"previous": {
"likes": 291808,
"comments": 8313,
"shares": 147621,
"interactions": 447742
}
}
},
{
"id": "182162001806727",
"data": {
"current": {
"likes": 83275,
"comments": 2519,
"shares": 8251,
"interactions": 94045
},
"previous": {
"likes": 24525,
"comments": 680,
"shares": 3314,
"interactions": 28519
}
}
}
]
}
This endpoint gives a sum of all interactions metrics (likes, shares, comments) that belongs to the selected profiles.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/interactions/count/interaction-type
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
likes | Sum of likes over posts in the selected period | 83275 |
comments | Sum of comments over posts in the selected period | 2519 |
shares | Sum of shares over posts in the selected period | 3314 |
interactions | Sum of likes, comments and shares generated during the selected period | 94045 |
fb.Post Content
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/${PROFILE}/posts?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/profiles/PROFILE/posts",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"1921622154547"
],
"since":"2016-10-30",
"until":"2016-11-28"
}
},
"results":[
{
"campaignInfo":null,
"contentInfo":{
"category":"post",
"id":null,
"sourceId":null,
"contentCreatedTime":null
},
"id":"182162001806727_1288808291142087",
"type":247,
"message":"Find mental strength for the journey ahead. #FindFocus #ZNE",
"permalink":"http://www.facebook.com/182162001806727/posts/1288808291142087",
"attachment":"{\"picture\":\"https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/15241949_1288808291142087_7864157418689005368_n.jpg?oh=4c8a94f25c2ddff3b1cf2a55ccd83102&oe=58D016B5\",\"description\":\"Find mental strength for the journey ahead. #FindFocus #ZNE\",\"name\":\"Timeline Photos\",\"link\":\"https://www.facebook.com/adidas/photos/a.191308754225385.42450.182162001806727/1288808291142087/?type=3\"}",
"user":{
"id":"182162001806727",
"name":"adidas",
"comments":0,
"posts":0
},
"pageId":"182162001806727",
"createdTime":"2016-11-27T05:00:01-03:00",
"lastInteractionTime":"2016-11-29T00:00:00-03:00",
"adStatus":"promoted"
}
]
}
This endpoint brings information about the content posted on a Facebook page for a selected period. Here you can check, alongside with the status, video, link or photo, the date the post was created, the time of the last interaction on the post, and whether it was promoted or is organic.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/<PROFILE>/posts
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
PROFILE | Current Profile | 192162001806727 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
owner | (Optional): Filter posts only from the page owner admin or by the audience user |
admin |
type | (Optional): Filter posts by its type:status , link , photo , video .If value is missing all types will be used |
photo |
limit | The limit of posts showed for a selected period. | 5 |
Response
The response contains information about the campaign and the content, if it’s available, followed by an array with the content posted in the selected time period and according to the limit set in the parameters. Each element contains an id
and a type
, a permalink to the original post, the message and attachments of the post, the date the post was created, the time of the last interaction on the post, and whether it was promoted or is organic.
Field | Description | Example |
---|---|---|
message | The text part of the post. | “Find mental strength for the journey ahead. #FindFocus #ZNE” |
permalink | The permalink to the original post. | “http://www.facebook.com/182162001806727/posts/1288808291142087” |
attachment | The attachments, such as pictures or videos, of the post. | “{\"picture\”:\“https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/15241949_1288808291142087_7864157418689005368_n.jpg?oh=4c8a94f25c2ddff3b1cf2a55ccd83102&oe=58D016B5\”,\“description\”:\“Find mental strength for the journey ahead. #FindFocus #ZNE\”,\“name\”:\“Timeline Photos\”,\“link\”:\“https://www.facebook.com/adidas/photos/a.191308754225385.42450.182162001806727/1288808291142087/?type=3\”}“ |
createdTime | Date and time of the creation of the post. | "2016-11-27T05:00:01-03:00” |
lastInteractionTime | Date and time of the last interaction on the post. | “2016-11-29T00:00:00-03:00” |
adStatus | Whether the post is promoted or organic. | promoted |
fb.Post Stats
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/posts-interactions/count/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/profiles/posts-interactions/count/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"182162001806727_1288061994550050",
"182162001806727_1286728351350081",
"182162001806727_1290535470969369",
"182162001806727_1288060071216909",
"182162001806727_1288808291142087"
],
"since":"2016-10-30",
"until":"2016-11-28"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"182162001806727_1286728351350081",
"data":[
{
"likes":0,
"comments":0,
"shares":0,
"engagementRate":0.0,
"interactions":0
},
...ommitted...
{
"likes":35,
"comments":1,
"shares":10,
"engagementRate":2.7721157E-6,
"interactions":46
}
],
"currentTotal":{
"likes":1512,
"comments":41,
"shares":147,
"engagementRate":1.0244775E-4,
"interactions":1700
},
"previousTotal":{
"likes":0,
"comments":0,
"shares":0,
"engagementRate":0.0,
"interactions":0
}
...ommitted...
}
]
}
This endpoint returns information about the number of interactions (likes, shares, comments) and the engagement rate for different posts of a Facebook page in a selected period. You can also compare the current total interactions with the previous period.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/posts-interactions/count/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains an array with each element representing a post of the selected period and containing the number of interactions separated by type, alongside with the engagement rate of each post, followed by a currentTotal
, with the sum of the interactions of all posts within the period and a previousTotal
, with the same information regarding the previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
likes | Sum of likes over posts in the selected period. | 83275 |
comments | Sum of comments over posts in the selected period. | 2519 |
shares | Sum of shares over posts in the selected period. | 3314 |
interactions | Sum of likes, comments and shares generated during the selected period. | 94045 |
engagementRate | The engagement rate of the post. | 2.7721157E-6 |
fb.Profile Post Ranking by Interactions
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/0/facebook/profiles/posts/ranking/interactions?\
ids=15087023444&since=2016-09-09&until=2016-10-08&owner=admin" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query": {
"id": "/accounts/790/projects/0/facebook/profiles/posts/ranking/interactions",
"filters": {
"timezone": "America/Argentina/Buenos_Aires",
"ids": [
"15087023444"
],
"since": "2016-09-09",
"until": "2016-10-08"
}
},
"results": [
{
"id": "15087023444",
"data": [
{...},
{...},
{...},
{
"campaignInfo": null,
"contentInfo": {
"category": "post",
"id": null,
"sourceId": null,
"contentCreatedTime": null
},
"id": "15087023444_10154080895133445",
"type": 247,
"message": "Brilliant as individuals. Unstoppable as a nation. Unlimited Together. #justdoit",
"permalink": "http://www.facebook.com/15087023444/posts/10154080895133445",
"attachment": "{\"picture\":\"https://scontent.xx.fbcdn.net/v/t1.0-9/s720x720/14022109_10154080895133445_9205327802348821423_n.jpg?oh=50a3f784512782346243c4eab8eb473a&oe=5845ACE9\",\"description\":\"Brilliant as individuals. Unstoppable as a nation. Unlimited Together. #justdoit\",\"name\":\"Timeline Photos\",\"link\":\"https://www.facebook.com/nike/photos/a.440612488444.242105.15087023444/10154080895133445/?type=3\"}",
"user": {
"id": "15087023444",
"name": "Nike",
"comments": 0,
"posts": 0
},
"pageId": "15087023444",
"createdTime": "2016-08-20T20:12:36-03:00",
"lastInteractionTime": null,
"stats": {
"likes": 374,
"comments": 24,
"shares": 43,
"engagementRate": 1.6385718e-05,
"interactions": 441
},
"adStatus": "promoted"
},
{...},
{...},
{...},
{...},
{...},
{...}
]
}
]
}
This endpoint brings the top ten posts with the most interactions in the selected period (regardless if the post was created on the selected range).
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/posts/ranking/interactions
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
owner | Filter the creators of posts, you can see Page’s Admin (admin ) or Page’s Audience (user ) |
user |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The results
is array of objects, it contains an id
field which identifies the profile id and the data
array contains a top 10 ordered list from the most popular to least popular by the number of interactions. The content fields are related to Facebook Post official doc.
Field | Description | Example |
---|---|---|
id | Post Id on the social network | 15087023444_10154216095368445 |
type | Kind of posts. link , status , photo , video |
247 |
message | Text of the original post | Brilliant as individuals. Unstoppable as a nation. Unlimited Together. #justdoit |
permalink | The permanent link to Facebook | http://www.facebook.com/… |
attachment | An object containing meta-data of the post. It includes picture, link to the photo, etc | |
user | Contains information about the post’s owner. Like Id and Name |
"name": "Nike" |
pageId | The page Id where this post belongs | 15087023444 |
createdTime | Date and Time of the post creation. Adjusted to your Time-zone | 2016-08-20T20:12:36-03:00 |
adStatus | Automatic detection of the kind of posts organic or promoted |
promoted |
stats | Object containing the interactions for the post, that occurred on the selected period |
stats object
Field | Description | Example |
---|---|---|
likes | Sum of Likes of the post in the selected period | 374 |
comments | Sum of Comments of the post in the selected period | 24 |
shares | Sum of Shares of the post in the selected period | 43 |
engagementRate | Engagement Rate of the post in the selected period | 1.6385718e-05 |
interactions | Sum of interactions of the post in the selected period | 441 |
fb.Activity Count by Weekday
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/activity/count/weekday/hour?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/activity/count/weekday/hour",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"182162001806727"
],
"since":"2016-11-04",
"until":"2016-12-03"
}
},
"results":[
{
"id":"182162001806727",
"data":[
[
{
"posts":6,
"comments":0,
"total":6
},
{
"posts":4,
"comments":0,
"total":4
},
{
"posts":7,
"comments":0,
"total":7
},
{
"posts":3,
"comments":0,
"total":3
}
]
]
}
]
}
This endpoint returns information about the number of posts and comments made by a Facebook page, grouped by weekday in a selected period.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/activity/count/weekday/hour
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The results
is array of objects, it contains an id
field which identifies the profile id and the data
array contains an array with each element representing a weekday and containing the number of posts and comments made by a page during the selected period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
posts | Sum of posts in the selected period. | 4 |
comments | Sum of comments over posts in the selected period. | 0 |
total | Sum of shares over posts in the selected period. | 4 |
fb.Page Stats
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/interactions/count/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/profiles/interactions/count/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"182162001806727"
],
"since":"2016-11-04",
"until":"2016-12-03"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"182162001806727",
"data":[
{
"likes":7643,
"comments":158,
"shares":1058,
"engagementRate":5.9432746E-4,
"interactions":8859
},
{
"likes":2617,
"comments":55,
"shares":446,
"engagementRate":2.0917857E-4,
"interactions":3118
],
"currentTotal":{
"likes":80050,
"comments":2062,
"shares":13984,
"engagementRate":0.0064468323,
"interactions":96096
},
"previousTotal":{
"likes":135410,
"comments":2262,
"shares":14724,
"engagementRate":0.0067186337,
"interactions":152396
}
}
]
}
This endpoint returns information about the number of interactions (likes, shares, comments) and the engagement rate for a Facebook page grouped by day in a selected time period. You can also compare the current total interactions with the previous period.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/interactions/count/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains an array with each element representing a day of the selected period and containing the number of interactions separated by type, alongside with the engagement rate of each day, followed by a currentTotal
, with the sum of the interactions of all posts within the period and a previousTotal
, with the same information regarding the previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
likes | Sum of likes over posts in the selected period. | 83275 |
comments | Sum of comments over posts in the selected period. | 2519 |
shares | Sum of shares over posts in the selected period. | 3314 |
interactions | Sum of likes, comments and shares generated during the selected period. | 94045 |
engagementRate | The engagement rate of the post. | 2.7721157E-6 |
fb.Engagement Rate by Date
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/profiles/engagement-rate/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/profiles/engagement-rate/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"182162001806727"
],
"since":"2016-11-04",
"until":"2016-12-03"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"182162001806727",
"data":[
5.9432746E-4,
2.0917857E-4,
4.2003434E-4,
8.245044E-5,
1.19214346E-4,
3.2866126E-4,
9.942356E-5,
8.9561705E-5,
1.034488E-4,
1.5490486E-4,
8.164539E-5,
1.5222136E-4,
3.3409535E-5,
1.6154652E-4,
3.6790743E-4,
3.754883E-4,
3.140362E-4,
1.7664117E-4,
6.819436E-4,
1.9348013E-4,
2.346718E-4,
3.4764703E-4,
2.000547E-4,
3.8836908E-4,
1.3518115E-4,
1.3880388E-4,
0.0,
7.73518E-5,
0.0,
1.8522837E-4
],
"currentTotal":0.0064468323,
"previousTotal":0.0067186337
}
]
}
This endpoint returns the engagement rate of a Facebook page ordered by day in a selected time period. You can also compare the current total engagement rate with the previous period.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/profiles/engagement-rate/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The results
is array of objects, it contains an id
field which identifies the profile id and the data
array contains an array with each line representing a day and containing the engagement rate of a Facebook page during the selected period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
data | Each line represents the engagement rate of a day within the selected period. | 1.3880388E-4 |
Campaign
Those endpoints provides information about campaigns, including assigned posts, performance and budget
Campaign Summary
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/campaigns/stat-summary?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/campaigns/stat-summary",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"1019"
],
"since":"2016-11-04",
"until":"2016-12-03"
}
},
"results":[
{
"id":"1019",
"data":{
"current":{
"newContents":0,
"newInteractions":0,
"investment":0
},
"previous":{
"newContents":0,
"newInteractions":0,
"investment":0
},
"lifetime":null
}
}
]
}
This endpoint returns information about the new contents, new interactions and investment of each campaign created by a profile during a selected time period. You can also compare the current period with the previous one.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/campaigns/stat-summary
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The results
is array of objects, it contains an id
field which identifies the profile id and the data
array contains an array with each element representing a campaign, and within each element you can check the number of new contents and new interactions, alongside with the investment. You can also compare the numbers with the previous time period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
newContents | The number of new contents, such as statuses or videos. | 1 |
newInteractions | The number of new interactions, such as likes or comments. | 1 |
investment | The total amount of money you have spent on boosting the posts assigned to the campaign that were created in the selected time period. | 0 |
Campaign Interaction by Date
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/campaigns/interactions/count/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/campaigns/interactions/count/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"1019"
],
"since":"2016-11-04",
"until":"2016-12-03"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"1019",
"data":[
{
"likes":0,
"comments":0,
"shares":0,
"interactions":0
},
{
"likes":0,
"comments":0,
"shares":0,
"interactions":0
}
],
"currentTotal":{
"likes":0,
"comments":0,
"shares":0,
"interactions":0
},
"previousTotal":{
"likes":0,
"comments":0,
"shares":0,
"interactions":0
}
}
]
}
This endpoint gives the number of likes, comments, shares, interactions and the engagement rate of a campaign for each day of the selected period. The array on data field contains the values of our Time Series, for each day of the selected period, so the first element is the value for date passed as since
and the last element is the value for until
. You probably want to use these information together to generate a table o chart.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/campaigns/interactions/count/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing a Time Series with an element for each day of the selected period, so the first element is the value for date passed as since and the last element is the value for until.
Field | Description | Example |
---|---|---|
likes | The number of likes in a date of the selected period. | 111616 |
comments | The number of comments in a date of the selected period. | 2606 |
shares | The number of shares in a date of the selected period. | 19102 |
interactions | Sum of likes, comments and shares generated during a date of the selected period. | 133324 |
fb.Campaign Post by Type
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/campaigns/posts/count/type?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08&\
owner=admin&type=link" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/ACCOUNT/projects/PROJECT/facebook/campaigns/posts/count/type",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"1019"
],
"since":"2016-11-04",
"until":"2016-12-03"
}
},
"results":[
{
"id":"1019",
"data":{
"current":{
"statuses":0,
"links":0,
"videos":0,
"photos":0
},
"previous":{
"statuses":0,
"links":0,
"videos":0,
"photos":0
}
}
}
]
}
This endpoint gives information about the quantity of current and previously posted content from a campaign according to their type: statuses, links, videos or photos.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/campaigns/posts/count/type
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
statuses | Current or previously posted statuses. | 18 |
links | Current or previously posted links. | 20 |
videos | Current or previously posted videos. | 15 |
photos | Current or previously posted photos. | 12 |
fb.Campaign Posts by Date
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}\
/projects/${PROJECT}/facebook/campaigns/posts/count/date?\
ids=15087023444,182162001806727&since=2016-09-09&until=2016-10-08&\
owner=admin&type=link" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"query":{
"id":"/accounts/1896/projects/1/facebook/campaigns/posts/count/date",
"filters":{
"timezone":"America/Argentina/Buenos_Aires",
"ids":[
"1019"
],
"since":"2016-11-04",
"until":"2016-12-03"
},
"period":{
"id":"1d",
"duration":86400
}
},
"results":[
{
"id":"1019",
"data":[
{
"statuses":0,
"links":0,
"videos":0,
"photos":0
},
{
"statuses":0,
"links":0,
"videos":0,
"photos":0
},
{
"statuses":0,
"links":0,
"videos":0,
"photos":0
}
],
"currentTotal":{
"statuses":0,
"links":0,
"videos":0,
"photos":0
},
"previousTotal":{
"statuses":0,
"links":0,
"videos":0,
"photos":0
}
}
]
}
This endpoint gives information about the quantity of posted content (statuses, links, videos and photos) from a campaign in a given period day by day, it also provides a sum of current period activity and previous period activity.
HTTP Request
GET /accounts/<ACCOUNT>/projects/<PROJECT>/facebook/campaigns/posts/count/date
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
PROJECT | Current Project | 0 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a results
array of objects, which one profile id
per element. The array data
contains values representing a Time Series with an element for each day of the selected period, so the first element is the value for date passed as since and the last element is the value for until.
Field | Description | Example |
---|---|---|
statuses | Current or previously posted statuses. | 18 |
links | Current or previously posted links. | 20 |
videos | Current or previously posted videos. | 15 |
photos | Current or previously posted photos. | 12 |
Users
User Detail
curl -XGET 'https://quantum.socialmetrix.com/api/v1/accounts/${ACCOUNT}/users/${USER}'\
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"id": "68a3450f0f2b20e8ab6ec2e2838b532b",
"firstName": "John",
"lastName": "Smith",
"email": "johnsmith@johnsmith.com",
"timezone": "America/Argentina/Buenos_Aires",
"role": "OWNER",
"facebookAuth": {
"userId": "936995519724667",
"token": "EAAGZBqihd9k8BAORbA6EAlpOx32348J1PdwECGuKkhxDutmdqkskJb07DxLunw76kDeSN7lsBYqHTULVroMQhSvjjtgXntPybMDoJxYzUFU4Hho7d3jgCaJJSLtyz5EiWNYRPf5yZACwhhqypMRhheWZBp4q50ZD"
},
"twitterAuth": null,
"accountId": ACCOUNT ID,
"projectIds": [
],
"createdAt": "2016-10-07T22:22:16Z",
"lastLogin": "2016-10-09T17:02:32Z"
}
This endpoint lists the project’s users, passed as parameter on the URL as $USER. The parameters are: the user id, their first and last name, their email and timezone, and their role in the project, for example OWNER.
HTTP Request
GET /accounts/<ACCOUNT>/users/<USER>
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
USER | Current user | 68a3450f0f2b20e8ab6ec2e2838b532b |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
firstName | User’s first name. | John |
lastName | User’s last name. | Smith |
User’s email. | johnsmith@johnsmith.com | |
role | User’s role in the project. | OWNER |
Usage
Limits info
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}/limits/available" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"campaigns": 0,
"projects": 1,
"profiles": 4,
"swaps": 2,
"users": 1,
"fans": 600000
}
This endpoint details the account’s limits according to the user’s plan. Here you can see how many campaigns, projects, profiles, swaps, users and fans fans the account currently has.
HTTP Request
GET '/accounts/<ACCOUNT>/limits/available'
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
users | Number of users in the selected period. | 2 |
campaigns | Number of campaigns in the selected period. | 2 |
projects | Number of projects in the selected period. | 8 |
profiles | Number of profiles in the selected period. | 6 |
swaps | Number of profile changes that can be done on the project. Each account has a swaps limit per month. | 2 |
fans | Number of fans in the selected period. | 65000 |
Billing info
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}/billing-info" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"accountId": ACCOUNT,
"isTrial": true,
"currentBillingAmountInCents": 9900,
"currentPeriodStart": "2016-10-07T22:22:15",
"currentPeriodEnd": "2016-10-21T22:22:15",
"nextBilling": "2016-10-21T22:22:15Z",
"plan": {
"name": "Starter Monthly",
"priceInCents": 9900,
"intervalUnit": "month",
"interval": 1,
"trialIntervalUnit": "day",
"trialInterval": 14,
"limits": {
"projects": 1,
"campaigns": 0,
"profiles": 4,
"swaps": 2,
"users": 1,
"fans": 600000
},
"handle": "0-0-0"
},
"coupon": null,
"pendingCancellation": false,
"nextPlan": null,
"paymentType": "creditCard"
}
This endpoint gives you all the billing information available. Here you can check whether or not the account is on its Trial period, the current billing amount in cents, the current period start and end, when is the next billing, and the plan that is currently active.
HTTP Request
GET '/accounts/<ACCOUNT>/billing-info'
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
isTrial | Whether the account is it’s trial period. | True/False |
currentBillingAmountInCents | The current billing amount showed in cents. | 9900 |
currentPeriodStart | Starting date of the current payment period. | 2016-10-07T22:22:15 |
currentPeriodEnd | Ending date of the current payment period. | 2016-10-07T22:22:15 |
coupon | Available coupons for the account. | 1 |
pendingCancellation | Whether there is a pending cancellation request waiting to be completed. | True/False |
nextPlan | Downgrades or upgrades of the account | Upgrade |
paymentType | Payment Type selected for the account. | Credit Card |
Consumed limits info
curl -XGET "https://api.quantum.socialmetrix.com/v1/accounts/${ACCOUNT}/limits/consumed" \
-H "Content-Type: application/json" \
-H "X-Auth-Token: ${JWT}"
The above command returns JSON structured like this:
{
"users": 1,
"campaigns": 0,
"swaps": 0,
"projects": 0,
"profiles": 0,
"fans": 0
}
This endpoint details everything that has been consumed by the account. It gives the number of users, campaigns, swaps, projects, profiles and fans created by the account.
HTTP Request
GET '/accounts/<ACCOUNT>/limits/consumed'
URL Parameters
Parameter | Description | Example |
---|---|---|
ACCOUNT | The ID obtained from JWT response: user.accountId |
790 |
Query Parameters
Parameter | Description | Example |
---|---|---|
ids | A comma-separated list of profiles ids belonging to the project | 15087023444,182162001806727 |
since | Starting date (inclusive) | 2016-09-09 |
until | Ending date (exclusive) | 2016-10-08 |
timezone | (Optional): Time-zone that my metrics should be calculated | America/Argentina/Buenos_Aires |
Response
The response contains a data
object per each profile id
, inside data.current
is contained the acutal date period and data.previous
contains the values for the same previous period. If you select a month, it will be the previous month, if select you select 15 days (Jun/16 ~ Jun/30), it will be the previous 15 days (Jun/01 ~ Jun/15).
Field | Description | Example |
---|---|---|
users | Number of users in the selected period. | 2 |
campaigns | Number of campaigns in the selected period. | 2 |
projects | Number of projects in the selected period. | 8 |
profiles | Number of profiles in the selected period. | 6 |
swaps | Number of profile changes that can be done on the project. Each account has a swaps limit per month. | 2 |
fans | Number of fans in the selected period. | 65000 |
Roles
Role | Description |
---|---|
Account Owner | This role is responsible for the account, with permission to all actions, including billing and cancelation |
Manager | Responsible for creating Projects, adding Profiles, inviting Users, etc |
Analytics | This role can query any metric and add content to a campaign. |
Errors
The Kittn API uses the following error codes:
Error Code | Meaning |
---|---|
400 | Bad Request – Your request sucks |
401 | Unauthorized – Your API key is wrong |
403 | Forbidden – The kitten requested is hidden for administrators only |
404 | Not Found – The specified kitten could not be found |
405 | Method Not Allowed – You tried to access a kitten with an invalid method |
406 | Not Acceptable – You requested a format that isn’t json |
410 | Gone – The kitten requested has been removed from our servers |
418 | I’m a teapot |
429 | Too Many Requests – You’re requesting too many kittens! Slow down! |
500 | Internal Server Error – We had a problem with our server. Try again later. |
503 | Service Unavailable – We’re temporarially offline for maintanance. Please try again later. |
Related Projects
We receive a few contributions to use Quantum, we thanks those contributions and encorage our customers to publish their work. If you create something cool with our API, please drop us a line info [at] socialmetrix.com
Here are the most relevant projects:
Name | Description |
---|---|
Quantum Cli | A small command line tool that allows you to manage projects and profiles. Very handy when you have to create projects in bulk. |
Quantum Python API | An ultra simple wrapper for the Socialmetrix Quantum API, with basic functionality. |