Plans API Documentation
Plans API is a REST API that returns Indian prepaid recharge plans for Airtel, Jio, Vi and BSNL across 23 telecom circles as JSON. You authenticate with an X-API-KEY header, filter by operator, circle and price, and can check when the data was last updated on the status page.
Quick Start
To get started, you'll need an API key. You can obtain one from the API key signup.
- Sign up and get your API key
- Make your first API request
- Parse the JSON response
- Integrate into your application
Authentication
Requests to /v1/plans require an API key; the status endpoint does not. Include your API key in the X-API-KEY header of every request.
curl -X GET "https://api.plans.nxtbytes.com/v1/plans?operator=jio&circle=Delhi%20NCR" \
-H "X-API-KEY: YOUR_API_KEY"Important: Keep your API key secure. Never expose it in client-side code or public repositories.
Endpoints
/v1/plansReturns the active prepaid plans for one operator, sorted by price from lowest to highest. Add a circle to get the plans sold in that telecom circle, including plans available across India. Requires the X-API-KEY header.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
| operator | string | Required. One of airtel, jio, vi or bsnl (lowercase). |
| circle | string (optional) | Telecom circle (e.g., Kolkata, Uttar Pradesh West & Uttarakhand, Mumbai, Uttar Pradesh East, Delhi NCR, Rajasthan, Chennai, Madhya Pradesh & Chhattisgarh, Maharashtra & Goa, West Bengal, Gujarat, Bihar & Jharkhand, Andhra Pradesh, Odisha, Karnataka, Assam, Tamil Nadu, North East, Kerala, Jammu & Kashmir, Punjab, Haryana, Himachal Pradesh) |
| price | int (optional) | Exact plan price in rupees, e.g. 299. Omit to return every price. |
Example Response
{
"data": [
{
"price": 249,
"validity": "24 Days",
"data": "1GB/Day",
"description": "Get 1 GB/Day + Unlimited Calls + 100 SMS/Day valid for 24 Days. Post daily quota, data speed will be upto 64Kbps. Post daily SMS quota charges applicable at Rs 1/1.5 for Local/STD SMS.",
"talktime": "Truly Unlimited Calls",
"sms": "100 SMS/Day"
}
],
"success": true
}Response Fields
Every response has a success boolean. Successful responses carry a data array of plans; failed responses carry an errors array. Text fields are passed through as the operator publishes them, so formats such as “28 Days” or “1.5GB/Day” vary between operators.
| Field | Type | Description |
|---|---|---|
| price | number | Plan price in Indian rupees. |
| validity | string | Validity as published, e.g. "28 Days". |
| data | string | Data allowance, e.g. "2GB/Day" or "Unlimited". |
| talktime | string | null | Calling benefit, e.g. "Truly Unlimited Calls". |
| sms | string | null | SMS benefit, e.g. "100 SMS/Day". |
| description | string | null | The operator's full plan description, including fair-use terms. |
Status Endpoint
/v1/plans/statusReturns the time of the most recent plan-data update in Indian Standard Time. It needs no API key and does not count toward your quota, so you can poll it to decide when to refresh a local cache. The status page shows the same value.
curl "https://api.plans.nxtbytes.com/v1/plans/status"
{
"data": { "lastUpdated": "Wednesday, November 11, 2026 2:02:31 PM IST" },
"success": true
}Code Examples
Call the API from your server and keep the key in an environment variable. Each example reads PLANS_API_KEY.
JavaScript (Node.js 18+)
const response = await fetch(
"https://api.plans.nxtbytes.com/v1/plans?operator=airtel&circle=Karnataka",
{ headers: { "X-API-KEY": process.env.PLANS_API_KEY } }
);
const body = await response.json();
if (!body.success) throw new Error(body.errors[0].message);
console.log(body.data.length, "plans");Python (requests)
import os, requests
response = requests.get(
"https://api.plans.nxtbytes.com/v1/plans",
params={"operator": "vi", "circle": "Maharashtra & Goa"},
headers={"X-API-KEY": os.environ["PLANS_API_KEY"]},
timeout=10,
)
body = response.json()
for plan in body.get("data", []):
print(plan["price"], plan["validity"], plan["data"])PHP (cURL)
<?php
$ch = curl_init("https://api.plans.nxtbytes.com/v1/plans?operator=bsnl&circle=Kerala");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["X-API-KEY: " . getenv("PLANS_API_KEY")]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = json_decode(curl_exec($ch), true);
foreach ($body["data"] ?? [] as $plan) echo $plan["price"], " ", $plan["validity"], PHP_EOL;Error Handling
The API uses standard HTTP response codes to indicate success or failure. All errors return a JSON object with details.
Common Error Codes
400Bad Request
operator required or invalid operator
401Unauthorized
missing_api_key (no header), invalid (unknown key) or inactive (deactivated key)
429Too Many Requests
daily_quota_exceeded or monthly_quota_exceeded
500Server Error
Internal server error occurred
Error Response Format
{
"success": false,
"errors": [
{
"code": "BadRequest",
"message": "invalid operator"
}
]
}Rate Limits
Limits depend on your tier and are counted per API key. A request over the daily or monthly allowance returns HTTP 429 with the code TooManyRequests. Calls to the status endpoint are not counted.
Free Tier
1,000/month
100 requests per day
Pro Tier
100,000/month
10,000 requests per day