Access iCloud Notes with CloudKit
Asked Answered
F

3

7

Is there a way to get iCloud Notes with CloudKit? I have looked at the documentation :

https://developer.apple.com/library/archive/documentation/DataManagement/Conceptual/CloudKitWebServicesReference/index.html

https://developer.apple.com/documentation/cloudkit

But no way to find how to access Notes data.

Fundamental answered 7/11, 2018 at 13:54 Comment(0)
S
4

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.

Sudden answered 9/8, 2021 at 2:8 Comment(1)
As of 2023, the terms use more specific language: "interfere with or disrupt the Service (including accessing the Service through any automated means, like scripts or web crawlers)". Not a lawyer but it seems that accessing through automated means should not be an issue if you're not causing problems.Mulligan
C
3

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

Closegrained answered 25/4, 2019 at 1:10 Comment(2)
What is it about?Dyad
@ChrisCatignani judging by the README file, I think it uses Apple's private iCloud API. See my answer.Sudden
S
2

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.

Saida answered 13/11, 2018 at 21:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.