Google Classroom is a free learning management system developed by Google as part of Google Workspace for Education. It helps educators manage coursework, assignments, and communication.This page covers how to load data from Google Classroom using the
GoogleClassroomLoader. The loader fetches courses, assignments (courseWork), announcements, course materials, student submissions, rubrics, topics, and class rosters from the Classroom API and converts each item into a LangChain Document.
When file attachments are present on classroom items, the loader automatically downloads and parses them from Google Drive—supporting PDF, DOCX, CSV, plain text, Google Docs, Sheets, Slides, and images.
Learn more about the package on GitHub.
Overview
Integration details
Prerequisites
To use this loader, you will need:- A Google Cloud project
- The Classroom API enabled
- The Drive API enabled (for file attachments)
- One of the following authentication methods:
- OAuth 2.0 credentials—for personal Google accounts or testing
- Service Account credentials—for Google Workspace domains (production)
Installation
Install the integration package:parsers extra:
Credentials
Option A: OAuth 2.0 (personal accounts)
- In the Google Cloud Console, create an OAuth 2.0 Client ID (Desktop application).
- Download the client secrets file and save it as
credentials.jsonin your working directory. - On first run, a browser window will open for user consent. The resulting token is cached to
token.jsonfor subsequent runs.
Option B: Service Account (Google Workspace)
- In the Google Cloud Console, create a Service Account.
- Enable Domain-Wide Delegation for the service account.
- Download the key file and save it as
service_account.json.
Instantiation
Constructor parameters
Load documents
Useload() to fetch all documents at once:
Document has structured page_content and rich metadata:
Lazy loading
For large courses or memory-constrained environments, uselazy_load() to stream documents one at a time:
Async loading
The loader supports async iteration viaalazy_load():
Loading additional data types
Student submissions
Topics
Class roster (students and teachers)
File attachment parsing
Whenload_attachments=True (the default), the loader resolves Google Drive file attachments on each classroom item and parses them into additional Document objects.
Supported formats
Using a vision LLM for images
To process image attachments and extract visual context from PDF pages, provide a vision-capable model:Using a custom file parser
You can replace the built-in parsers with anyBaseBlobParser subclass:
API reference
- PyPI:
langchain-google-classroom - Source: GitHub
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

