Skip to main content

Getting Started

The donReach Social API makes it simple to get the social share count for any URL. Follow the steps below to make your first API request.


Make a test-request

Let’s dive straight in and make a request to fetch 9gag.com’s social share-counts from Facebook, Twitter & Google+.

1. Create an account

To use the Social Share Count API you will need an API key. To get one, choose a plan and follow the steps on the screen.

2. Grab your details

Click on the Sign In button to the top right of the screen to view your subscriptions. Here, take a note of your API key & host.

3. Make a request

Open a new terminal window and enter the following, inserting your API key and host:

curl -X GET -H "Authorization: YOUR_API_KEY" "https://YOUR_API_HOST/shares?providers=facebook,twitter,google&url=http://9gag.com/"

If everything worked you should be seeing a response like this:

{
  "shares": {
    "facebook": 492795,
    "google": 86399,
    "twitter": 122628
  },
  "total": 701822,
  "url": "http://9gag.com/"
}

What now?

Now you’re all set to go and build your awesome social application!
For further reading check out the following link.