Get a video
curl --request GET \
--url https://api.pnplayer.com/v1/api/video/{videoId} \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/video/{videoId}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.pnplayer.com/v1/api/video/{videoId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pnplayer.com/v1/api/video/{videoId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pnplayer.com/v1/api/video/{videoId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pnplayer.com/v1/api/video/{videoId}")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/video/{videoId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"videoId": "<string>",
"title": "<string>",
"availableResolutions": "360p,720p,1080p",
"length": 123,
"status": 123,
"encodeProgress": 123,
"storageSize": 123,
"captions": [
{
"srclang": "en",
"label": "English",
"ext": "vtt"
}
],
"streamUrl": "<string>",
"chaptersUrl": "<string>",
"hlsUrl": "<string>",
"preview": "<string>",
"thumbnail": "<string>",
"tags": [
{
"id": 123,
"name": "<string>"
}
],
"metaTags": [
{
"key": "author",
"value": "Jane Citizen"
}
],
"audioStatus": "pending",
"audioUrl": "<string>",
"alignStatus": "pending"
}{
"message": "Forbidden"
}Videos
Get a video
Returns full details for one video, including stream URLs, caption tracks, tags, meta tags and processing state. Requires the READ_MEDIA scope.
GET
/
v1
/
api
/
video
/
{videoId}
Get a video
curl --request GET \
--url https://api.pnplayer.com/v1/api/video/{videoId} \
--header 'X-Auth-Token: <api-key>'import requests
url = "https://api.pnplayer.com/v1/api/video/{videoId}"
headers = {"X-Auth-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Auth-Token': '<api-key>'}};
fetch('https://api.pnplayer.com/v1/api/video/{videoId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.pnplayer.com/v1/api/video/{videoId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Auth-Token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pnplayer.com/v1/api/video/{videoId}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Auth-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pnplayer.com/v1/api/video/{videoId}")
.header("X-Auth-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pnplayer.com/v1/api/video/{videoId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Auth-Token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"videoId": "<string>",
"title": "<string>",
"availableResolutions": "360p,720p,1080p",
"length": 123,
"status": 123,
"encodeProgress": 123,
"storageSize": 123,
"captions": [
{
"srclang": "en",
"label": "English",
"ext": "vtt"
}
],
"streamUrl": "<string>",
"chaptersUrl": "<string>",
"hlsUrl": "<string>",
"preview": "<string>",
"thumbnail": "<string>",
"tags": [
{
"id": 123,
"name": "<string>"
}
],
"metaTags": [
{
"key": "author",
"value": "Jane Citizen"
}
],
"audioStatus": "pending",
"audioUrl": "<string>",
"alignStatus": "pending"
}{
"message": "Forbidden"
}Authorizations
apiKeyAuthbearerAuth
API key created in the dashboard or via POST /v1/api/api-keys. Keys are prefixed pn_ and do not expire until revoked.
Path Parameters
Video ID (GUID)
Example:
"657bb740-a71b-4529-a012-528021c31a92"
Response
Video details
Comma-separated encoded resolutions
Example:
"360p,720p,1080p"
Duration in seconds
See VideoSummary.status
Size in bytes
Show child attributes
Show child attributes
Base CDN URL for the account
WebVTT chapters file
Animated preview (WebP)
Poster image (JPEG)
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Standalone audio extraction state
Available options:
pending, ready, failed, null M4A audio URL, present when audioStatus is ready
Karaoke alignment job state
Available options:
pending, ready, failed, null 