Premium Content Guide

What is premium content in CDS?

Premium content is content that NPR makes available only to certain subscribers of NPR platforms (e.g., NPR+) and authorized third-party platforms. Premium content is labeled as “premium content” and identified as such within its metadata. Any unauthorized use of CDS or violation of the CDS API Terms of Use may jeopardize a user’s future access to the CDS API and CDS.

General “rule of thumb” for premium content in CDS

Premium content is meant only for those who have an agreement with NPR; it is otherwise meant to be filtered out or ignored. As mentioned above, refer to the CDS API Terms of Use for more details.

Identifying premium content

NPR has taken certain steps to protect and maintain premium content tagged “premium” (See below for examples of where this tag is located for each use case). As a reminder, users of the CDS API are not authorized to use premium content and any content tagged with “premium” is restricted to those subscribers that have an agreement with NPR to use premium content.

Premium Audio

The location of the premium tag for audio will be in the assets array of document profiles as a rel type. Here is a copy of JSON from a sample document that has premium audio as well as non-premium audio (URLs are removed here to prevent leaking premium audio). The first item in the array has premium content, the second does not:

"assets": [
    "1164523724": {
        "duration": 2895,
        "embeddedPlayerLink": {
            "href": "https://www.npr.org/-----"
        },
        "enclosures": [
            {
                "fileSize": 46332910,
                "href": "https://-----ft=premium",
                "rels": [
                    "tracked",
                    "premium"
                ],
                "type": "audio/mpeg"
            }
        ],
        "id": "1164523724",
        "isAvailable": true,
        "isDownloadable": true,
        "isEmbeddable": true,
        "isStreamable": false,
        "profiles": [
            {
                "href": "/v1/profiles/audio",
                "rels": [
                    "type"
                ]
            },
            {
                "href": "/v1/profiles/document"
            }
        ],
        "title": "Listen to the Story"
    },
    "1167436404": {
        "duration": 1489,
        "embeddedPlayerLink": {
        "href": "https://www.npr.org/player/embed/1166879223/1167436404"
        },
        "enclosures": [
        {
            "fileSize": 23829987,
            "href": "https://ondemand.npr.org/anon.npr-mp3/npr/sam/2023/03/20230331_sam_dba56aa8-de0c-4e2f-ab59-25d1812f4b5b.mp3?d=1489&size=23829987&e=1166879223&t=podcast&p=510317",
            "type": "audio/mpeg"
        },
        {
            "fileSize": 23829987,
            "href": "https://play.podtrac.com/npr-510317/edge1.pod.npr.org/anon.npr-mp3/npr/sam/2023/03/20230331_sam_dba56aa8-de0c-4e2f-ab59-25d1812f4b5b.mp3?d=1489&size=23829987&e=1166879223&t=podcast&p=510317&awEpisodeId=1166879223&awCollectionId=510317",
            "rels": [
            "sponsored",
            "tracked"
            ],
            "type": "audio/mpeg"
        }
        ],
        "id": "1167436404",
        "isAvailable": true,
        "isDownloadable": true,
        "isEmbeddable": true,
        "isStreamable": false,
        "profiles": [
        {
            "href": "/v1/profiles/audio",
            "rels": [
            "type"
            ]
        },
        {
            "href": "/v1/profiles/document"
        }
        ],
        "title": "Listen to the Story",
        "transcriptLink": {
        "href": "/v1/documents/1167436404-transcript",
        "rels": [
            "extension"
        ]
        },
        "transcriptWebPageLink": {
        "href": "https://www.npr.org/transcripts/1166879223"
        }
    }
]

In the first item in the array (Asset 1164523724) there is a rel type of premium in the rels array. This indicates that the audio is premium content. If you do not have express permissions from NPR to use premium audio, then you must filter assets with rel type premium out when parsing a documents audio enclosures. The second asset in the array (1167436404) has two enclosures, each without a premium rel type in the rels array. Therefore both enclosures are safe to use in the second audio asset. There should not be a case where an audio asset has both enclosures with premium in the rels and ones without, but it is best to filter out on the enclosure level as a best practice.

Another way to spot premium audio in a document is to look for a premiumAudio array:

{
    "premiumAudio": [
        {
            "href": "#/assets/1164523724",
            "rels": [
                "npr-plus"
            ]
        }
    ]
}

In the above example, there is a JSON link to the asset shown in the first JSON example for this section. You can use that to easily filter out just the asset ID from the list of assets. The rel here indicates just the provider intended for the audio (Not all providers use the same premium audio).


© 2024 npr