; PSY 1903
PSY 1903 Programming for Psychologists

APIs

An API is an Application Programming Interface, and they’re used to allow you programmatic access to data on some external web service.

APIs can be very useful tools in research, and so we want to cover a few examples to give you a feel for how they could be harnessed.

APIs to explore

Example - Reddit

Code from demo:

Learn more about the Reddit API...

Example - Amazon Gift Card incentive

Code from demo:

Learn more about the Amazon Incentives API

API usage summary

  1. Sign up for the API
  2. Familiarize yourself with the docs
  3. Generate access credentials
  4. Write code to make a request to the API
  5. Write code to handle response from the API