NPR Sponsorship Service
npr · Media
Sponsorship for non-NPR One client applications
Authentication
Sample Requests
**Not** for use by NPR One clients (for whom sponsorship is already integrated into the Listening Service), this endpoint is designed to be used by our other client applications to request sponsorship on behalf of a user. Sponsorship units are returned in the form of VAST XML. It is worth noting tha
Hover any highlighted part to learn what it does
| Authorization | example |
curl -X GET "https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads?adCount=1&forceResult=true" \ -H "Authorization: example"
import requests
params = {
"adCount": "1",
"forceResult": "true"
}
headers = {
"Authorization": "example"
}
response = requests.get(
"https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads');
url.searchParams.set('adCount', '1');
url.searchParams.set('forceResult', 'true');
const response = await fetch(url, {
headers: {
'Authorization': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads")
q := baseURL.Query()
q.Set("adCount", "1")
q.Set("forceResult", "true")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("GET", targetURL, nil)
req.Header.Set("Authorization", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads")
uri.query = URI.encode_www_form({
"adCount" => "1",
"forceResult" => "true"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Get.new(uri)
req["Authorization"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads?" . http_build_query([
"adCount" => "1",
"forceResult" => "true"
]);
$opts = ["http" => [
"method" => "GET",
"header" => implode("\r\n", [
"Authorization: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));**Not** for use by NPR One clients (for whom sponsorship is already integrated into the Listening Service), this endpoint is designed to be used by our other client applications to submit tracking information for sponsorship units obtained from the `GET /sponsorship/v2/ads` endpoint. The tracking i
Hover any highlighted part to learn what it does
| Authorization | example |
curl -X POST "https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads" \ -H "Authorization: example"
import requests
headers = {
"Authorization": "example"
}
response = requests.post(
"https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads",
headers=headers,
)
print(response.json())const url = 'https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads';
const response = await fetch(url, {
method: 'POST',
headers: {
'Authorization': 'example'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
)
func main() {
targetURL := "https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads"
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("Authorization", "example")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["Authorization"] = "example"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/npr.org/sponsorship/2/v2/ads";
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"Authorization: example"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with NPR Sponsorship Service?
NPR Sponsorship Service is a Media API. Developers commonly use media APIs for:
- storing and delivering images, video, and audio
- building digital asset management and media libraries
- transcoding and optimising media for the web
- adding video streaming and playback to your app
- automating content tagging and metadata extraction
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. NPR Sponsorship Service is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide