Connect Retool to RescueTime via a REST API Resource using RescueTime's Analytic Data API with API key authentication. RescueTime passively tracks app and website usage across team members' computers; connecting it to Retool lets you build productivity analytics dashboards showing focus time, app usage breakdowns, and productivity score trends. Configure the Resource with RescueTime's API base URL and your API key, then query the Analytic Data API for daily summary and activity data.
| Fact | Value |
|---|---|
| Tool | RescueTime |
| Category | Productivity |
| Method | REST API Resource |
| Difficulty | Beginner |
| Time required | 20 minutes |
| Last updated | April 2026 |
Why connect Retool to RescueTime?
RescueTime provides rich passive productivity tracking data — how much time developers, designers, and operations staff actually spend in productive applications versus distracting websites — but its native reporting interface limits how you can slice and analyze this data. For engineering managers and operations leaders, a Retool dashboard built on the RescueTime API enables custom productivity analytics: filtering by date range, comparing individual and team trends over time, and correlating focus time metrics with project delivery data from other tools like Jira.
The most actionable RescueTime Retool use case is a team productivity context dashboard that engineering managers use during one-on-ones. Rather than pulling up the RescueTime app separately for each team member review, the manager opens a Retool panel that shows the selected developer's focus time trend for the past month, top productive applications, and average daily productive hours alongside their sprint task completion rate from Jira. This combined view takes seconds rather than minutes to assemble.
RescueTime's Analytic Data API provides access to daily summary data (total time, productive time, neutral time, distracting time, productivity score, and very productive time), activity data (time per application and website), and category data (programming, design, communication, etc. rolled up by category). The API uses a simple row-column structure where each row is an array of values corresponding to the column headers returned in the response. JavaScript transformers are essential for converting this format into the key-value objects that Retool components expect.
Integration method
RescueTime connects via Retool's REST API Resource using the RescueTime Analytic Data API at data.rescuetime.com. Authentication uses a simple API key passed as a query parameter (key={your_api_key}) in every request — no OAuth flow is required. You configure one REST API Resource with the RescueTime API base URL, then build queries for productivity data, time summary reports, and application usage breakdowns. Retool proxies all requests server-side, keeping the API key off the browser. RescueTime's free plan provides limited API access; the premium plan (RescueTime for Teams) unlocks team-level data and longer date range queries.
Prerequisites
- A RescueTime account (rescuetime.com) — free or premium
- RescueTime desktop app installed and running for at least a few days to have tracking data
- A RescueTime API key (generated in RescueTime account settings under API Keys)
- For team dashboards: a RescueTime for Teams account with team member API keys or admin access
- A Retool account with Resource creation permissions
Step-by-step guide
Generate a RescueTime API key
Log in to your RescueTime account at rescuetime.com. Click on your profile name or account menu in the top-right corner and navigate to Account Settings. In the left sidebar of the Settings page, look for API Keys or Integrations. If you see an API Keys section, click on it. Click Create a new API Key. Give the key a descriptive label (e.g., Retool Integration) so you can identify it later if you have multiple keys. RescueTime will generate an API key — a random alphanumeric string of approximately 40 characters. Copy this key immediately. Unlike some API platforms, RescueTime displays the key once at creation and does not show the full key value again after you navigate away (though you can create a new key if needed). Go to Retool and navigate to Settings → Configuration Variables. Click Add variable, name it RESCUETIME_API_KEY, paste the API key as the value, and check the Mark as secret checkbox to prevent it from being accessible in frontend JavaScript. Note important access limitations: the free RescueTime plan limits API access to the past 3 months of data at daily granularity. The premium plan extends this to all historical data at hourly or finer granularity. The RescueTime for Teams plan is required to access other team members' data through the API — individual accounts only expose the account holder's own data.
Pro tip: RescueTime's API key is tied to your individual account. If you are building a team dashboard and each team member has their own RescueTime account, you will need to collect API keys from each member and store them as separate configuration variables (RESCUETIME_API_KEY_ALICE, RESCUETIME_API_KEY_BOB, etc.), or use RescueTime for Teams which provides admin-level data access.
Expected result: You have a RescueTime API key stored as a secret configuration variable in Retool. You are ready to configure the REST API Resource.
Configure the RescueTime REST API Resource in Retool
In Retool, click the Resources tab and click Add Resource. Select REST API from the resource type list. Name the Resource RescueTime API. In the Base URL field, enter https://www.rescuetime.com/anapi — this is the base URL for the Analytic Data API. RescueTime's API uses query parameter-based authentication (the API key is passed as a URL parameter in each request, not as a header). You do not need to add any headers for authentication. However, add a default Content-Type header: click Add Header, set Name to Content-Type and Value to application/json — this is good practice for REST API Resources even when making GET requests. Click Save to save the Resource. RescueTime's API key authentication happens at the query level: you will add key={{ config.RESCUETIME_API_KEY }} as a URL parameter in each query rather than in the Resource headers. This is by design — RescueTime's API specification requires the key as a URL parameter. Because Retool proxies all requests server-side, the API key in the URL parameter is never exposed to the browser even though it appears in the URL on the server side. Alternatively, you can add the key as a default URL parameter in the Resource configuration under the URL Parameters section: Name: key, Value: {{ config.RESCUETIME_API_KEY }}. Adding it at the Resource level means you do not need to add it to every individual query.
Pro tip: Add the API key as a URL parameter in the Resource configuration (not query-level) so it is automatically included in every query without having to add it manually each time. In the Resource settings, scroll to the URL Parameters section and add: key = {{ config.RESCUETIME_API_KEY }}.
Expected result: The RescueTime REST API Resource is saved in Retool. A test GET query to /data returns a 200 response with productivity data. The API key is included automatically via the Resource-level URL parameter.
Query daily productivity summary data
Create your first meaningful query targeting RescueTime's daily summary endpoint. In a Retool app, open the Code panel and click Create new query. Select the RescueTime API Resource. Set Method to GET. In the Path field, enter /data. This is the main Analytic Data API endpoint. In the URL Parameters section, add the following parameters that control what data you retrieve. Add perspective with value interval — this returns data aggregated by time period. Add resolution_time with value day for daily data (options: month, week, day, hour, minute). Add restrict_begin with value {{ dateRangePicker.startDate || moment().subtract(30, 'days').format('YYYY-MM-DD') }} for the start date. Add restrict_end with value {{ dateRangePicker.endDate || moment().format('YYYY-MM-DD') }} for the end date. Add format with value json. Add restrict_kind with value productivity to get the productivity-level summary (most common for dashboards). Run the query. RescueTime returns a JSON object with two keys: row_headers (an array of column names) and rows (an array of arrays, where each inner array corresponds to one time period). The row_headers for productivity data are typically: Date, Time Spent (seconds), Number of People, Productivity. Your transformer will need to zip the headers and rows together to produce key-value objects for Retool components.
1// JavaScript transformer for RescueTime Analytic Data API response2// Converts the row_headers + rows array format to key-value objects3const headers = data.row_headers || [];4const rows = data.rows || [];56if (!headers.length || !rows.length) return [];78return rows.map(row => {9 // Create an object from headers and row values10 const record = {};11 headers.forEach((header, index) => {12 record[header.toLowerCase().replace(/\s+/g, '_').replace(/[()]/g, '')] = row[index];13 });1415 // Normalize common fields for productivity data16 const seconds = record['time_spent_seconds'] || record['time_spent'] || 0;17 const productivityScore = record['productivity'] || 0;1819 return {20 date: record['date'] || record['date_'] || '',21 total_seconds: seconds,22 total_hours: (seconds / 3600).toFixed(1),23 productive_hours: productivityScore > 0 ? (seconds / 3600).toFixed(1) : '0',24 productivity_score: productivityScore,25 productivity_label: productivityScore === 2 ? 'Very Productive'26 : productivityScore === 1 ? 'Productive'27 : productivityScore === 0 ? 'Neutral'28 : productivityScore === -1 ? 'Distracting'29 : productivityScore === -2 ? 'Very Distracting' : 'Unknown',30 people_count: record['number_of_people'] || 131 };32});Pro tip: RescueTime's API returns time in seconds. Divide by 3600 to get hours. For the productivity field, the values use a scale from -2 to 2: -2 = Very Distracting, -1 = Distracting, 0 = Neutral, 1 = Productive, 2 = Very Productive. The 'restrict_kind=productivity' parameter returns data broken down by this scale.
Expected result: The daily summary query returns a flat array of productivity records with date, total hours, and productivity score for each day in the selected range. The data is ready to bind to a Chart and Table component.
Build the productivity analytics dashboard
With the productivity data query working, build the dashboard layout. Add a DateRangePicker component at the top of the canvas labeled Select Date Range — default it to the past 30 days. Add a Button labeled Refresh Data connected to your summary query. Create a second query for activity-level data: same endpoint and Resource, but change restrict_kind to activity and restriction_time to week. This returns time-per-application data. Build the main dashboard layout as three sections. Section 1 — Summary Stats: drag four Stat components showing Total Productive Hours, Average Daily Productive Hours, Total Distracting Hours, and Average Productivity Score. Calculate these from a JavaScript aggregation query on the summary data. Section 2 — Trend Chart: drag a Chart component and set it to Line type. Bind to the summary query data. Set X axis to the date field. Add two data series: one for productive hours time and one for distracting hours — this creates a dual view showing both sides of the productivity picture. Section 3 — Application Usage Table: drag a Table component and bind it to the activity query data. Configure columns for application name, total time (formatted as hours:minutes), productivity rating, and a bar-style visual for time proportion. Sort by total time descending to show most-used apps at the top. Add a Tag or Badge component in the productivity column showing color-coded ratings: green for productive, red for distracting, gray for neutral.
1// JavaScript aggregation query for Stat components2// References the productivity summary query3const rows = getProdSummary.data || [];45const productive = rows.filter(r => r.productivity_score > 0);6const distracting = rows.filter(r => r.productivity_score < 0);78const totalProductiveHours = productive.reduce((sum, r) => sum + parseFloat(r.total_hours), 0);9const totalDistractingHours = distracting.reduce((sum, r) => sum + parseFloat(r.total_hours), 0);10const avgDailyProductiveHours = rows.length > 011 ? (totalProductiveHours / rows.length).toFixed(1)12 : 0;1314// Simple productivity pulse: percentage of time that is productive15const totalHours = rows.reduce((sum, r) => sum + parseFloat(r.total_hours), 0);16const productivityPulse = totalHours > 017 ? Math.round((totalProductiveHours / totalHours) * 100)18 : 0;1920return {21 total_productive_hours: `${totalProductiveHours.toFixed(1)}h`,22 avg_daily_productive_hours: `${avgDailyProductiveHours}h`,23 total_distracting_hours: `${totalDistractingHours.toFixed(1)}h`,24 productivity_pulse: `${productivityPulse}%`,25 days_tracked: rows.length26};Pro tip: For the trend Chart, separate the summary query data into two series by filtering the transformer output: one array for productive rows (productivity_score > 0) and one for distracting rows (productivity_score < 0), then bind each to a separate Chart data series. This creates a clearer visualization than plotting the raw productivity score number.
Expected result: A complete productivity analytics dashboard shows: summary Stat components at the top, a trend line Chart showing productive vs. distracting time over the date range, and an application usage Table ranked by time spent. The DateRangePicker controls the date range for all components.
Add category analysis and privacy-aware team configuration
Extend the dashboard with category-level insights and team configuration. Create a third query using restrict_kind=category to get time broken down by RescueTime's built-in categories (Software Development, Email, Design, Social Networking, News, etc.). Display this data in a horizontal bar Chart showing category time allocation — this gives a higher-level view of how work time is distributed across activity types. For team dashboards where multiple team members use RescueTime, add a Select component at the top of the dashboard for choosing whose data to view. Wire the selected team member's API key to the key parameter in the Resource queries using a lookup object: create a JavaScript query that maps member names to their API keys stored as configuration variables (RESCUETIME_API_KEY_ALICE, RESCUETIME_API_KEY_BOB, etc.). Pass the selected key through as a query URL parameter override. Add a clear privacy notice banner at the top of the dashboard explaining that productivity data is displayed with team members' consent and is used for context in 1:1 conversations, not for performance evaluation. This transparency is important for maintaining team trust. For teams building comprehensive engineering productivity platforms that combine RescueTime focus data with Git commit activity, Jira ticket velocity, and calendar meeting load, RapidDev can help design and build the unified Retool analytics solution.
1// JavaScript query to build team member → API key mapping2// Reads configuration variables for each team member's API key3const teamMembers = [4 { name: 'Alice', configVar: 'RESCUETIME_API_KEY_ALICE' },5 { name: 'Bob', configVar: 'RESCUETIME_API_KEY_BOB' },6 { name: 'Carol', configVar: 'RESCUETIME_API_KEY_CAROL' }7];89// Return options for the Select component10const options = teamMembers.map(member => ({11 label: member.name,12 value: retoolContext.configVars[member.configVar] || ''13}));1415// The Select component value is the API key for the chosen member16// Reference as {{ memberSelect.value }} in the Resource query's key URL parameter17return options;Pro tip: When displaying individual productivity data for team members, always get explicit consent from each team member before adding their data to a shared dashboard. Document the purpose (context for 1:1 conversations) and ensure they can see the same data about themselves that managers see. Transparency prevents resentment and maintains the psychological safety that enables honest 1:1 conversations.
Expected result: The dashboard includes a category breakdown Chart showing time distribution across work categories, and a team member Select dropdown that switches the dashboard data between different team members' RescueTime accounts using their respective API keys.
Common use cases
Team productivity analytics dashboard
Build a Retool dashboard showing daily productivity scores and focus time for a team. Query RescueTime's summary data for each team member (using individual API keys or a RescueTime for Teams account) and display trends in a Chart component showing productive hours per day over the past month. Add a Table showing each team member's weekly average productive hours, productivity score, and top productive applications with comparison to previous week.
Build a Retool team productivity dashboard that queries RescueTime's Analytic Data API for weekly summary data. Show a line Chart of daily productive hours over the past 30 days. Add Stat components for average daily productive time, average productivity pulse score, and total very productive hours for the period. Include a Table showing top applications by total time spent this week.
Copy this prompt to try it in Retool
Focus time vs. meeting time analysis
Create a Retool panel that breaks down how time is split between focus work (coding, writing, design) and communication overhead (email, Slack, video calls). Query RescueTime category-level data and calculate the ratio of deep work to communication time per day. Display a stacked bar Chart showing the daily time composition and a Stat component showing the week's focus-to-meeting ratio. Use this to identify days with excessive meeting load that disrupted deep work.
Build a Retool focus analysis panel that queries RescueTime category data for the past 4 weeks. Calculate daily time in programming/design categories versus communication categories. Show a stacked bar Chart with focus vs. communication time per day and a line showing the focus percentage trend. Add a Table showing the top 10 applications ranked by total time this month.
Copy this prompt to try it in Retool
Individual productivity review panel for 1:1 meetings
Create a Retool panel for managers to review individual team member productivity data during 1:1 meetings. Select a team member from a dropdown, choose a date range, and see their productive hours trend, top applications, productivity score history, and any significant changes in work patterns. Layer in sprint data from Jira via a separate query to show whether low-focus weeks correlate with blocked tickets or high meeting load.
Build a Retool 1:1 productivity review panel with a team member Select dropdown and date range picker. Query RescueTime for the selected member's daily summary data. Show a Chart of productive hours per day, a bar chart of top 10 applications by time, and Stat components for average daily productive hours and productivity score. Add a note that individual data is shared consensually.
Copy this prompt to try it in Retool
Troubleshooting
API returns 'Unauthorized' or 403 error when querying the /data endpoint
Cause: The API key is missing from the request, stored incorrectly in the configuration variable, or the key URL parameter name is misspelled. RescueTime requires the key as a URL parameter named exactly 'key'.
Solution: In the Retool Resource configuration, verify the URL Parameters section has a parameter named key (lowercase) with value {{ config.RESCUETIME_API_KEY }}. Verify the RESCUETIME_API_KEY configuration variable contains the correct key by navigating to Retool Settings → Configuration Variables and checking the value. Test by temporarily hardcoding the API key value directly in the URL parameter to confirm it is a key value issue, not a variable reference issue.
Query returns data but the transformer produces an empty array or 'undefined' values
Cause: RescueTime's API returns data as parallel arrays (row_headers and rows), not as key-value objects. If the transformer tries to access properties like data.date or data.productive_time directly, it will get undefined.
Solution: Use the transformer pattern that zips the row_headers array with each row array to create key-value objects. The reference transformer in Step 3 demonstrates this pattern. Verify the raw response structure by temporarily returning data; from the transformer and checking what row_headers contains for your specific restrict_kind query.
1// Check raw structure before building transformer2return { headers: data.row_headers, first_row: data.rows?.[0] };Query returns data for only the past 3 months even when requesting longer date ranges
Cause: Free RescueTime accounts have an API limitation that restricts data access to the past 3 months at daily granularity. Requesting dates beyond this range returns only the available data.
Solution: Upgrade to RescueTime Premium to access full historical data through the API. Alternatively, design the dashboard to work within the 3-month window available to free accounts by adjusting the DateRangePicker's maximum range constraint and communicating the limitation to dashboard users.
Productivity Chart shows confusing patterns because -2 to 2 scale is plotted as a line
Cause: The raw productivity_score values (-2 to 2) are not meaningful as a continuous line chart since they represent categories (very distracting, distracting, neutral, productive, very productive), not a true numeric scale.
Solution: Instead of plotting productivity_score directly, filter the data by productivity level in separate transformer queries and show each level's total hours as distinct series, or create a stacked bar chart showing hours per productivity category per day. This gives a much clearer picture of daily time composition than a jagged line oscillating between -2 and 2.
Best practices
- Store the RescueTime API key in a Retool configuration variable marked as secret, even though it is passed as a URL parameter — the secret flag prevents it from being accessible in frontend JavaScript and app context variables.
- Always obtain explicit consent from team members before adding their RescueTime data to a shared dashboard — individual productivity tracking data is personal and requires transparency about how it will be used and who can view it.
- Design the dashboard for context and coaching rather than performance evaluation — frame RescueTime data as information that helps individuals and managers have better conversations about workload and focus time, not as a surveillance metric.
- Enable Retool query caching (15-30 minutes) on RescueTime queries — productivity data does not change in real-time and caching significantly reduces API calls for shared dashboards, staying within free plan rate limits.
- Use restrict_kind=efficiency in the API query for a productivity pulse score that combines time and productivity rating into a single percentage — this is easier to explain to non-technical stakeholders than the raw -2 to 2 scale.
- Add a date range constraint to the DateRangePicker matching the 3-month free tier limit (or 12-month for premium) to prevent users from requesting data ranges that will return empty results.
- Combine RescueTime focus time data with meeting calendar data (Google Calendar or Outlook via their APIs) to build a complete picture of deep work versus meeting load per day — the combination tells a more complete story than either source alone.
Alternatives
Toggl requires manual time entry for each task, giving more granular project-level tracking, while RescueTime automatically tracks all app and website usage passively without any user action.
Harvest combines time tracking with invoicing and billing capabilities, making it better suited for client-facing agencies that need billable hour tracking alongside productivity analytics.
Clockify is a free manual time tracker focused on project-based timesheet reporting, while RescueTime provides passive automatic tracking focused on productivity scoring and app usage analysis.
Frequently asked questions
What is the difference between RescueTime's free API and the premium API?
The free RescueTime API limits data access to approximately the past 3 months at daily granularity. The premium plan extends access to full historical data and finer granularity (hourly data). RescueTime for Teams adds API access to team members' aggregated or individual data from an admin account, which is required for building multi-person team dashboards. Most API endpoints and query parameters work on both plans — the difference is in data range and access level.
Can I query other team members' RescueTime data with my own API key?
No — an individual RescueTime API key only accesses that account holder's own data. To access team members' data, you need either: a RescueTime for Teams admin account (which provides organization-level data access), or individual API keys from each team member (which they generate from their own accounts and share with you). The latter requires explicit consent and trust from each team member.
How does RescueTime classify applications and websites as productive or distracting?
RescueTime uses a default productivity categorization for common applications and websites, which users can customize in their RescueTime account settings. For example, coding tools like VS Code are rated 'Very Productive' by default, while social media sites are rated 'Very Distracting'. Users can override any categorization in their account. The classifications are user-specific — the same website can be 'Productive' for one user (a developer researching Stack Overflow) and 'Neutral' for another.
What is the RescueTime Analytic Data API and what data can I access?
The RescueTime Analytic Data API (data.rescuetime.com/anapi/data) is the primary API for accessing tracked time data. You can query data by three restrict_kind values: overview (top-level time and productivity by category), productivity (time broken down by the -2 to 2 productivity scale), activity (time per specific application or website), category (time per high-level category like Software Development or Email), document (time per document title within applications), and efficiency (a combined score). The API returns data in the row_headers plus rows parallel-array format.
Is it ethical to use RescueTime data for employee monitoring in a Retool dashboard?
This depends entirely on how the data is used and whether employees have consented to and understand the monitoring. RescueTime is most ethically used as an opt-in self-reflection tool where employees choose to share data for coaching conversations, not as covert monitoring. Always disclose what data is visible to managers, ensure employees can see the same data about themselves, and use it for supportive coaching rather than performance evaluation or disciplinary purposes. Many employment regulations also restrict covert employee monitoring — consult HR and legal counsel before deploying team-level dashboards.
Talk to an Expert
Our team has built 600+ apps. Get personalized help with your project.
Book a free consultation