Skip Main Site Navigation

AddThis Analytics API

Check out our Analytics API if you're looking for programmatic access to your sharing data. You can use the API to download reports and integrate them your into internal metrics dashboards and workflow. There are a variety of queries to help you understand how your content is being shared, who is sharing it, and what their interests are.



Getting Started

Calling the API is easy, you just make an HTTPS request with your username and password to any of the supported endpoints. You can ask for data in CSV or JSON format and specify a timerange for the query. Try these examples by clicking the links:

These links will ask for your userid and password, and return a CSV file, viewable in excel.

What were my top shared urls?
https://api.addthis.com/analytics/1.0/pub/shares/url.csv
How many times was my content shared, by day, over the last week?
https://api.addthis.com/analytics/1.0/pub/shares/day.csv?period=week
How many users shared my content this month, broken down by their interests?
https://api.addthis.com/analytics/1.0/pub/sharers/interest.csv?period=month
Which sharing services sent the most clicks back to my site this week?
https://api.addthis.com/analytics/1.0/pub/clicks/service.csv?period=week

How do these queries work?

Take a look at each of the query urls above, reading the path starting with "/pub/<X>/<Y>". You can interpret each url as a query for "X by Y", e.g. my "shares by url", "shares by day", "sharers by interest" or "clicks by service", respectively. We refer to X and Y as a metric and a dimension. A metric is something that we measure (like shares or clicks) and a dimension is an property for slicing that data (like service or day). You combine a metric and a dimension to make a query, check out the table below for the complete list of supported queries.




Services

This table lists all of the queries available from this API, using various combinations of the supported metrics and dimensions. Click the path on each query to try it yourself.

PathDescriptionSupported Query Parameters
/shares/daynumber of shares per dayperiod,domain,service,url
/shares/urltop shared urls (does not contain all urls shared)period,domain,service
/shares/domainshares segmented by content domainperiod
/shares/serviceshares segmented by sharing serviceperiod,domain,url
/shares/interestshares segmented by sharer's interestperiod,domain,service,url
/shares/continentshares segmented by sharer's continentperiod,domain,service,url
/shares/countryshares segmented by sharer's countryperiod,domain,service,url
/clicks/daynumber of clicks per dayperiod,domain,service,url
/clicks/urltop clicked urls (does not contain all urls clicked)period,domain,service
/clicks/domainclicks segmented by content domainperiod
/clicks/serviceclicks segmented by sharing serviceperiod,domain,url
/clicks/interestclicks segmented by clicker's interestperiod,domain,service,url
/clicks/continentclicks segmented by clicker's continentperiod,domain,service,url
/clicks/countryclicks segmented by clickers's countryperiod,domain,service,url
/subscriptions/daynumber of subscriptions per dayperiod,domain,service,url
/subscriptions/urltop subscribed urls (does not contain all urls)period,domain,service
/subscriptions/domainsubscriptions segmented by domainperiod
/subscriptions/servicesubscriptions segmented by subscription serviceperiod,domain,url
/subscriptions/interestsubscriptions segmented by subscriber's interestperiod,domain,service,url
/subscriptions/continentsubscriptions segmented by subscriber's continentperiod,domain,service,url
/subscriptions/countrysubscriptions segmented by subscriber's countryperiod,domain,service,url
/sharers/daynumber of unique sharers per dayperiod,domain,service,url
/sharers/interestsharers segmented by sharer interestperiod,domain,service,url
/influencers/daynumber of unique influencers per dayperiod,domain,service,url
/influencers/interestinfluencers segmented by their interestsperiod,domain,service,url
/clickers/daynumber of unique clickers per dayperiod,domain,service,url
/clickers/interestclickers segmented by their interestsperiod,domain,service,url
/users/daynumber of unique sharers and clickers per dayperiod,domain,service,url
/users/interestsharers and clickers segmented by their interestsperiod,domain,service,url
/searches/termtop search terms which resulted in sharesperiod,domain,service,url
/referers/domaintop referring domains which resulted in sharesperiod,domain,service,url


Requests

Authentication

The Analytics API will require you to authenticate yourself using your AddThis userid and password. See the authentication documentation for details on the authentication mechanisms available and how to use them. We recommend you make your requests over HTTPS to keep your userid and password secure.

URL Format

https://api.addthis.com/analytics/1.0/pub/<metric>[/<dimension>].<format>[?<params>]

Method

To acquire data from the Analytics API use an HTTP GET request.

Rate Limit

This API limits users to 10 requests per minute. See the web service documentation for more on rate limiting in AddThis web services.

Filtering

Optionally, you can filter the data reported using the supported query parameters.

Note: not all reports support all methods of filtering. To determine which filters are available for a given report, see the supported query parameters in the services table below.

Query Parameters
NameDescriptionValueExampleDefault
pubidThe publisher profile for which you're requesting data. Can be omitted if you have only one profile.<pubid>&pubid=ra-4d5ecb7e3779d47edefault profile
periodCollect response data starting from yesterday going back a number of days equal to the specified period.day|week|month&period=weekday
domainCollect response data only on the specified domain<domain name>&domain=www.example.comall domains
serviceCollect response data only for the specified services.<service code>(,<service code>)*&service=email,printall services
urlCollect response data only for the specified url.<url>&url=http%3A//www.example.comall URLs

Note: unlike the other parameters, the url and service query parameters cannot be used together in the same request. If both are specified, the url parameter will be ignored.

Metrics

The analytics api lets you retrieve data on several metrics:

MetricDescription
sharesShares of your content using AddThis
clicksClicks to your shared content
subscriptionsFeed subscriptions using AddThis
sharersUnique users who shared your content using AddThis
influencersUnique users who shared your content using AddThis and received at least one click
clickersUnique users who clicked on your shared content
usersUnique users who shared or clicked on your content, through AddThis
searchesSearches which landed on your site and resulted in shares
referersReferring domains to your site for views which resulted in shares

Dimensions

You can slice your metrics by various dimensions. These dimensions are not available for all metrics, see the chart for details.

DimensionDescriptionSupported Metrics
dayBy day, over a period of timeshares, clicks, subscriptions, sharers, influencers, clickers, users
urlBy url, (for your top urls)shares, clicks, subscriptions
domainBy domainshares, clicks, subscriptions, referers
continentBy continentshares, clicks, subscriptions
countryBy countryshares, clicks, subscriptions
serviceBy sharing serviceshares, clicks, subscriptions
interestBy user interestshares, clicks, subscriptions, sharers, influencers, clickers, users
termBy search termsearches


Responses

Formats

This API supports both JSON and CSV formats. Your request must include either the .json or .csv extension. See the web service documentation for more on response formats in AddThis web services.

Headers

HTTP Headers contained in the response can provide useful information to help your API client process the response data appropriately.

Last-Modified

The Last-Modified header provides the date and time at which the report data was generated. If the server is unable to handle your request in a timely manner, but it has data cached for the requested report, it will respond with the expired or "stale" data from the cache while it is busy generating the updated report. You can check the Last-Modified time to detect if the data reported is stale. New data for a given day becomes available at midnight (00:00:00 EST) the following day. If the Last-Modified time precedes midnight of the current day, the report does not include the latest available data. If your application requires the latest data, retry your query later to get an updated report.

Retry-After

If the server is unable to handle your request in a timely manner and has no cached data to return, you will receive a 503 status (100 error code if you are suppressing HTTP status codes) in your response indicating that the server is busy. The Retry-After header provides an estimated wait time in seconds after which you can expect a successful response should you resubmit your request.

Errors

You may encounter the following error responses while using this API:

StatusCodeErrorDescription
40030Invalid ParameterUse only valid parameters. Accept no substitutes.
40090Rate LimitedWhoa there, you've exceeded the rate limit. Take it easy partner, then try your request again.
40180Authentication FailedInvalid userid or password. Try again, but this time, get it right.
40450Not FoundCheck to make sure that your path matches the URL format and uses valid path parameters.
40670Unsupported Data FormatIs your path extension one of the supported response formats?
500999Internal ErrorSomething has gone terribly wrong! This should never happen, but on the off chance that it does, we'll be hard at work to correct it. Please check the AddThis forum for status information and report any problems you encounter.
503100Service UnavailableSome requests may take longer to satisfy than others, especially if you are requesting data for the first time. If the server is unable to generate a response in a timely manner, it will return with this error instead. This is to be expected while the service is still new and we're in the process of gauging demand and usage patterns. Simply wait for a short period of time (see Retry-After) and retry your request.

See the web service documentation for more on error responses in AddThis web services.