CourseHero APIcoursehero.com ↗
Fetch CourseHero document metadata and list course documents via two endpoints. Get title, school, course, page count, view count, and preview thumbnail URLs.
What is the CourseHero API?
The CourseHero API gives developers two endpoints for accessing publicly visible document and course data on CourseHero. get_document returns 10 metadata fields for a single file — including school name, course label, page count, and view count — identified by its numeric file ID. list_course_documents returns every document on a course landing page in one call, with thumbnail URLs, doc types, and per-document view counts.
curl -X GET 'https://api.parse.bot/scraper/1b2ce5eb-2f5d-46d8-b58c-0c1b204878e5/get_document?file_id=146931016' \ -H 'X-API-Key: $PARSE_API_KEY'
Returns the public landing-page metadata for one CourseHero document (one round trip): file title/filename, school, department and course, uploader, upload date (the site's own date for the document, in the site's 'YYYY-MM-DD HH:MM:SS' form — CourseHero publishes no separate exam date), view/rating counts, total page_count, and the pages shown in the free preview. Each preview page carries the direct absolute URLs of the page background images the site serves for that page (WebP, rendered at 640px page width); a page split into several slices repeats the same page image with different top/bottom pixel offsets. Pages beyond the free preview (preview_end_page < page_count) have no image. Nonexistent ids currently come back from the site as an HTML error page and are passed through as upstream_error.
| Param | Type | Description |
|---|---|---|
| file_idrequired | string | Numeric document id from the CourseHero file URL (the digits after /file/). |
{
"type": "object",
"fields": {
"title": "document title as stored by the site (usually the uploaded filename)",
"file_id": "numeric document id as a string",
"filename": "original uploaded filename",
"course_id": "integer site id of the course",
"school_id": "integer site id of the institution",
"seo_title": "full HTML/og title of the page",
"page_count": "total pages in the document",
"view_count": "integer total views",
"course_name": "course label (department code plus number)",
"school_name": "institution name",
"upload_date": "site upload timestamp, 'YYYY-MM-DD HH:MM:SS'",
"page_heading": "headline shown on the page (title plus first text snippet, truncated)",
"rating_count": "integer number of ratings",
"canonical_url": "canonical CourseHero page URL for the document",
"course_number": "course number as a string",
"department_id": "integer site id of the department",
"preview_pages": "array of {page_number, slice_count, images:[{slice_index, image_url, top_px, bottom_px, height_px}]} ordered by page number",
"professor_name": "professor name or null when not set",
"rating_average": "number, average rating (0 when unrated)",
"department_code": "department code, e.g. STAT",
"department_name": "department display name or null when the site has none",
"created_at_epoch": "upload time as Unix seconds",
"preview_end_page": "last page number included in the free preview",
"uploader_username": "username of the uploading member",
"preview_page_count": "number of preview pages for which images were found",
"preview_start_page": "first page number included in the free preview"
},
"sample": {
"data": {
"title": "Exam_2022.pdf",
"file_id": "146931016",
"filename": "Exam_2022.pdf",
"course_id": 4269439,
"school_id": 79633,
"seo_title": "Exam 2022.pdf - Instructions to Candidates: a Attempt all four questions which carry a total of 100 marks. b The answer script should be submitted | Course Hero",
"page_count": 4,
"view_count": 36,
"course_name": "STAT 2006",
"school_name": "The Chinese University of Hong Kong",
"upload_date": "2022-05-07 07:21:30",
"page_heading": "Exam 2022.pdf - Instructions to Candidates: a Attempt all...",
"rating_count": 0,
"canonical_url": "https://www.coursehero.com/file/146931016/Exam/",
"course_number": "2006",
"department_id": 377830,
"preview_pages": [
{
"images": [
{
"top_px": 0,
"bottom_px": 906,
"height_px": 906,
"image_url": "https://www.coursehero.com/asset/bg/blur/c9a815466a5a9ec65deb45c776eded3fdbfbd730/splits/page-1-html-bg-bbb061af9990690ea905b2301cae08488d8cebe4.webp",
"slice_index": 0
}
],
"page_number": 1,
"slice_count": 1
},
{
"images": [
{
"top_px": 0,
"bottom_px": 231.5,
"height_px": 231.5,
"image_url": "https://www.coursehero.com/asset/bg/blur/c9a815466a5a9ec65deb45c776eded3fdbfbd730/splits/page-2-html-bg-276c491c5e3bc0083c28d0f7e8236649a4b38b8d.webp",
"slice_index": 0
},
{
"top_px": 231.5,
"bottom_px": 814.5,
"height_px": 583,
"image_url": "https://www.coursehero.com/asset/bg/blur/c9a815466a5a9ec65deb45c776eded3fdbfbd730/splits/page-2-html-bg-276c491c5e3bc0083c28d0f7e8236649a4b38b8d.webp",
"slice_index": 1
}
],
"page_number": 2,
"slice_count": 2
},
{
"images": [
{
"top_px": 0,
"bottom_px": 600.5,
"height_px": 600.5,
"image_url": "https://www.coursehero.com/asset/bg/blur/c9a815466a5a9ec65deb45c776eded3fdbfbd730/splits/page-3-html-bg-1271d7c39d1da6738e649431ca01d494a0f1a047.webp",
"slice_index": 0
}
],
"page_number": 3,
"slice_count": 1
}
],
"professor_name": null,
"rating_average": 0,
"department_code": "STAT",
"department_name": null,
"created_at_epoch": 1651926090,
"preview_end_page": 3,
"uploader_username": "John Doe",
"preview_page_count": 3,
"preview_start_page": 1
},
"status": "success"
}
}About the CourseHero API
Endpoints
The API has two endpoints. get_document accepts a file_id (the digits from a /file/ URL) and returns the document's title, filename, seo_title, page_count, view_count, course_name, school_name, and integer course_id and school_id values. This covers the public landing-page metadata for a single document without needing to know its course or school in advance.
Listing Course Documents
list_course_documents accepts a numeric course_id and school_id (both found in CourseHero sitemap URLs) and returns the full document list for that course page in a single response — no pagination. Each item in the documents array includes file_id, file_url, title, description (first-page text snippet), doc_type (for example notes), thumbnail_url, thumbnail_hash, view_count, and has_answers. The response also carries course-level fields: course_title, course_number, department_id, canonical_url, and the is_complete flag that indicates whether document_count equals total_document_count.
Response Coverage
Both endpoints work with numeric IDs that appear in CourseHero's public URLs, so no prior authentication or session is needed to call them. get_document and list_course_documents share the course_id and school_id fields, making it straightforward to use a course listing to seed individual document lookups. The has_answers boolean in the document list distinguishes answered from unanswered uploads without fetching each file individually.
The CourseHero API is a managed, monitored endpoint for coursehero.com — not a raw scraper you maintain. Every endpoint is automatically health-checked on a schedule, and when coursehero.com 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 coursehero.com 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?+
- Build a course-material index by iterating
list_course_documentsacross multiple course IDs to collect file titles, types, and thumbnail URLs. - Track view_count changes on specific documents over time using repeated
get_documentcalls with the same file_id. - Identify which documents in a course have answers using the has_answers field from list_course_documents.
- Aggregate school and department coverage by collecting school_id, school_name, and department_id across course listings.
- Generate a course syllabus reference by pulling course_name, course_number, and document titles for a given course_id.
- Build a document discovery tool that maps file_url and thumbnail_url values for course materials across institutions.
- Cross-reference course content by matching course_id values returned from get_document against list_course_documents results.
| 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.