Patchwork Archive API
Version MIT
API data from Patchwork Archive is public and no API key is required to access it (subject to change)
Path Table
Method | Path | Description |
---|---|---|
GET | /channel/{channel_id} | Gets archived videos from a particular channel |
GET | /channel_name | Gets archived videos from a particular channel |
GET | /daily_featured_videos | Get today's daily features videos |
GET | /database/status | Get the status of the database |
GET | /database/video_data/{video_id} | Get detailed information about the video if available |
GET | /discover_videos | Get multiple random videos |
GET | /random_video | Get a singular random video |
GET | /recently_archived | Get the 6 most recently archived videos |
GET | /search/results | Get paginated search results for some keyword |
GET | /storage/status | Get the status of the database |
GET | /video/{video_id} | Get basic information regarding a specific video |
Reference Table
Name | Path | Description |
---|---|---|
Channel | #/components/schemas/Channel | |
Video | #/components/schemas/Video |
Path Details
[GET]/channel/
Summary
Gets archived videos from a particular channel as a paginated resultDescription
Gets a paginated result of archived videos matching a channel id. Returns 12 videos per page. Pages is the number of pages available
Parameters(Query)
page: integer
Responses
- 200 successful operation
application/json
pages: int
{
channel_id: string
channel_name: string
description: string
title: string
upload_date: string
video_id: string
}[]
[GET]/channel_name
Summary
Gets the name of a particular channel by channel idDescription
Returns an alternative JSON if the look up fails or the channel id doesn't exist in the database
Parameters(Query)
channel_id: string
Responses
- 200 successful operation
application/json
{
channel_name?: string
}
- 200 successful operation but failed look up
{
error?: string
}
[GET]/daily_featured_videos
Summary
Get today's daily featured videosDescription
Either 1 or 2 video objects in an array depending on calculated hash
Responses
- 200 successful operation
application/json
{
channel_id: string
channel_name: string
description: string
title: string
upload_date: string
video_id: string
}[]
[GET]/database/status
- Summary
Get the status of the database
Responses
- 200 successful operation.
text/plain
{
"properties": {
"OK": {
"type": "string",
"example": "OK"
}
}
}
- 500 database is down
application/json
{
"properties": {
"FAIL": {
"type": "string",
"example": "500"
}
}
}
[GET]/database/video_data/
Summary
Get detailed information about the video if availableDescription
If info.json generated by yt-dlp is available it will be directly delivered here, if not, fallback video data from the database is used instead
Responses
- 200 successful operation.
application/json
{
channel_id: string
channel_name: string
description: string
title: string
upload_date: string
video_id: string
}
[GET]/discover_videos
- Summary
Gets randomly chosen videos from the database
Parameters(Query)
count?: integer
Responses
- 200 successful operation
application/json
{
channel_id: string
channel_name: string
description: string
title: string
upload_date: string
video_id: string
}[]
[GET]/random_video
- Summary
Get a singular random video
Responses
- 200 successful operation
application/json
{
channel_id: string
channel_name: string
description: string
title: string
upload_date: string
video_id: string
}
[GET]/recently_archived
- Summary
Get the 6 most recently archived videos
Responses
- 200 successful operation
application/json
{
channel_id: string
channel_name: string
description: string
title: string
upload_date: string
video_id: string
}[]
[GET]/search/results
- Summary
Get paginated search results for some keyword
Parameters(Query)
q: string
page?: integer
Responses
- 200 successful operation
application/json
page: integer
{
channel_id: string
channel_name: string
description: string
title: string
upload_date: string
video_id: string
}[]
[GET]/storage/status
Summary
Get the status of the databaseDescription
Gets the number of videos archived and space used in GB
Responses
- 200 successful operation.
application/json
number_of_files: integer
storage_size: string
[GET]/video/
Summary
Get basic information regarding a specific videoDescription
Pulls basic information about a video from fallback database only
Responses
- 200 successful operation
application/json
{
channel_id?: string
channel_name?: string
description?: string
title?: string
upload_date?: string
video_id?: string
}
- 404 Video not found
application/json
{
error?: string
}