API Overview
RescueTime exposes two APIs that give you programmatic access to your data and account.
Whether you want to pull your productivity stats into a dashboard, automate Focus Sessions, or manage projects and time entries from another tool, the APIs make it possible.
Analytic Data API
The Analytic Data API is read-only and gives you access to your historical activity data: time logs, productivity breakdowns, daily summaries, alerts, highlights, Focus Session history, and more. Think of it as a query interface into everything RescueTime has tracked.
It also has a small number of write endpoints for posting offline time and daily highlights, and for triggering Focus Sessions programmatically.
Base URL: https://www.rescuetime.com/anapi/ | Full reference
Resource API
The Resource API is a RESTful read/write API for managing your RescueTime account: projects, tasks, time entries, goals, alerts, Focus Sessions, calendar data, devices, and more. If the Analytic API is for querying what happened, the Resource API is for managing what's there.
Base URL: https://www.rescuetime.com/api/resource | Full reference
Both APIs use the same two authentication methods. Which one you need depends on what you're building.
API Keys — for personal use
An API key authenticates requests as you. It's the right choice if you're building something for your own account: a personal dashboard, a script, an automation, or an integration with another tool you use.
You can create and revoke API keys on your API Key Management page. See Getting Your API Key for step-by-step instructions.
OAuth2 — for apps serving other users
OAuth2 is for building applications that other RescueTime users will connect to. Instead of sharing an API key, users authorize your app directly and can revoke access at any time from their connected applications page.
OAuth2 applications require approval. Contact the RescueTime team to get set up.
💡 Not sure which to use? If you're the only person who will ever use your integration, use an API key. OAuth2 is only needed when other people's RescueTime accounts are involved.
Productivity level names in the API
The RescueTime app uses updated productivity level names, but the API still returns the original names. When you see these values in API responses, here's how they map to what you see in the app:
| API value | App label | Productivity score |
|---|---|---|
| very_productive | Focus Work | 100 |
| productive | Other Work | 75 |
| neutral | Neutral | 50 |
| distracting | Personal | 25 |
| very_distracting | Distracting | 0 |
Data sync timing
Activity data is synced from the RescueTime app to the servers on a rolling interval. Once synced, data is immediately available in API responses.
| Plan | Sync interval |
|---|---|
| Solo Focus, Solo+ | Every 3 minutes |
| Lite (free) | Every 30 minutes |