API: Getting Started

Introduction

We monitor social media for mentions of many stocks on the NASDAQ and NYSE exchanges. We run these posts through our machine learning algorithms and use the results to generate a score based on sentiment and post popularity. We watch for references to company names and sometimes even their products to gather all types of posts. Search or use the API to see which companies we track.

Authentication

Your API key and subscription details can be found on your account page.

To authenticate with our API you must pass your token in the Authorization header in the following format:

Authorization: Token [your token]

You must not share or expose this token on a website. Only you are authorized to use it. If it accidentally gets shared with others please go to your account page and generate a new token.

Rate & Data Limits

Daily request rate limits are based on your subscription level. All subscribers are limited to 5 requests per second. Rate limits are rolling and do not have a reset time, i.e. the daily limit covers the 24 hours prior to each request. Therefore requests can be made in bursts or systems can implement an automatic delay and retry when the limit is hit.

Your subscription also decides how much historical data you may access. History is available as far back as we started tracking a data point. We do not currently track all stocks but you can browse to any company listed on our site to request we begin analyzing their social sentiment.

See your account page to for subscription details and to make changes.

Documentation

The complete documentation explains every API endpoint and gives you the ability to try them without writing any code.

We also offer OpenAPI / Swagger files for your convenience in both JSON and YAML formats.

Example

To make an API request, pass Authorization and Accept headers. The base URL for all endpoints is /api/v1. For example, if your token is abc123, you could use the following curl command to retrieve our list of stocks:

curl 'https://socialsentiment.io/api/v1/stocks/' \
        -H 'Authorization: Token abc123' \
        -H 'Accept: application/json'

Please contact support if you have any questions.

HTTP Response Codes
  • 200 - Success
  • 400 - Invalid request - Response body will include a description of the details
  • 404 - Not found
  • 429 - Exceeded rate limit
  • 500 - Server error