Indrives Upload API Documentation
This API allows you to create upload jobs using a direct URL or Google Drive link, and check job progress using a status endpoint.
If the same user sends the same URL with the same type again while an old job is still active, the API will return the existing job ID instead of creating a new one.
Base Endpoint
https://indrives.in/api.php
Available API Actions
| Action |
Method |
Example |
| Create direct upload job |
GET |
?api=YOUR_API_KEY&url=https://example.com/file.mp4&type=direct |
| Create Google Drive upload job |
GET |
?api=YOUR_API_KEY&url=https://drive.google.com/file/d/FILE_ID/view&type=drive |
| Check job status |
GET |
?status=JOB_ID |
Create Upload Job
Request Format
GET https://indrives.in/api.php?api=YOUR_API_KEY&url=FILE_URL&type=direct
GET https://indrives.in/api.php?api=YOUR_API_KEY&url=GOOGLE_DRIVE_LINK&type=drive
Parameters
| Parameter |
Required |
Description |
| api |
Yes |
Your API key |
| url |
Yes |
Direct file URL or Google Drive link |
| type |
Yes |
Allowed values: direct or drive |
Direct URL Upload
Example Request
https://indrives.in/api.php?api=YOUR_API_KEY&url=https://example.com/file.mp4&type=direct
cURL Example
curl "https://indrives.in/api.php?api=YOUR_API_KEY&url=https://example.com/file.mp4&type=direct"
PHP Example
<?php
$apiUrl = "https://indrives.in/api.php?api=YOUR_API_KEY&url=" . urlencode("https://example.com/file.mp4") . "&type=direct";
$response = file_get_contents($apiUrl);
echo $response;
?>
JavaScript Example
fetch("https://indrives.in/api.php?api=YOUR_API_KEY&url=" + encodeURIComponent("https://example.com/file.mp4") + "&type=direct")
.then(res => res.json())
.then(data => console.log(data));
Python Example
import requests
url = "https://indrives.in/api.php"
params = {
"api": "YOUR_API_KEY",
"url": "https://example.com/file.mp4",
"type": "direct"
}
response = requests.get(url, params=params)
print(response.json())
Google Drive Upload
Example Request
https://indrives.in/api.php?api=YOUR_API_KEY&url=https://drive.google.com/file/d/FILE_ID/view&type=drive
cURL Example
curl "https://indrives.in/api.php?api=YOUR_API_KEY&url=https://drive.google.com/file/d/FILE_ID/view&type=drive"
PHP Example
<?php
$driveLink = "https://drive.google.com/file/d/FILE_ID/view";
$apiUrl = "https://indrives.in/api.php?api=YOUR_API_KEY&url=" . urlencode($driveLink) . "&type=drive";
$response = file_get_contents($apiUrl);
echo $response;
?>
JavaScript Example
fetch("https://indrives.in/api.php?api=YOUR_API_KEY&url=" + encodeURIComponent("https://drive.google.com/file/d/FILE_ID/view") + "&type=drive")
.then(res => res.json())
.then(data => console.log(data));
Python Example
import requests
url = "https://indrives.in/api.php"
params = {
"api": "YOUR_API_KEY",
"url": "https://drive.google.com/file/d/FILE_ID/view",
"type": "drive"
}
response = requests.get(url, params=params)
print(response.json())
Check Job Status
Request Format
GET https://indrives.in/api.php?status=JOB_ID
Example
https://indrives.in/api.php?status=AbC123xyz789
cURL Example
curl "https://indrives.in/api.php?status=AbC123xyz789"
PHP Example
<?php
$statusUrl = "https://indrives.in/api.php?status=AbC123xyz789";
$response = file_get_contents($statusUrl);
echo $response;
?>
JavaScript Example
fetch("https://indrives.in/api.php?status=AbC123xyz789")
.then(res => res.json())
.then(data => console.log(data));
Python Example
import requests
response = requests.get("https://indrives.in/api.php", params={
"status": "AbC123xyz789"
})
print(response.json())
Possible Create Job Responses
1. New Job Created
{
"status": "started",
"message": "New job created",
"job_id": "AbC123xyz789",
"file_id": "XyZ987abc654"
}
2. Old Job Already Exists
{
"status": "exists",
"message": "Old job already exists",
"job_id": "AbC123xyz789",
"file_id": "XyZ987abc654",
"job_status": "downloading",
"progress_percent": 42
}
Possible Status Responses
Job In Progress
{
"id": "AbC123xyz789",
"status": "downloading",
"file_id": "XyZ987abc654",
"file_name": "video.mp4",
"file_type": "video/mp4",
"total_bytes": 104857600,
"downloaded_bytes": 52428800,
"speed_text": "12 MB/s",
"progress_percent": 50,
"error_message": null
}
Job Finished
{
"id": "AbC123xyz789",
"status": "finished",
"file_id": "XyZ987abc654",
"file_name": "video.mp4",
"file_type": "video/mp4",
"total_bytes": 104857600,
"downloaded_bytes": 104857600,
"speed_text": "",
"progress_percent": 100,
"error_message": null
}
Job Not Found
{
"status": "not_found"
}
Response Fields
| Field |
Description |
| status |
Main response status such as started, exists, downloading, finished, or not_found |
| message |
Readable API message |
| job_id |
Unique upload job ID |
| file_id |
Generated file ID for the upload job |
| job_status |
Status of existing old job when duplicate request is detected |
| progress_percent |
Current upload/download progress in percent |
| file_name |
Name of file |
| file_type |
File MIME type |
| total_bytes |
Total file size in bytes |
| downloaded_bytes |
Downloaded size in bytes |
| speed_text |
Current download speed text |
| error_message |
Error details if job fails |
Notes
- Allowed upload types are only
direct and drive.
drive is internally converted to googleDrive.
- If the same user sends the same URL and same type again while the job is active, no new job is created.
- Use the returned
job_id with ?status=JOB_ID to track progress.