Skip to main content

Apple Music tracks

POST /scrape accepts an individual https://music.apple.com/.../song/.../ID link or an album link with exactly one numeric ?i=TRACK_ID selection. Albums, playlists and artist pages are unsupported and rejected before lookup.

Set SOCIALCRAWL_API_KEY in the API deployment environment. The key is sent only in the x-api-key header. Socialcrawl's apple_music/track endpoint provides title and artist metadata; its preview audio is never downloaded. The service searches YouTube Music for artist title official audio, using the same song search and shared yt-dlp/MP3 pipeline as Spotify. Matches can differ from the original Apple Music recording. Audio download does not require Spotify credentials. Artwork uses Socialcrawl content.thumbnail_url when available; otherwise optional SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET enable a Spotify search matching title, artist and duration. Spotify outages or missing artwork never block the audio download. Covers are embedded in the MP3 and served as the audio thumbnail.

Socialcrawl costs 1 credit per uncached successful lookup. Contract and pricing were verified using the free utility guide and dry_run=1; production does one metadata lookup per uncached track. Each lookup has a UUID idempotency key, preserved across up to three retries and a 60-second timeout per attempt. Only explicitly retryable API errors and timeouts are retried. Withdrawn endpoints (SERVICE_UNAVAILABLE without Retry-After) are not retried. Missing/empty tracks return 404. Download retries do not repeat paid lookups. Completed MP3s use the shared cache (am-TRACK_ID) with concurrent requests deduplicated. Cache invalidation works through the gateway's cache admin API.

Run uv run uvicorn pinchana_apple_music.main:app --port 8091 inside this directory, or use the apple_music service in either Compose file.

Run the isolated tests with uv run python -m unittest discover -s tests -v.

Metadata

Release files for pinchana-apple-music 26.12.1

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

Source distribution (sdist)

Source distribution for pinchana-apple-music 26.12.1
File Size Uploaded Provenance Actions
pinchana_apple_music-26.12.1.tar.gz 6.8 kB With provenance Details for pinchana_apple_music-26.12.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pinchana-apple-music 26.12.1
File Interpreter ABI Platform Actions
pinchana_apple_music-26.12.1-py3-none-any.whl Python 3 none any Details for pinchana_apple_music-26.12.1-py3-none-any.whl

Total release size: 15.3 kB

Release files / pinchana_apple_music-26.12.1.tar.gz

Download URL pinchana_apple_music-26.12.1.tar.gz
Size 6.8 kB
Tags Source
SHA-256 checksum
How to use checksums
048b6c13ef8234d3d88fe44b414358f1693fad284a5e2f62716e11a0b6640438
BLAKE2b-256 checksum
How to use checksums
37a8270eb7a664921915c5be7866840e111357f2759804e8549e67ac8dd800c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Release files / pinchana_apple_music-26.12.1-py3-none-any.whl

Download URL pinchana_apple_music-26.12.1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d63184ed6cda8e4b76ab7ad66519b409d9a54334b834a3dab62c2116d09a25af
BLAKE2b-256 checksum
How to use checksums
43c9d86ed98e50696c903bd01c172f29fe86277b5cc5ea4723d4976a6ebf7ee0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 1, 2026.

Transparency log

Security for pinchana-apple-music 26.12.1

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 pinchana_apple_music-26.12.1.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 Dec 1, 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.

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