Show HN: iOS Screen Time from a REST API

(thescreentimenetwork.com)

95 points | by anteloper a day ago ago

47 comments

  • alexdanilowicz a day ago ago

    As someone who currently "bricks" his phone and has gamified it a bit by sharing my stats with my brother-in-law who also does that, this is cool. I do think "not spending time on your phone" needs to be celebrated more.

    P.S. "bricks" meaning a very strict screentime set up, only basically phone + text is available M-F

    • crossman a day ago ago

      I'd love to hear more about how you gamified it what your process is

  • navs a day ago ago

    This is amazing. I've been measuring my mental wellbeing through different data points. Currently manually importing my apple health data into a Jupyter notebook and measuring against my journal sentiment, finances and whatever I can gain access to. This would be another interesting data point.

    • anteloper 21 hours ago ago

      Very cool. Are you able to get sleep data in there?

      • navs 19 hours ago ago

        I can but the raw data is very noisy. I'm still working my way through it. I'll likely share this in a blog series or via Deepnote/Hex.tech

  • ErikBjare 8 hours ago ago

    I've been building ActivityWatch as an open source local-first cross-platform time-tracker that does this too (also with an API).

    We even built an app "Thankful" which let's users donate to creators they frequent way back in 2018. Never went anywhere, but I still kinda believe in the idea.

    Nice to see you got iOS screen time working! We've tried over the years, but Apple always made it hard. I'll have a look how you approached it.

  • codethief 21 hours ago ago

    Unrelated to the REST API, I just installed your Clearspace app on my Android phone (Pixel 8 W/ GrapheneOS). I can't use the app without connecting it to my Google account and the app requires network permissions? (There are so many others on the Play Store that will sell your app usage data.) Sorry, but no.

    • anteloper 21 hours ago ago

      Understandable, but yes we need auth and would rather use third party (google) for that, all things considered. And yes we need the network.

      We don't sell your usage data.

      • codethief 11 hours ago ago

        Unfortunately, without the Google account I don't even get to the point where I could have a look at your ToS or anything like that.

        Regarding auth, would a free tier or trial version or a one-time payment (each without auth) possibly make sense?

      • sneak 19 hours ago ago

        Forcing users to have adtech surveillance platform accounts (and agree to TOS of same) to use your app isn’t a good look.

        • afavour 19 hours ago ago

          They already have Android phones so the vast vast majority already have Google accounts.

          I can see both sides. I want them to not require it but as a developer used to creating lean projects I can understand why they do.

        • nickjantz 18 hours ago ago

          Is this serious? Why is it not a good look?

          Remember 95%+ of potential users of this app have not spent a minute concerned about Googles data harvesting.

        • anteloper 17 hours ago ago

          The alternative is forcing users to create yet another account/password during signup. This always infuriates me as a user - especially in the days before iOS 18 when there was no password manager support on iOS.

          It doesn't really feel like "forcing users into adtech surveillance platforms" if they're using Android - they already have a Google account it's literally built into the operating system.

          The goal was and is to minimize friction and maximize security. For all the flaws of consumer subscription as a business model, it's beauty is that we don't have perverse incentives. Users pay us to protect their attention so we make money by being good at that. We don't have to or want to sell their data.

  • handfuloflight a day ago ago

    Could you just clarify how the data from someone's device gets to this API? Do they have to install something?

  • mspool 3 hours ago ago

    Very cool! Are you able to get a breakdown by application?

  • drag0s a day ago ago

    I love this! I think it would be even better to have a React Native SDK available and the ability to lock/unlock screen time via the API.

  • TrueGeek 10 hours ago ago

    This is awesome, but it'd be great if you allowed for apps that we wanted to use more, not less.

    I installed it and added my language learning app hoping to be able to use the API to report if I've studied enough. Unfortunately, it assumed I was trying to use this app less and immediately locked it.

  • roycebranning a day ago ago

    someone lmk me when they've built the "venmo my friend when I go over 7 hrs in a day" service...i'll sign up immediately

  • aziaziazi a day ago ago

    Hi, thanks for that interesting tool. Totally unrelated question: I love the UI, did you use a public css framework/theme?

    • anteloper a day ago ago

      Tailwind but not a publicly available theme

  • beggi a day ago ago

    Very cool! Are there plans to make it possible to restrict apps via rest API as well?

    • anteloper a day ago ago

      Yes if there's interest we'll add API functionality for

      - lock/unlock apps

      - exclude some apps from total screen time calculation

      - get data about specific app usage

  • mikaoj85 a day ago ago

    The webpage is not very usable on my iOS screen, is that on purpose?

  • awaseem 20 hours ago ago

    Wait is this just a proxy through to the clearspace app? Cool concept, might add this to Foqos (open source restrictions app). Is your API open source?

    • anteloper 20 hours ago ago

      Clearspace is the only data source right now yes. Would love to have other options feeding in. Does Foqos measure total screen time on iOS?

  • kovek 20 hours ago ago

    This is great! I am really interested in trying this out. Also, I am wondering, are there solutions similar to this but on MacOS?

    • anteloper 20 hours ago ago

      For retrieving Mac OS screen time programatically? Not that I'm aware of.

      In any Apple device, In settings -> Screen Time there's an option for "share across devices". If that is turned on, all devices will report your cumulative totals. So if you're interested in retrieving your screen time from all your devices, you can turn that on and then your iPhone will report everything, which you could retrieve with this API. But you wouldn't be able to differentiate where the screen time came from.

  • jdamon96 a day ago ago

    This looks great, excited to try it out

  • abletonlive a day ago ago

    This is a really cool concept but I unfortunately care too much about privacy to use you as the handler of all of my screen time data. I know that’s partially why y’all mention that it’s not for everybody but I would like to just say it is cool nonetheless!

  • noleary a day ago ago

    Can you extend access to everyone with the link?

    • anteloper a day ago ago

      As in allow everyone with a link to programatically retrieve your screen time data? You can't limit by link at the moment but you can go public and allow anyone to programatically access your screen time data.

      thescreentimenetwork.com is effectively a list of people doing just that. Does that answer your question?

      • noleary a day ago ago

        no I just meant the google drive link :)

        it says 'access denied' for me

  • batesy a day ago ago

    So cool. How does it work?

    • anteloper a day ago ago

      1. You create an account

      2. Log in with that account to the Clearspace app which uses on-device permission to report your data to the API

      3. Use API key associated with that account to fetch your data or be notified about changes to it

      Does that answer?

      • batesy 21 hours ago ago

        Yep. I love this, but does it require using the Cleaspace app / having a paid subscription?

        • anteloper 21 hours ago ago

          > Does it require paid subscription

          No

          > Does it require using clearspace

          Yes in the sense that it needs to downloaded and logged in on your phone. No in the sense that you don't have to open it or use it after setup

          • batesy 21 hours ago ago

            Excellent. Thanks for this!

  • preshdkumar a day ago ago

    love this idea a lot

  • trial3 19 hours ago ago

    i could not want this more, but ownership over this data is non-negotiable. i would pay a small yearly fee to support the tools that give me the ability to selfhost this.

    • otherayden 16 hours ago ago

      I wish I had a mac to build this for you, sounds like a fun project