pw APIpw.live ↗
Access pw.live batch structure: subjects, lecture counts, chapter topics, notes, and exercises for any Physics Wallah study batch via 2 JSON endpoints.
What is the pw API?
The pw.live API exposes 2 endpoints that return the full structural data for Physics Wallah study batches. get_batch_subjects returns batch metadata — name, mode, exam targets, fee breakdown, and every subject with its lecture and topic counts. list_subject_topics drills into a single subject, returning paginated chapter/topic rows with per-topic video, lecture-video, notes, and exercise counts.
curl -X GET 'https://api.parse.bot/scraper/4aa78e82-4696-42c2-8d31-96f148b0c35d/get_batch_subjects?batch_id=6a6e32f0727708373e5561c8' \ -H 'X-API-Key: $PARSE_API_KEY'
Typed, relational, agent-ready
A generated client with real types, enums, and the links between objects — the structure a flat JSON response can't carry. Autocompletes in your editor and reads cleanly to coding agents.
- Fully typed · autocompletes
- Objects link to objects
- Typed errors & pagination
Typed Python client. Set up the SDK in your uv project, then pull this API’s typed client:
uv add parse-sdk uv run parse init uv run parse add --marketplace pw-live-api
uv run parse add --marketplace pulls a pinned snapshot of this canonical API — it won’t change underneath you. To customize it, subscribe and swap to your own copy.
"""Walkthrough: PW Live batch structure — subjects, teachers, and topic breakdowns."""
from parse_apis.pw_live_api import PwLive, BatchNotFound
client = PwLive()
# Fetch one batch by its 24-hex id visible in the pw.live URL path.
# Example URL: https://www.pw.live/study-v2/batches/<batch_id>/batch-overview
batch_url = "https://www.pw.live/study-v2/batches/6a6e32f0727708373e5561c8/batch-overview"
batch_id = batch_url.split("/batches/")[1].split("/")[0]
try:
batch = client.batches.get(batch_id=batch_id)
except BatchNotFound:
print("Batch does not exist or was removed.")
raise
print(batch.name, "|", batch.status, "|", batch.language)
print("Fee:", batch.fee.currency, batch.fee.total, "(list", batch.fee.price, ")")
print("Exam:", batch.exam)
print("Subjects:", batch.subject_count)
# Pick the first non-resource subject that has lectures.
subject = None
for s in batch.subjects:
if not s.is_resources and s.lecture_count > 0:
subject = s
break
if subject is not None:
print(f"\nDrilling into: {subject.name} — {subject.lecture_count} lectures, {subject.topic_count} topics")
# List topics for that subject (paginated, capped at 10 items).
for topic in batch.topics.list(subject_id=subject.subject_id, limit=10):
print(f" {topic.name}: {topic.lecture_video_count} lecture videos, {topic.notes_count} notes")
print("\nexercised: batches.get / subjects field / topics.list")
Returns one batch's overview (name, code, dates, mode, language, exam, fee) together with every subject in the batch. Each subject row carries its subject_id, the current number of lectures (lecture_count), the number of chapters/topics (topic_count), a resources flag (notice/starter-kit style subjects) and the assigned teachers. One round trip; no pagination. A batch id that the site does not recognise returns a stale_input (input_not_found) error. Use subject_id with list_subject_topics for the chapter-level breakdown.
| Param | Type | Description |
|---|---|---|
| batch_idrequired | string | 24-character hex batch id as it appears in the pw.live batch URL (…/batches/<batch_id>/…). |
{
"type": "object",
"fields": {
"fee": "object: currency (from the site's pricing config), price (list price), discount_percent, total (discounted price)",
"exam": "array of exam names the batch targets",
"mode": "string ONLINE/OFFLINE",
"name": "string batch title",
"slug": "string URL slug of the batch",
"type": "string batch type as labelled by the site",
"class": "string audience level",
"status": "string, e.g. Active",
"tagline": "string short marketing line, may be empty",
"batch_id": "string, the batch id echoed from the site",
"end_date": "ISO-8601 UTC datetime the batch ends",
"language": "string teaching language",
"sub_exam": "string exam + year label",
"subjects": "array of subject objects: subject_id, name, slug, display_order, lecture_count (integer lectures published so far), topic_count (integer chapters), is_resources (boolean), teachers (array of teacher_id, name, qualification, experience_years as string, image_url)",
"batch_code": "string site batch code",
"start_date": "ISO-8601 UTC datetime the batch starts",
"content_type": "string, e.g. LIVE",
"subject_count": "integer number of subjects returned",
"class_end_date": "ISO-8601 UTC datetime classes end",
"preview_image_url": "string image URL or null",
"registration_end_date": "ISO-8601 UTC datetime",
"registration_start_date": "ISO-8601 UTC datetime"
},
"sample": {
"data": {
"fee": {
"price": 21999,
"total": 12999.000000000002,
"currency": "INR",
"discount_percent": 41
},
"exam": [
"ESE and GATE"
],
"mode": "ONLINE",
"name": "Parakram 2.0 2027 ESE + GATE + PSUs Batch E - Civil",
"slug": "parakram-2-0-2027-ese---gate---psus-batch-e---civil-325936",
"type": "E_BATCH",
"class": "UNDER GRADUATION",
"status": "Active",
"tagline": "Targeted Batch For ESE and GATE Aspirants",
"batch_id": "6a6e32f0727708373e5561c8",
"end_date": "2027-06-30T18:29:59.000Z",
"language": "Hinglish",
"sub_exam": "ESE GATE 2027",
"subjects": [
{
"name": "Notices",
"slug": "notices-661670",
"teachers": [],
"subject_id": "6a6f6e8c80a44fd2880ff69d",
"topic_count": 5,
"is_resources": true,
"display_order": 1,
"lecture_count": 37
},
{
"name": "Physics",
"slug": "physics-830510",
"teachers": [
{
"name": "Apuroop Telidevara Sir",
"image_url": "https://static.pw.live/5eb393ee95fab7468a79d189/67b46c45-c017-44fd-95ca-aae459308fb6.png",
"teacher_id": "632f130e568ede00182143e8",
"qualification": "M.Tech IIT Kharagpur",
"experience_years": "8"
}
],
"subject_id": "6a75d0cb42c584c3f1aca7b7",
"topic_count": 7,
"is_resources": false,
"display_order": 32,
"lecture_count": 7
}
],
"batch_code": "PAR26712322",
"start_date": "2026-08-24T18:30:00.000Z",
"content_type": "LIVE",
"subject_count": 33,
"class_end_date": "2026-12-30T18:30:00.000Z",
"preview_image_url": "https://static.pw.live/5eb393ee95fab7468a79d189/ADMIN/5733f7e1-c01a-45d2-bdfe-c0717d725d64.png",
"registration_end_date": "2027-06-30T18:29:59.000Z",
"registration_start_date": "2026-07-31T18:30:00.000Z"
},
"status": "success"
}
}About the pw API
Batch Overview and Subjects
get_batch_subjects takes a single required parameter — batch_id, the 24-character hex ID from a pw.live batch URL — and returns a flat batch record alongside an array of subjects. The batch record includes name, slug, mode (ONLINE or OFFLINE), class, status, exam (array of targeted exam names), tagline, and a fee object with currency, price, discount_percent, and total. Each subject entry carries a subject_id you can pass to the second endpoint, plus lecture_count and topic_count so you can gauge subject depth before fetching topic detail.
Subject Topics with Content Counts
list_subject_topics returns a paginated list of chapters or topics for one subject within a batch. Both batch_id and subject_id are required; subject_id comes from the subjects array returned by get_batch_subjects. Each topic object includes topic_id, name, slug, display_order, and four content counters: video_count (all videos), lecture_video_count (lecture recordings specifically), notes_count, and exercise_count. The endpoint returns 20 topics per page; use the page parameter and the has_more boolean to iterate through subjects with more than 20 chapters. total_count gives the full topic count for the subject upfront, so you can calculate how many pages to fetch.
Practical Notes
Batch IDs are visible in pw.live batch URLs in the segment /batches/<batch_id>/. Subject IDs are not independently guessable — they must be harvested from the get_batch_subjects response first. Content counts (lecture_video_count, notes_count, exercise_count) reflect the state of the batch at the time of the request, making the endpoints suitable for periodic polling to track how a batch's content library grows over time.
The pw API is a managed, monitored endpoint for pw.live — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when pw.live changes and a check fails, the API is automatically queued for repair and re-verified. It is built to keep working as the site underneath it changes.
This isn't an official pw.live API — it's an independent, maintained REST wrapper over public data. Where the source has no official API (or only a limited one), Parse gives you a stable contract over a source that never promised one, and keeps it current. Need a new endpoint or field? You can revise it yourself in plain English and the agent rebuilds it against the live site in minutes — contributing the change back to the shared API is free.
Will this API break when the source site changes?+
Is this an official API from the source site?+
Can I fix or extend this API myself if I need a new endpoint or field?+
What happens if I call an endpoint that has an issue?+
- Track lecture and chapter counts across pw.live batches over time by polling
get_batch_subjectson a schedule and logging to a spreadsheet. - Compare topic depth across subjects within a batch using
topic_countandlecture_countfrom the subjects array. - Build a content progress dashboard by recording
lecture_video_count,notes_count, andexercise_countper topic across pages. - Monitor when new chapters appear in a subject by diffing
total_countfromlist_subject_topicsbetween polling runs. - Catalogue all pw.live batches targeting a specific exam using the
examarray returned byget_batch_subjects. - Identify subjects with exercises but no notes by filtering topic rows where
exercise_count> 0 andnotes_count== 0.
| Tier | Price | Credits/month | Rate limit |
|---|---|---|---|
| Free | $0/mo | 200 | 5 req/min |
| Hobby | $30/mo | 1,000 | 20 req/min |
| Developer | $100/mo | 5,000 | 100 req/min |
| Team | $300/mo | 20,000 | 300 req/min |
| Company | $1,000/mo | 100,000 | 500 req/min |
Each endpoint has a fixed posted price per successful call — most fall between 1 and 10 credits — shown on this API's page before you run it. Exceeding the rate limit returns a 429 response. Authenticate with the X-API-Key header.
Does Physics Wallah (pw.live) have an official public developer API?+
What does `list_subject_topics` return beyond video counts?+
list_subject_topics returns one row per chapter or topic in the subject, ordered by display_order. Each row includes topic_id, name, slug, four content counters (video_count, lecture_video_count, notes_count, exercise_count), plus pagination metadata: total_count, has_more, page, and page_size (fixed at 20). It does not return the actual video URLs or note files — only the counts.Can I retrieve the actual video links or PDF notes through this API?+
How do I paginate through a subject with more than 20 topics?+
page integer parameter (1-based) to list_subject_topics. Each response includes has_more (true when another page exists) and total_count (total topics in the subject). To fetch all topics, increment page until has_more is false. page_size is always 20.