Guide to the FreeCodeCamp Public API

If you planned to use the FreeCodeCamp Public API, you're almost there. The API is currently in Alpha, being hosted on this weird location. The data behind this API is real FCC data, but not live data. Once the API is stable, we will integrate it to the freecodecamp.com domain.

Getting started

  1. First you need to get an API key. Without an API key, all you will ever see is this page. At this time API keys are generated manually. You can ask for a key on the Freecodecamp/DataScience Gitter. Someone out there will hear your prayer and show mercy.
  2. Hook up your app to one of the endpoints below to get the data you want. Don't forget to use your API key in every request.

Endpoints

The FreeCodeCamp Open API only supports retrievals, using a HTTP GET method. There is no way to adjust a user's progress data other than submitting the challenges on the FreeCodeCamp site. If you manage to hack this API and succeed to modify the data, we would really like to hear how you did it, but since there is no feedback to the real Freecodecamp database, your effort will be rudely overwitten by the next update.

PathReturnsOptions
/v1/users?key=<API key>&<options> An array of summary data of the users matching your selection. skip, sort, limit, filter, details
/v1/user/:username?key=<API key>&<options> The information for a single user. details

OptionValuesDescriptionDefault
limit 1-100 Set the maximum number of users to be returned to n. (max=100) 50
skip=n numeric Skip the first n users that would pass the filter. If the skip value is higher than the number of users that are matchin the filter, an empty array will be returned. 0
itemname {< | >}value Define a set of itemnames that contraint the results. Examples: algorithmsTotal=>10 will return the users that have completed more than 10 algorithms in total. helpsRecent=10 will return the users wih exactly 10 helps in the last 30 days. username=>nobody will return all users with a username greater than 'nobody'. no filter
sort [-]itemname[,] Sort the results ascending (+ or none) or descending (-) on the given item. This option will be ignored if itemname is not an existing item. More sort criteria can be specified separated by comma's. Example: sort=-username will sort on descending username. no sort
details true|false For the user-array endpoint, false will suppress the completed challenges array for a user. For the single user endpoint, false will suppress the solutions for the challenges and algorithms and the URLs for the projects. false
Valid itemnames are: 'username', 'algorithmsRecent', 'algorithmsTotal', 'challengesRecent', 'challengesTotal', 'helpsRecent', 'helpsTotal', 'hikesRecent', 'hikesTotal', 'otherRecent', 'otherTotal', 'pointsRecent', 'pointsTotal', 'projectsRecent', 'projectsTotal'.