{
  "openapi": "3.1.0",
  "info": {
    "title": "Social Media Scraper API",
    "version": "2026-11-23.2",
    "description": "197 customer operations; four upstream account operations are internal only. Send authenticated requests with the documented inputs and published price version."
  },
  "servers": [
    {
      "url": "https://socialmediascraper.org"
    }
  ],
  "paths": {
    "/v1/apple_music/track": {
      "get": {
        "operationId": "apple_music_track",
        "summary": "Apple Music Track API",
        "tags": [
          "apple_music"
        ],
        "description": "Read an Apple Music track's public record to connect a song reference with catalog information.",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Record identifier used by apple_music. Send the identifier as text to preserve its full value.",
            "example": "1833328840"
          },
          {
            "name": "url",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Public apple_music content or profile URL to retrieve. Paste the complete URL, including https://.",
            "example": "https://music.apple.com/us/album/lover/1468058165?i=1468058169"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 8,
              "maxLength": 128
            }
          },
          {
            "name": "x-price-version",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Pin the expected request-price version before billing."
          }
        ],
        "security": [
          {
            "ApiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "JSON response containing request identity, normalized operation data and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "request_id",
                    "data",
                    "meta"
                  ],
                  "properties": {
                    "request_id": {
                      "type": "string"
                    },
                    "data": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "meta": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                },
                "example": {
                  "request_id": "example-request-id",
                  "data": {
                    "platform": "apple_music",
                    "resource": "post",
                    "id": "123456789",
                    "url": "https://example.com/public-fixture",
                    "title": "Example text",
                    "caption": null,
                    "published_at": null,
                    "author": {
                      "id": null,
                      "handle": null,
                      "display_name": null,
                      "verified": null
                    },
                    "media": {
                      "thumbnail_url": null,
                      "duration_ms": null,
                      "is_video": null
                    },
                    "metrics": {
                      "views": null,
                      "likes": null,
                      "comments": null,
                      "shares": null,
                      "saves": null
                    }
                  },
                  "meta": {
                    "platform": "apple_music",
                    "fetched_at": "2026-11-28T00:00:00.000Z",
                    "cached": false,
                    "schema_version": "2026-11-23.2",
                    "route_version": 1,
                    "billing": {
                      "capability": "apple_music.track",
                      "version": "2026-11-23.retail-1",
                      "currency": "USD",
                      "unit_scale": 1000000000,
                      "amount_units": 2444000,
                      "amount_usd": "0.002444000",
                      "billing_basis": "request"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Invalid API key"
          },
          "402": {
            "description": "Insufficient credits"
          },
          "429": {
            "description": "Customer request rate or concurrency limit. Follow Retry-After and retain the original request identity."
          },
          "503": {
            "description": "Service temporarily unavailable"
          }
        },
        "x-live-status": "verified",
        "x-response-kind": "post",
        "x-price": {
          "capability": "apple_music.track",
          "version": "2026-11-23.retail-1",
          "currency": "USD",
          "unit_scale": 1000000000,
          "amount_units": 2444000,
          "amount_usd": "0.002444000",
          "billing_basis": "request"
        },
        "x-pagination-fields": [],
        "x-required-any-of": [
          [
            "id",
            "url"
          ]
        ],
        "x-input-rules": [
          "Provide at least one of: id, url."
        ],
        "x-documentation-url": "https://socialmediascraper.org/apis/apple_music/track/",
        "x-markdown-url": "https://socialmediascraper.org/api-reference/apple_music.track.md"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKey": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  }
}
