POST
/downloader/cache/lookupChecks if a media file matching the URL and parameters is already cached in Telegram. Returns file_id ready to send. Returns 404 if not cached. Very cheap — only 1 credit per request.
Parameters
urlrequiredstringMedia URL to download.
modeoptionalselectauto | audio | videoPreferred download mode. 'auto' picks video for video URLs, audio for audio URLs.
qualityoptionalselectmax | 2160 | 1440 | 1080 | 720 | 480 | 360Preferred video quality. 'max' picks the highest available.
Code examples
curl
curl -X POST 'https://api.anysave.click/downloader/cache/lookup' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"url": "https://youtu.be/dQw4w9WgXcQ",
"mode": "auto",
"quality": "max"
}'Response example
json
{
"status": "ok",
"data": {
"source_url": "https://youtu.be/dQw4w9WgXcQ",
"normalized_url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"service": "youtube",
"is_truncated": false,
"response_status": "tunnel",
"request_params": {
"mode": "auto",
"requested_quality": "max",
"effective_quality": "1080"
},
"cached_at": "2025-01-15T12:00:00Z",
"destination": {
"destination_id": 1,
"chat_id": -1001234567890,
"name": "main-cache"
},
"files": [
{
"type": "video",
"file_id": "BAADBAADrwAD...",
"file_unique_id": "AgADrwAD...",
"message_id": 12345,
"file_size_bytes": 15728640,
"duration": 212,
"width": 1920,
"height": 1080
}
],
"messages": [
{
"message_id": 12345,
"chat_id": -1001234567890,
"date": 1705320000
}
]
}
}