Access iCloud Notes with CloudKit

7.1k views Asked by At
3

There are 3 answers

0
Clifton Labrum On

Are you referring to Apple's Notes app? https://support.apple.com/guide/notes/welcome/mac

If so, then no, there aren't APIs for accessing that data. It's in one of Apple's CloudKit containers and can only be accessed by the Notes app.

2
test On

do you know this? you can use it. but unofficial. https://github.com/MauriceConrad/iCloud-API

1
ma11hew28 On

I don't think there's a public API for accessing iCloud Notes. This answer by test links to this project that uses Apple's private iCloud API.

However, Apple iCloud Terms Section VBi forbids "accessing the Service through any automated means, like scripts or web crawlers", and Section VIIB says:

Apple may at any time, under certain circumstances and without prior notice, immediately terminate or suspend all or a portion of your Account and/or access to the Service. Cause for such termination shall include: (a) violations of this Agreement . . .

If you'd like to understand how Apple's private API works, I don't think—although don't quote me on this—that their terms forbid you from observing the network traffic that occurs during your authorized use of iCloud Notes.

For example, from your desktop or laptop computer, you could use Google Chrome to inspect the network activity of iCloud Notes:

  1. Read up on how HTTP works.
  2. Go to https://www.icloud.com/notes/ in Google Chrome and sign in to iCloud.
  3. Go to View > Developer > Developer Tools (⌥⌘I).
  4. Click on the Network tab.
  5. Refresh the page (⌘R).
  6. Wait for all activity indicators on the page to disappear.
  7. Clear the logged network activity by clicking the ⦸ button.
  8. Click on one of your unselected notes to load it.
  9. Click on the XHR request that appears in the Network Log to see more details.

There's probably also a way to inspect the network traffic of the macOS (or iOS) Notes app.