What you’ll need
-
Base URL:
-
API key to include in the request headers:
x-api-key: YOUR_API_KEYThe Learning Commons team will securely share an API key for the GraphQL endpoint with you separately. -
For Python:
gqlfor better GraphQL support, schema validation, and error handling
Query the data
Use GraphQL queries to fetch the Knowledge Graph data you’re interested in. For example, you can retrieve up to 5 courses with identifiers, names, and academic subjects using the queries below:Troubleshooting
Query too complex
If your query times out or fails:- Reduce the depth of nested relationships
- Implement pagination on nested connections
- Split complex queries into multiple simpler ones
No results returned
If your query returns an empty response:- Check filter conditions are correct
- Verify field names match the schema
- Use introspection queries to explore available fields
Authentication errors
If your query fails authentication:- Ensure your API key is valid and active
- Check that the
x-api-keyheader is properly set
Rate limiting
The API implements rate limiting to ensure fair usage:- 2 requests per second with burst capacity up to 10 requests
- Exponential backoff when receiving rate limit errors (
HTTP 429: Too Many Requests)
Server errors
Large queries may causeHTTP 502/504 errors:
- Reduce page size to fewer than 1000 items
- Retry the query
Payload and timeout limits
The API has the following technical limitations:- Request timeout: 30 sec
- Request payload size: 10 MB
- Response payload size: 6 MB
- Query complexity: Deeply nested queries may hit processing limits
- Use pagination for large result sets
- Limit field selection to only required data
- Avoid deeply nested queries (>5 levels)
- Break up complex queries or add filtering (e.g., grade level or subject)