> ## Documentation Index
> Fetch the complete documentation index at: https://docs.learningcommons.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Get started with Knowledge Graph: use the REST API or MCP server, or download JSONL data files for local querying.

export const EarlyAccessCallout = ({children}) => <div className="eyebrow-callout not-prose rounded-xl border border-gray-200/80 p-5 dark:border-white/10" style={{
  marginBottom: "1rem",
  borderRadius: "4px"
}}>
    <div className="mb-3">
      <Badge color="green" size="md" icon="flask">
        Early access
      </Badge>
    </div>
    <div className="callout-body text-[15px] leading-relaxed text-gray-700 dark:text-gray-300">{children}</div>
    <style>{`.callout-body a { text-decoration: underline; text-decoration-color: #178251; }`}</style>
  </div>;

You can access the knowledge graph data using:

* **REST API**: Authenticate and make HTTP requests to retrieve academic standards directly. Best for applications that need real-time access. Learn more about the [API](/api-reference/platform-api/overview).

* **MCP Server**: Using the server, AI models can reliably work with academic standards, learning components, and learning progressions. They can resolve standards, decompose them into granular learning components, and trace progressions across standards. Learn more about the [MCP server](/knowledge-graph/using-knowledge-graph/mcp-server).

* **Local JSONL**: Download local JSONL files and query them directly. Best for offline access, custom processing, or complex queries.

Use the tabs below to follow the quickstart for the REST API or Local JSONL approaches.

<Tabs>
  <Tab title="REST API">
    <EarlyAccessCallout>
      The API is in early access and is actively evolving. We will continue expanding it, and breaking changes may occur as we improve accuracy and reliability. Email [support@learningcommons.org](mailto:support@learningcommons.org) ↗ with your feedback or issues.
    </EarlyAccessCallout>

    ## What you'll do

    * Authenticate using an API key.
    * Get a standards framework identifier (CASE UUID) for Multi-State Mathematics.
    * Retrieve a list of academic standards using that framework identifier.

    ## What you'll need

    * An API key generated in the [Learning Commons Platform](https://platform.learningcommons.org) ↗. You'll pass this key in each request.

    ## Base URL

    All REST API requests should be sent to the base URL provided in the Learning Commons Portal when you create your API key. The base URL will follow this format:

    ```text theme={null}
    https://api.learningcommons.org/knowledge-graph/v0
    ```

    ## Authentication

    Include your API key in the x-api-key header on every request.

    ```text theme={null}
    x-api-key: YOUR_API_KEY
    ```

    Your API key will be securely shared with you through the Learning Commons Portal.

    ## STEP 1: Get a standards framework identifier

    Use your preferred HTTP client to send a GET request to the standards frameworks endpoint to get the CASE UUID for Multi-State Mathematics.

    <CodeGroup>
      ```shell cURL theme={null}
      curl -X GET \
        -H "x-api-key: YOUR_API_KEY" \
        "https://api.learningcommons.org/knowledge-graph/v0/standards-frameworks?academicSubject=Mathematics&jurisdiction=Multi-State"
      ```

      ```python Python theme={null}
      import os
      import requests

      # Setup
      api_key = os.getenv("API_KEY")  # Your API key from Learning Commons Portal
      base_url = os.getenv("BASE_URL")  # Your base URL from Learning Commons Portal

      # Make request
      headers = {
          "x-api-key": api_key
      }

      response = requests.get(
          f"{base_url}/standards-frameworks",
          headers=headers,
          params={
              "academicSubject": "Mathematics",
              "jurisdiction": "Multi-State"
          }
      )

      result = response.json()
      print(result)
      ```

      ```javascript JavaScript theme={null}
      const apiKey = process.env.API_KEY; // Your API key from Learning Commons Portal
      const baseUrl = process.env.BASE_URL; // Your base URL from Learning Commons Portal

      const response = await fetch(
        `${baseUrl}/standards-frameworks?academicSubject=Mathematics&jurisdiction=Multi-State`,
        {
          method: 'GET',
          headers: {
            'x-api-key': apiKey
          }
        }
      );

      const data = await response.json();
      console.log(data);
      ```
    </CodeGroup>

    You should receive a 200 response with the CCSS Math framework for Multi-State, including the framework name, jurisdiction, adoption status, and a `caseIdentifierUUID` (GUID). Copy the `caseIdentifierUUID` from the response, you'll use it in the next step.

    ## STEP 2: Retrieve academic standards

    Use the `caseIdentifierUUID` you copied from Step 1's response with the academic standards endpoint to retrieve the individual standards for that framework.

    <CodeGroup>
      ```shell cURL theme={null}
      curl -X GET \
        -H "x-api-key: YOUR_API_KEY" \
        "https://api.learningcommons.org/knowledge-graph/v0/academic-standards?standardsFrameworkCaseIdentifierUUID=YOUR_UUID_FROM_STEP_1"
      ```

      ```python Python theme={null}
      import os
      import requests

      # Setup
      api_key = os.getenv("API_KEY")  # Your API key from Learning Commons Portal
      base_url = os.getenv("BASE_URL")  # Your base URL from Learning Commons Portal
      framework_uuid = "YOUR_UUID_FROM_STEP_1"  # Copy from Step 1 response

      # Make request
      headers = {
          "x-api-key": api_key
      }

      response = requests.get(
          f"{base_url}/academic-standards",
          headers=headers,
          params={
              "standardsFrameworkCaseIdentifierUUID": framework_uuid
          }
      )

      result = response.json()
      print(result)
      ```

      ```javascript JavaScript theme={null}
      const apiKey = process.env.API_KEY; // Your API key from Learning Commons Portal
      const baseUrl = process.env.BASE_URL; // Your base URL from Learning Commons Portal
      const frameworkUuid = "YOUR_UUID_FROM_STEP_1"; // Copy from Step 1 response

      const response = await fetch(
        `${baseUrl}/academic-standards?standardsFrameworkCaseIdentifierUUID=${frameworkUuid}`,
        {
          method: 'GET',
          headers: {
            'x-api-key': apiKey
          }
        }
      );

      const data = await response.json();
      console.log(data);
      ```
    </CodeGroup>

    <Note>
      If you skipped Step 1, you can use the CCSS Math framework UUID:

      `c6496676-d7cb-11e8-824f-0242ac160002` in place of `YOUR_UUID_FROM_STEP_1`.
    </Note>

    You should see a paginated list of academic standards aligned to that framework, including statement codes, descriptions, grade levels, and subject information.

    It should look similar to this:

    ```json theme={null}
    {
      "data": [
        {
          "identifier": "e1755456-c533-5a84-891e-59725c0479e0",
          "caseIdentifierURI": "https://satchelcommons.com/ims/case/v1p0/CFItems/6b9bf846-d7cc-11e8-824f-0242ac160002",
          "caseIdentifierUUID": "6b9bf846-d7cc-11e8-824f-0242ac160002",
          "name": null,
          "statementCode": "3.NF.A.1",
          "description": "Understand a fraction $\\frac{1}{b}$ as the quantity formed by 1 part when a whole is partitioned into b equal parts; understand a fraction $\\frac{a}{b}$ as the quantity formed by a parts of size $\\frac{1}{b}$.",
          "statementType": "Standard",
          "normalizedStatementType": "Standard",
          "jurisdiction": "Multi-State",
          "academicSubject": "Mathematics",
          "gradeLevel": ["3"],
          "inLanguage": "en-US",
          "dateCreated": null,
          "dateModified": "2025-02-05",
          "notes": null,
          "author": "1EdTech",
          "provider": "Learning Commons",
          "license": "https://creativecommons.org/licenses/by/4.0/",
          "attributionStatement": "Knowledge Graph is provided by Learning Commons under the CC BY-4.0 license. Learning Commons received state standards and written permission under CC BY-4.0 from 1EdTech."
        }
      ],
      "pagination": {
        "limit": 1,
        "nextCursor": "eyJpZGVudGlmaWVyIjogImUxNzU1NDU2LWM1MzMtNWE4NC04OTFlLTU5NzI1YzA0NzllMCJ9",
        "hasMore": true
      }
    }
    ```

    ## Next steps

    Now that you've made your first API call, you're ready to:

    1. **Explore other endpoints**: Check out the [API Reference](/api-reference/platform-api/overview) for information about Knowledge Graph API endpoints.
    2. **Understand the data model**: Review the entity and relationship reference under the Knowledge Graph tab to learn about the graph structure.
    3. **Follow step-by-step tutorials**: Learn how to build common use cases with the Knowledge Graph.

    <CardGroup cols={2}>
      <Card icon="graduation-cap" href="/knowledge-graph/getting-started/tutorials/tutorial-overview" title="Tutorials">
        Step-by-step guides to help you build with the Knowledge Graph.
      </Card>
    </CardGroup>
  </Tab>

  <Tab title="Local JSONL">
    The Knowledge graph data is available for download in newline delimited jsonl format with UTF-8 encoding. The graph data is exported with nodes.jsonl representing the nodes of the knowledge graph and the relationships.jsonl file capturing the connections between nodes.

    ## Files

    * `nodes.jsonl`: This file contains graph node records, defining each node by a unique identifier, labels, and a set of associated properties.
    * `relationships.jsonl`: This file contains graph relationship records, describing how nodes are connected, including the relationship type, properties, and the source and target nodes.

    ## Download options

    You can download the files through direct links or using curl commands.

    ### Direct links

    * [nodes.jsonl](https://cdn.learningcommons.org/knowledge-graph/v1.8.0/exports/nodes.jsonl?ref=docs) ↗
    * [relationships.jsonl](https://cdn.learningcommons.org/knowledge-graph/v1.8.0/exports/relationships.jsonl?ref=docs) ↗

    ### Using curl commands

    You can also download the files using curl commands. If you don’t have curl installed, visit [curl](https://github.com/curl/curl) ↗ for installation instructions.

    Copy and paste the following commands to download all files:

    ```shellscript theme={null}

    curl -L "https://cdn.learningcommons.org/knowledge-graph/v1.8.0/exports/nodes.jsonl?ref=docs_curl" -o nodes.jsonl
    curl -L "https://cdn.learningcommons.org/knowledge-graph/v1.8.0/exports/relationships.jsonl?ref=docs_curl" -o relationships.jsonl

    ```

    ### Querying with jq

    One option for querying the JSONL files is to use [jq](https://jqlang.github.io/jq/) ↗. Example to extract Common Core math standards:

    ```shellscript theme={null}
    jq -c 'select((.labels | contains(["StandardsFrameworkItem"])) and .properties.jurisdiction == "Multi-State" and .properties.academicSubject == "Mathematics")' nodes.jsonl > common_core_math_standards.jsonl

    ```

    This filters for nodes with:

    * **Label:** `StandardsFrameworkItem`
    * **Jurisdiction:** `Multi-State` (Common Core)
    * **Academic Subject:** `Mathematics`

    ## Next steps

    Learn more about the data model in the Entity and relationship reference.
  </Tab>
</Tabs>
