Docs / Api / Overview
How to Use Our Code API
The Hackatime API lets you get your coding data with code. It works just like WakaTime's API.
Quick Start
- Get your API key from Hackatime settings
- Make requests to:
https://hackatime.hackclub.com/api/v1/
How to Log In With Code
Put your API key in your requests like this:
Best way (Authorization Header):
Authorization: Bearer YOUR_API_KEY
Other way (in the URL):
?api_key=YOUR_API_KEY
Try It Out
Get your coding stats:
curl -H "Authorization: Bearer YOUR_API_KEY" \
https://hackatime.hackclub.com/api/v1/stats
Works With WakaTime Tools
Since Hackatime works like WakaTime's API, you can:
- Use any WakaTime code libraries
- Point WakaTime tools to Hackatime
- Move data between WakaTime and Hackatime
Popular Endpoints
- Your Stats:
/api/v1/stats
- How much you've coded - Your Heartbeats:
/api/v1/my/heartbeats
- Raw coding activity - User Stats:
/api/v1/users/{username}/stats
- Someone else's public stats
More Details
Want to see all the API commands? Check out our complete API list. Most things work exactly like WakaTime's API.
Found an issue with this page? Edit it on GitHub - we'd love your help making the docs better!