Universal Share API - Developer Tools - Shareaholic

Get More Traffic

You've already got an audience that loves your content, product or service. Profit from helping them tell their friends and followers about you. The Universal Share API will enable the people that visit your website to share articles, comments, purchases and other activities from your website with their friends on multiple social networks. This API is free to use with premium upgrades available, and helps you grow your bottom line and traffic without growing your marketing budget.

Universal Share API Documentation

Shareaholic provides social APIs to connect your site or application to each of the major social networks for sharing. If you can’t use the Shareaholic JavaScript SDK, you can link to these API endpoints directly.

The Shareaholic JavaScript SDK incorporates this API and has many other very useful bells and whistles such as tackling cross device deep linking nuances, including the ability to customize the buttons to match the look and feel of your site or application.

It typically takes less than 10 minutes and 2 lines of code to implement. We highly recommend using the SDK to save time. It is the preferred implementation for Social Sharing Buttons.

You can even use your own icons by turning any DOM element on a page into a Share Button with very simple markup! For example:

<a href data-app="share_buttons" data-app-config='{"service":"facebook"}'>Share</a>

API Designed for Ease

We have optimized for ease of implementation. All API methods are accessible via simple HTTP calls. Most implementations of this API take less than 15 minutes to setup. Simply call the provided URLs with their respective parameters, and you're done.

Getting Started: Authentication

All API endpoints require API authentication credentials to be supplied as query arguments. To get started, you'll need a free Shareaholic account and Site ID. Signup for an account and then add your site to get your Site ID. The Site ID is your API Key.

Example:

...&apikey=8943b7fd64cd8b1770ff5affa9a9437b&...

Share Content with over 95 (and growing!) Destination Services

Let your users share content from any website, desktop app, mobile app, etc to any supported destination service.

Endpoint: https://www.shareaholic.com/api/share/

Parameter Description Required Example
v API Version Required v=1
apitype API Type Required apitype=1 (1=Redirect, 2=Pingback, 3=1x1 pixel)
apikey API Key Required apikey=8943b7fd64cd8b1770ff5affa9a9437b
service Destination Service ID or Code Required service=facebook
link Link Required link=https://www.yoursite.com
title Page Title Optional title=My%20Awesome%20Webpage
notes Notes Optional notes=I%20love%20this!
media_link Media Link Optional media_link=https://www.yoursite.com/logo.png
short_link Shortened Link Optional short_link=https://bit.ly/1OTIqm
shortener URL Shortener Optional shortener=shrlc
shortener_key URL Shortener Credentials Optional shortener_key=83932e4c5d02d1f94aea0f40fbc557ec
tags Tags Optional tags=programming,python,howto
source Source Optional source=shareaholic

Working Example (posting a link to Facebook):

<a href="https://www.shareaholic.com/api/share/?v=1&apitype=1&apikey=8943b7fd64cd8b1770ff5affa9a9437b&service=facebook&title=What%20Do%20Your%20Customers%20Want%20to%20Buy%3F&link=https://nextview.vc/blog/what-do-your-customers-want-to-buy/&source=Shareaholic" target="_blank">Post to Facebook</a>

Notes:

Link Tracking & URL Shorteners

Shareaholic can automatically shorten the link for you using a supported shortening service that you specify.

...&shortener=bitly...

We currently support the following shorteners/parameter values:

shortener= Description
tinyurl
bitly Includes support for custom bitly domains
shrlc Default
none Do not shorten link

Templates i.e. customize the format of X Posts, Emails, WhatsApps, SMS / Text Messages

By specifying a templates[][] API parameter, you can customize the default post format for services that support templates. Specifying a template is completely optional.

Template Token Description
${title} Title of the page
${link} Link to the page
${short_link} Shortened link to the page
${notes} Any text; usually a very short summary of the link or user selected text

Error codes

Code Description
100 apikey not provided
101 apikey provided is invalid
105 v not provided
130 link not provided

Rate Limits

In order to maintain an efficient, secure, and high-performing API, there are limits on how many times this API can be called in any given period.

Feedback

If you believe you have found a bug, or you’d like to request additional functionality, or you release something using this API, we’d love to hear from you.

Build with Shareaholic
Developer Tools and APIs that are reliable, stable, and fast. Built and run on the same scaled cloud infrastructure that runs Shareaholic products and powers functionality across over 300,000+ sites.