2

I'm looking to retrieve a list of my Apple devices via FindMy. At the minimum, I want to retrieve my phone's location. Best case scenario, I'd like to get the location of all of my devices (Mac, Watch, AirTags, etc, etc) as well as their battery levels. This seems possible as the information is available via the FindMy app as well as through the web interface https://www.icloud.com/find/. Ideally, I'd like a way to programmatically retrieve this information. I'm pretty flexible as far as the output. I'm retrieving things like Contacts, Reminders, and Calendar already using AppleScript- but I'm not seeing a way to get FindMy info. I'm a developer and very comfortable with code and terminal, so I'm open to getting a little gritty if need be.

Does anybody have any leads on how to go about getting this data? Worst case I'm thinking I can attempt to scrape the web interface, but would prefer to use a slightly more official means, if possible.

1 Answer 1

2

There's no official API for accessing the data you seek.

As you mention, one possible method of retrieving this information would be to simply web scrape it from Apple's iCloud web site. However, you should note that this site does not offer all the information you seek - in particular for example the locations of AirTags are not exposed there.

Another method, which also makes it possible to get to the locations of AirTags, is to use private APIs on a Mac to access the information via Apple's own code. Luckily, others have already researched this option and created open source code for that purpose.

As accessing the private APIs require a specific entitlement, the most common way forward is to tag on to Mail.app as a plug-in, which makes it possible to run code with that entitlement. You can find the source code for such a plugin here:

https://github.com/seemoo-lab/openhaystack/tree/main/OpenHaystack/OpenHaystackMail

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .