APIs by Rehman Ahmad
Free, open APIs built on real data I maintain myself. No signup, no API key for normal use — just call the endpoints and build. If you ship something with them, I'd love to hear about it.
Textbooks API v1
Structured data for Pakistani curriculum textbooks — every province, class and book from my textbooks library, with chapter topics, official download links and teacher notes. Perfect for edtech apps, homework helpers, quiz builders and AI tutors targeting Pakistani students.
Base URL
https://rehmanahmad.com/api/v1Endpoints
/api/v1/classes?province=punjabList all classes in a province, with subjects and book counts.
Try it live/api/v1/books?province=punjab&class=class-5List books with filters: province, class, subject, medium, q. Supports limit and offset.
Try it live/api/v1/books/class-5--urduFull detail of one book: about, topics, teacher tips and FAQs.
Try it liveExample response
{
"ok": true,
"count": 1,
"data": [
{
"id": "class-5--urdu",
"title": "Urdu-5",
"subject": "Urdu",
"medium": "Urdu Medium",
"province": "punjab",
"class": { "slug": "class-5", "label": "Class 5", "grade": "5" },
"cover": "https://rehmanahmad.com/images/textbooks/class-5/urdu-cover-thumb.jpg",
"tagline": "…",
"pageUrl": "https://rehmanahmad.com/textbooks/class-5/urdu/"
}
]
}Code samples
JavaScript
const res = await fetch(
'https://rehmanahmad.com/api/v1/books?province=punjab&class=class-5'
);
const { data } = await res.json();
console.log(data.map(b => b.title));Python
import requests
r = requests.get(
"https://rehmanahmad.com/api/v1/books",
params={"province": "punjab", "class": "class-5"},
)
for book in r.json()["data"]:
print(book["title"], "→", book["pageUrl"])Terms
- Free for personal and commercial use.
- Attribution appreciated — a "Data by rehmanahmad.com" credit where reasonable.
- Do not re-host the PDF files — always link to the official sources the API provides.
- Be kind to the service: cache responses, don't hammer endpoints. Fair-use limits apply.
More APIs coming
Chapter quiz questions, jobs data and more are on the roadmap. Built something with the Textbooks API? Tell me — the best projects get featured here.