Check out the Instrumental API.
With hedonometer.org we’ve created an instrument that measures the happiness of large populations in real time. Our hedonometer is based on people’s online expressions, capitalizing on data-rich social media, and we’re measuring how people present themselves to the outside world. For our first version of hedonometer.org, we’re using Twitter as a source but in principle we can expand to any data source in any language
Connect to API