Discover/Gov API
live

Gov APIupsc.gov.in ↗

Access UPSC Civil Services and Indian Forest Service Main exam question-paper PDF links and structured question content via a clean JSON API.

Endpoint health
verified 1h ago
list_question_papers
list_all_question_papers
get_question_paper_content
3/3 passing latest checkself-healing
Endpoints
3
Updated
1h ago

What is the Gov API?

The UPSC Question Papers API exposes 3 endpoints that surface PDF links and structured question content from the UPSC Previous Year Question Papers pages, covering both Civil Services (Main) and Indian Forest Service (Main) examinations. The list_all_question_papers endpoint spans the full archive across all published years, while get_question_paper_content parses an individual PDF and returns each question with its section, page number, and text.

This call costs1 credit / call— charged only on success
Try it
Which Main examination to include. 'all' returns both Civil Services (Main) and Indian Forest Service (Main).
Comma-separated list of 4-digit exam years, e.g. 2024,2025. The scraper splits on commas — do NOT pass an array.
Optional subject name prefix of the paper label, matched case-insensitively against labels of the form '<subject> Paper - <number>'.
→ api.parse.bot/scraper/926e1695-7f06-406d-a9bb-cfb409d07576/<endpoint>
Ready to send
Fill in the parameters and hit sign in to send to see live response data here.
Call it over HTTPgrab a free API key at signup
curl -X GET 'https://api.parse.bot/scraper/926e1695-7f06-406d-a9bb-cfb409d07576/list_question_papers?exam=all&years=2024%2C2025&subject=Agriculture' \
  -H 'X-API-Key: $PARSE_API_KEY'
All endpoints · 3 totalmissing one? ·

Returns one record per question-paper PDF link found on the UPSC Previous Year Question Papers page for the selected Main examination(s), year(s) and optional subject. Each record carries the exam name and year as the site labels them, the paper label exactly as shown (e.g. one shape is 'Agriculture Paper - I'), the paper number, the absolute PDF URL and the file size shown beside the link. A subject matches only paper labels that begin with '<subject> Paper', so 'Agriculture' never matches 'Agricultural Engineering' papers. The whole listing is fetched in one request (no pagination); the page currently publishes roughly the last four years, so years outside that window return an empty papers array, which is a valid result. Records are sorted by exam, year, then paper label.

Input
ParamTypeDescription
examstringWhich Main examination to include. 'all' returns both Civil Services (Main) and Indian Forest Service (Main).
yearsstringComma-separated list of 4-digit exam years, e.g. 2024,2025. The scraper splits on commas — do NOT pass an array.
subjectstringOptional subject name prefix of the paper label, matched case-insensitively against labels of the form '<subject> Paper - <number>'.
Response
{
  "type": "object",
  "fields": {
    "count": "number of paper records returned",
    "years": "array of year strings that were applied",
    "papers": "array of paper records: exam (site exam name), year (string), paper (label as shown on the site), paper_number (roman numeral from the label), pdf_url (absolute PDF link), file_size (size text shown beside the link)",
    "subject": "subject prefix that was applied"
  },
  "sample": {
    "data": {
      "count": 8,
      "years": [
        "2024",
        "2025"
      ],
      "papers": [
        {
          "exam": "Civil Services (Main) Examination",
          "year": "2024",
          "paper": "Agriculture Paper - I",
          "pdf_url": "https://www.upsc.gov.in/sites/default/files/QP-CSM-24-AGRICULTURE-PAPER-I-031024.pdf",
          "file_size": "2 MB",
          "paper_number": "I"
        },
        {
          "exam": "Indian Forest Service (Main) Examination",
          "year": "2025",
          "paper": "Agriculture Paper - II",
          "pdf_url": "https://www.upsc.gov.in/sites/default/files/QP-IFSM-25-AGRICULTURE-PAPER-II-241125.pdf",
          "file_size": "1.16 MB",
          "paper_number": "II"
        }
      ],
      "subject": "Agriculture"
    },
    "status": "success"
  }
}

About the Gov API

What the API Covers

The API indexes question-paper PDF links published on the UPSC Previous Year Question Papers listing and its Archives page. Records carry the exam name and year exactly as labeled on the site, a paper field with the full label as printed (e.g. "General Studies Paper I"), a paper_number in roman numerals extracted from that label, a subject field, and a direct pdf_url pointing to the PDF on upsc.gov.in. Both list_question_papers and list_all_question_papers support filtering by exam (Civil Services (Main), Indian Forest Service (Main), or all), a comma-separated years string, and a case-insensitive subject prefix.

Listing Endpoints

list_question_papers reads the current Previous Year Question Papers page and returns a papers array plus a count and the years array that was applied. list_all_question_papers reads both the main listing and the Archives page in a single call, returning the same papers structure plus a years_covered array of every distinct year present in the results — useful for knowing the actual span without filtering first. Omitting years on this endpoint returns every available year from both pages.

PDF Content Endpoint

get_question_paper_content accepts a pdf_url exactly as emitted by either listing endpoint and returns a structured breakdown of the document. The header object includes exam_header_raw, header_lines_raw (verbatim OCR of the cover-page stamp), the 4-digit year parsed from it, and subject. The questions array gives each question a number, label_raw, section (letter or null), page (1-based), and text. The response also reports page_count, question_count, and flagged_entry_count for records that carry parse-quality flags. Each PDF is roughly 1–5 MB and consumes one API call.

Reliability & maintenanceVerified

The Gov API is a managed, monitored endpoint for upsc.gov.in — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when upsc.gov.in 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 upsc.gov.in 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.

Last verified
1h ago
Latest check
3/3 endpoints passing
Maintenance
Monitored & self-healing
Will this API break when the source site changes?+
It's built not to. Every endpoint is health-checked on a schedule with automated test probes. When the source site changes and a check fails, the API is automatically queued for repair and re-verified — that's the self-healing layer. Each API page shows when its endpoints were last verified. And because marketplace APIs are shared, any fix reaches everyone using it.
Is this an official API from the source site?+
No — Parse APIs are independent, managed REST wrappers over publicly available data. That is the point: where a site has no official API (or only a limited one), Parse gives you a maintained, monitored endpoint for that data and keeps it working as the site changes — so you get a stable contract over a source that never promised one.
Can I fix or extend this API myself if I need a new endpoint or field?+
Yes — and you don't have to wait on us. This API was generated by the Parse agent, which stays attached. Describe the change in plain English ("add an endpoint that returns reviews", "fix the price field") in the revise box on the API page or via the revise_api MCP tool, and the agent rebuilds it against the live site in minutes. Contributing the change back to the public API is free.
What happens if I call an endpoint that has an issue?+
Errors are machine-readable: a bad call returns a clean status with the list of available endpoints and a repair hint, so an agent (or you) can recover or trigger a fix instead of failing silently. Confirmed failures feed the automatic repair queue.
Common use cases
  • Build a searchable archive of UPSC Civil Services Main question papers filtered by year and subject.
  • Extract and index full question text from past papers for keyword or topic frequency analysis.
  • Generate subject-wise question banks for exam preparation platforms using the subject filter.
  • Track which subjects appear across years using years_covered from list_all_question_papers.
  • Automate download and parsing of new question papers each year by polling list_question_papers for the latest year.
  • Compare syllabus coverage across Indian Forest Service and Civil Services Main exams using the exam parameter.
Pricing & limitsSee full pricing →
TierPriceCredits/monthRate limit
Free$0/mo2005 req/min
Hobby$30/mo1,00020 req/min
Developer$100/mo5,000100 req/min
Team$300/mo20,000300 req/min
Company$1,000/mo100,000500 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.

Frequently asked questions
Does UPSC provide an official developer API for accessing question papers?+
No. UPSC (upsc.gov.in) does not publish a public developer API or data feed. The question papers are available only as PDF files on the website's Previous Year Question Papers and Archives pages.
What does `get_question_paper_content` return beyond raw PDF text?+
It returns a structured header object with verbatim OCR of the cover-page stamp (exam_header_raw, header_lines_raw), the 4-digit year, and subject. The questions array includes each question's integer number, label_raw, section, 1-based page, and text. A flagged_entry_count field indicates how many records carry quality flags for manual review.
Does the API cover UPSC Preliminary examination papers or other exam types beyond the two Main exams?+
Not currently. The API covers Civil Services (Main) and Indian Forest Service (Main) papers only. You can fork this API on Parse and revise it to add endpoints for Preliminary papers or other UPSC exam categories listed on the site.
How should the `years` parameter be passed to the listing endpoints?+
Pass a comma-separated string of 4-digit years, for example 2022,2023,2024. Do not pass a JSON array. Omitting years on list_all_question_papers returns records across all published years; omitting it on list_question_papers returns whatever the current (non-archive) page shows.
Does the API expose answer keys or model answers alongside the question papers?+
Not currently. The API returns question content from the question-paper PDFs only; UPSC publishes answer keys separately and those are not covered by any endpoint here. You can fork this API on Parse and revise it to add an answer-key endpoint if those documents are available at a consistent URL pattern on the site.
Page content last updated . Spec covers 3 endpoints from upsc.gov.in.
Related APIs in Government PublicSee all →