Skip to main content

iCloud Resolver

A fast and lightweight Python library and CLI tool to securely resolve and download files from iCloud Drive public links.

How it works

When you share a public iCloud Drive link (e.g., https://www.icloud.com/iclouddrive/...), it is not a direct file download link. Instead, it leads to Apple's web application.

This tool bypasses the browser by interacting directly with Apple's public CloudKit API. It parses the unique identifier from the link, queries the iCloud database, and safely retrieves the original filename along with the highly-secure, direct downloadURL. Finally, it streams the file directly to your disk with a progress bar.

(Note: iCloud Drive folders are currently not supported because downloading them requires user authentication and dynamic zip archiving).


Command Line Interface (CLI)

You can run this tool instantly from your terminal using zero-install execution tools like uvx or pipx:

# Using uvx
uvx icloud-resolver "https://www.icloud.com/iclouddrive/0afGK6zDBog_0drwp6YZoDLIg#Patches"

# Using pipx
pipx run icloud-resolver "https://www.icloud.com/iclouddrive/0afGK6zDBog_0drwp6YZoDLIg#Patches"

If you install the package globally (e.g. uv tool install .), it exposes two aliases that you can use interchangeably: icloud-resolver and the shorter icr.

CLI Options

  • Download to the current directory:

    icr "https://www.icloud.com/iclouddrive/..."
    
  • Specify an output directory or custom file name:

    icr -o ./my_downloads "https://www.icloud.com/iclouddrive/..."
    icr -o custom_file.zip "https://www.icloud.com/iclouddrive/..."
    
  • Only resolve the URL (print the direct download link without downloading):

    icr -r "https://www.icloud.com/iclouddrive/..."
    

Programmatic Usage

You can also import icloud-resolver directly into your own Python scripts. The library features robust custom exceptions for smooth programmatic error handling.

example.py

from icloud_resolver import resolve_icloud_link, download_file
from icloud_resolver.exceptions import (
    ICloudResolverError, 
    FolderNotSupportedError
)

url = "https://www.icloud.com/iclouddrive/0afGK6zDBog_0drwp6YZoDLIg#Patches"

# Example 1: Resolving the link without downloading
try:
    direct_url, filename = resolve_icloud_link(url)
    print(f"Original Name: {filename}")
    print(f"Direct Link: {direct_url}")
except FolderNotSupportedError:
    print("Oops! This link points to a folder, which is unsupported.")
except ICloudResolverError as e:
    print(f"Something went wrong: {e}")

# Example 2: Downloading the file directly
try:
    # Set target_path to a directory to auto-use the original filename, 
    # or set it to a full path to use a custom filename.
    saved_path = download_file(url, target_path=".")
    print(f"File successfully downloaded to: {saved_path}")
except ICloudResolverError as e:
    print(f"Download failed: {e}")

Metadata

Release files for icloud-resolver 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for icloud-resolver 0.1.0
File Size Uploaded Provenance Actions
icloud_resolver-0.1.0.tar.gz 4.1 kB With provenance Details for icloud_resolver-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for icloud-resolver 0.1.0
File Interpreter ABI Platform Actions
icloud_resolver-0.1.0-py3-none-any.whl Python 3 none any Details for icloud_resolver-0.1.0-py3-none-any.whl

Total release size: 9.9 kB

Release files / icloud_resolver-0.1.0.tar.gz

Download URL icloud_resolver-0.1.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
91a52eefd0331c0123d2909e1799014334fb8e7585a42d1d986fa3ef6da8aafa
BLAKE2b-256 checksum
How to use checksums
bc37dea8ac20501eb4d16926c4df656a5d77d4e1cda82fd3859414dfea5dac93
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Release files / icloud_resolver-0.1.0-py3-none-any.whl

Download URL icloud_resolver-0.1.0-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8e12065aefee98d1a9b0e2d0e2ffe1b5b4313bfdf3bb98770ea7b8614164abf
BLAKE2b-256 checksum
How to use checksums
d5b309c3d45ed5c98995c3fc30a5d071d030d6d427c7babe2214646697480455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

Security for icloud-resolver 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for icloud_resolver-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page