awe.sm Stats API

Retrieve Interval Stats for a Link

Retrieve graph-ready stats for a specific awesm_id.

GETapi.awe.sm/stats/{awesm_id}/intervals.json

The POST method is also supported. HTTPS is supported on this endpoint.

Required Parameters

Parameter Type Description
awesm_id string The awe.sm link you want to lookup. This parameter is provided as part of the URL. Passing it as an explicit parameter will have no effect.
key string API key of the project on which stats are being requested.
start_date date The beginning of the period for which you want data, rounded to previous hour. Requires value after 2010-06-04.
end_date date The end of the period for which you want data, rounded to next hour.
v integer API version: 3 for this endpoint.

Optional Parameters

Parameter Type Description
callback string Returns a JSON-P response named with this parameter's value.
interval string Period of time between stats: hour, day, or week. Limited to 500 intervals. Requires start_date after 2010-06-04. Default is day.
with_conversions boolean Flag to include conversion values in response. Default is FALSE.
with_metadata boolean Flag to include metadata objects in response. Default is FALSE.
with_zeros boolean Flag to include intervals with no activity. Default is FALSE.

Related APIs

  • Link Details: returns total values similar to this API without interval values
  • Batch Link Details: request details for multiple links in a single call

Example

GET http://api.awe.sm/stats/demo.awe.sm_K7e/intervals.json?v=3&key=5c8b1a212434c2153c2f2c2f2c765a36140add243bf6eae876345f8fd11045d9&interval=day&start_date=2011-10-04&end_date=2011-10-11&with_zeros=true

{
    "awesm_id": "demo.awe.sm_K7e",
    "start_date": "2011-10-04T00:00:00Z",
    "end_date": "2011-10-11T00:00:00Z",
    "interval": "day",
    "with_zeros": true,
    "with_metadata": false,
    "with_conversions": false,
    "clicks": 5,
    "last_clicked_at": "2011-10-04T23:51:15Z",
    "intervals": [
        {
            "day": "2011-10-04T00:00:00Z",
            "clicks": 5
        },
        {
            "day": "2011-10-05T00:00:00Z",
            "clicks": 0
        },
        {
            "day": "2011-10-06T00:00:00Z",
            "clicks": 0
        },
        {
            "day": "2011-10-07T00:00:00Z",
            "clicks": 0
        },
        {
            "day": "2011-10-08T00:00:00Z",
            "clicks": 0
        },
        {
            "day": "2011-10-09T00:00:00Z",
            "clicks": 0
        },
        {
            "day": "2011-10-10T00:00:00Z",
            "clicks": 0
        }
    ]
}

Last updated 2013-01-10