Skip to content
Luca Tariciotti.

How to Query Apple's FindMy Network with Python: A Complete Guide

Luca Tariciotti 4 min read

Guide to querying Apple's FindMy network with Python for tracking AirTags and iDevices

Finding your lost tags or devices can be frustrating. This guide explains how to use FindMy.py to query Apple's FindMy network from any platform. You don't need a Mac to start.

How to Query Apple's FindMy Network with Python: A Complete Guide

If you want to find out where your AirTags, iDevices, or DIY tags are located, you might be frustrated by scattered code across different projects. This guide shows you exactly how to use FindMy.py to query Apple's FindMy network from any platform. You don't need a Mac, and you can do this from your own code.

The problem this tool solves is simple but important. Finding your lost tags or devices is a common issue, especially when you've lost a few items. Instead of hunting through multiple repositories, you can use a single, well-maintained Python library. FindMy.py brings everything together into one easy-to-use API.

This article covers what the project is, how it works, how to install it, and how to use it in your own code. You'll also find out who it is best for and what you need to know to get started.

What Is FindMy.py?

FindMy.py is a Python library that lets you query Apple's FindMy network. It supports both Apple's official accessories and custom tags from OpenHaystack. The library handles signing in with your Apple account, managing SMS 2FA, and trusted device 2FA. You can scan for nearby devices and decode their information, including public keys and status bytes.

The main idea is to give you a clean, consistent way to interact with FindMy. Whether you're building a small script or a larger application, FindMy.py is designed to fit your needs.

How Does FindMy.py Work?

The library works by connecting to the FindMy network through Apple's API. You can use either an async or a sync API to make requests. The process involves:

  1. Signing in with your Apple account.
  2. Decrypting location reports to find your devices.
  3. Scanning for nearby FindMy-devices.
  4. Decoding information such as public keys and status bytes.

If you have your own accessory keys, you can import them directly into the library. This is useful if you've set up custom tags through OpenHaystack.

The library also supports creating your own accessory keys if you need to. This gives you full control over your tagging setup.

Installing FindMy.py

To get started, you need to install the library in your Python environment. Follow these steps:

  1. Make sure you have Python 3.7 or newer.
  2. Create a virtual environment to keep your dependencies clean.
  3. Install FindMy.py using pip.

You can also link to the official repository for more details. The project is open-source, so you can explore the code and contribute if you wish.

Using FindMy.py in Your Code

Once installed, you can use FindMy.py in your own projects. Here are some practical ways to work with it:

  • Use the library to find the location of your AirTags and iDevices.
  • Scan for nearby FindMy-devices and decode their status.
  • Manage your Apple account credentials and 2FA settings.
  • Import or create your own accessory keys for custom tags.

If you need to integrate FindMy.py into a larger application, you can choose between async or sync APIs. Both options are supported, so you have flexibility depending on your project's needs.

Who Should Use FindMy.py?

FindMy.py is best for anyone who wants to track their physical items without a Mac. It's a great fit for developers who need reliable location data in their scripts. If you've lost a few items and want to find them quickly, this tool can help.

It also works well for users who have multiple FindMy devices and want to manage them all from one place. Whether you're a casual user or a power user, FindMy.py provides the functionality you need.

FAQ

How do I install FindMy.py?

Just create a virtual environment and run pip install FindMy.py. Make sure you have Python 3.7 or newer installed.

Can I use FindMy.py on Windows?

Yes, the library is cross-platform. You don't need a Mac to use it.

How do I handle 2FA?

You can use SMS 2FA or trusted device 2FA. The library supports both methods.

Is FindMy.py still maintained?

The project is actively maintained. You can check the repository for updates and contributions.

Conclusion

Using FindMy.py gives you a straightforward way to query Apple's FindMy network from any platform. It's a valuable tool for anyone who needs to track their physical items. If you're ready to try it, start by installing the library and exploring its features. You'll be able to find your lost tags and devices quickly.