-
Notifications
You must be signed in to change notification settings - Fork 1
API DOCS
Pinapelz edited this page Jan 18, 2025
·
2 revisions
Version MIT
API data from Patchwork Archive is public and no API key is required to access it (subject to change)
Base URL: https://archive.pinapelz.moe/api/
Method | Path | Description |
---|---|---|
GET | /channel/<channel_id> | Gets archived videos from a particular channel |
GET | /status | Get the service status |
GET | /channel_name | Gets the name of a particular channel by channel id |
GET | /search/results | Get paginated search results for some keyword |
GET | /search/channel | Get paginated search results for channels by keyword |
GET | /video/<video_id> | Get basic information regarding a specific video |
GET | /random_video | Get a singular random video |
GET | /discover_videos | Get multiple random videos |
GET | /discover_channels | Get multiple random channels |
GET | /daily_featured_videos | Get today's daily featured videos |
GET | /recently_archived | Get the 6 most recently archived videos |
GET | /popular | Get the 6 most popular videos |
GET | /database/video_data/<video_id> | Get detailed information about the video if available |
GET | /database/status | Get the database status |
GET | /storage/status | Get the storage status |
POST | /worker/queue | Queue a video for processing |
GET | /worker/next | Get the next video in the queue |
POST | /worker/heartbeat | Send a worker heartbeat |
DELETE | /storage/delete | Delete an archived video |
- Summary
Gets archived videos from a particular channel as a paginated result.
page: integer
- 200 successful operation
application/json
pages: int
results: {
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}[]
- Summary
Get the service status.
- 200 successful operation
application/json
workers: {
name: string
status: string
timestamp: string
}[]
- Summary
Gets the name of a particular channel by channel id. Aliases are channels names previously associated with this channel_id
channel_id: string
- 200 successful operation
application/json
{
channel_name: string
description: string
aliases: string[]
}
- Summary
Get paginated search results for some keyword.
q: string
page?: integer
- 200 successful operation
application/json
pages: integer
results: {
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}[]
- Summary
Get paginated search results for channels by keyword.
q: string
page?: integer
- 200 successful operation
application/json
pages: integer
results: {
channel_id: string
channel_name: string
description: string
}[]
- Summary
Get basic information regarding a specific video.
- 200 successful operation
application/json
{
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}
- Summary
Get a singular random video.
- 200 successful operation
application/json
{
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}
- Summary
Get multiple random videos.
count?: integer
- 200 successful operation
application/json
results: {
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}[]
- Summary
Get multiple random channels.
count?: integer
- 200 successful operation
application/json
results: {
channel_id: string
channel_name: string
romanized: string
}[]
- Summary
Get today's daily featured videos.
- 200 successful operation
application/json
results: {
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}[]
- Summary
Get the 6 most recently archived videos.
- 200 successful operation
application/json
results: {
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}[]
- Summary
Get the 6 most popular videos.
- 200 successful operation
application/json
results: {
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}[]
- Summary
Get detailed information about the video if available. Used as a fallback if there is no info.json for the file
- 200 successful operation
application/json
{
video_id: string
title: string
channel_name: string
channel_id: string
upload_date: string
description: string
}
- Summary
Get the database status.
- 200 successful operation
text/plain
{
"status": "OK"
}
- Summary
Get the storage status.
- 200 successful operation
application/json
{
number_of_files: integer
storage_size: string
number_of_channels: integer
most_recent_archived_video_date: string
units: string
}
- Summary
Queue a video for processing.
X-AUTHENTICATION: string
url: string
mode: integer
- 200 successful operation
text/plain
"OK"
- 401 Unauthorized
- Summary
Get the next video in the queue.
X-AUTHENTICATION: string
- 200 successful operation
application/json
{
next_video: string
mode: integer
}
- 204 No videos in queue
- Summary
Send a worker heartbeat.
X-AUTHENTICATION: string
name: string
status: string
- 200 successful operation
text/plain
"OK"
- 401 Unauthorized
- Summary
Delete an archived video.
X-AUTHENTICATION: string
videoId: string
- 200 successful operation
text/plain
"OK"
- 401 Unauthorized