Can you export Screen Time to CSV?
Updated
Not from Apple's Screen Time; it has no CSV or any other export. On a Mac you can make a CSV yourself by querying the system database knowledgeC.db with the built-in sqlite3 tool, after giving Terminal Full Disk Access. It only covers the last four weeks or so, and the numbers may not match Apple's report exactly. Without a Mac, the only route is typing numbers from screenshots into a spreadsheet.
Make a CSV from knowledgeC.db on a Mac
- Open Apple menu > System Settings > Privacy & Security > Full Disk Access, turn it on for Terminal (use the + button to add it if it isn't listed), then quit and reopen Terminal.
- Make a working folder:
mkdir -p ~/Desktop/screentime-copy - Copy the database and its companion files, so you never touch the live one:
cp ~/Library/Application\ Support/Knowledge/knowledgeC.db* ~/Desktop/screentime-copy/ - Check that the copy opened:
sqlite3 ~/Desktop/screentime-copy/knowledgeC.db ".tables"should list tables includingZOBJECTandZSOURCE. - Run the query below with CSV output, sending it to a file on your Desktop.
- Open
screen-time.csvin Numbers or Excel. - Turn Full Disk Access for Terminal back off if you don't need it anymore.
The query adds up app usage per day and per app. Timestamps in this database are Mac absolute time, seconds since January 1, 2001, so adding 978307200 turns them into normal Unix time:
sqlite3 -header -csv ~/Desktop/screentime-copy/knowledgeC.db "
SELECT
date(o.ZSTARTDATE + 978307200, 'unixepoch', 'localtime') AS day,
o.ZVALUESTRING AS app,
ROUND(SUM(o.ZENDDATE - o.ZSTARTDATE) / 60.0, 1) AS minutes,
s.ZDEVICEID AS device
FROM ZOBJECT o
LEFT JOIN ZSOURCE s ON o.ZSOURCE = s.Z_PK
WHERE o.ZSTREAMNAME = '/app/usage'
GROUP BY day, app, device
ORDER BY day, minutes DESC;
" > ~/Desktop/screen-time.csv
app is the bundle identifier, such as com.apple.Safari. device separates rows from different devices when other devices' data is present. Website time is in a separate stream, /app/webUsage, which you can query the same way.
Read the result carefully
- It's a short window. The database is pruned on about the same schedule as the report, so you'll get roughly four weeks. Run it again regularly and keep each CSV if you want a longer history.
- It may not match Screen Time. Since macOS 13, Apple also records much usage data in a newer store called Biome (
~/Library/Biome), whose format is undocumented. Depending on your macOS version,knowledgeC.dbmay be missing some usage, and overlapping or very short sessions are counted differently than in Apple's report. - It can stop working. Apple doesn't document these tables, and an update can rename or empty them. If the query returns nothing, check
SELECT DISTINCT ZSTREAMNAME FROM ZOBJECT;to see what streams your version stores. - "Operation not permitted" means Terminal doesn't have Full Disk Access yet, or you didn't restart Terminal after granting it.
More background on the file is in knowledgeC.db and Screen Time.
Without a Mac: screenshots and a manual log
On iPhone there's no file to query. Instead:
- Open Settings > Screen Time > Daily Average (on iOS 26 and earlier: See All App & Website Activity), screenshot each Week or Day view and the Most Used list.
- Create a spreadsheet with columns for date, app and minutes, and type the values in. Live Text lets you copy numbers straight from a screenshot.
- Save the file as CSV from Numbers (File > Export To > CSV) or Google Sheets.
It's tedious for daily per-app data, but realistic for weekly totals. You can also turn on Share Across Devices so your iPhone's usage reaches a Mac, then use the method above. See exporting from iPhone.
Where Screen Time History helps
Screen Time History is a Mac app that reads the same Screen Time data with Full Disk Access, so you don't need Terminal or SQL. It keeps every day from the day you install it, including your iPhone when Share Across Devices is on, and exports daily per-app time for the whole history. It can't export days Apple removed before installation.