# Get a node's context (/docs/sdks/papers/context)



A node's [context](/docs/core-concepts/graph#navigating-the-graph) is the content immediately around it. Use it to expand a single node, such as a [search match](/docs/sdks/search/query), into a passage a reader or model can understand.

## Get context [#get-context]

<Tabs groupId="language" items="[&#x22;JavaScript&#x22;]">
  <Tab value="JavaScript">
    ```ts
    const graph = await paperful.papers.graph("00000000-0000-0000-0000-000000000000");
    const node = graph.nodes[10];

    const context = await node.context();
    ```
  </Tab>
</Tabs>

## Choose how much context [#choose-how-much-context]

<Tabs groupId="language" items="[&#x22;JavaScript&#x22;]">
  <Tab value="JavaScript">
    ```ts
    const context = await node.context(
      /* [!code ++:4] */
      { 
        before: 2, 
        after: 4 
      }
    );
    ```
  </Tab>
</Tabs>

<TypeTable
  type="{
  before: {
    description: 'Nodes to include before this one.',
    type: 'number',
    default: 6,
  },
  after: {
    description: 'Nodes to include after this one.',
    type: 'number',
    default: 6,
  },
}"
/>

<Callout type="info">
  The maximum number of nodes included before and after the current node is 12 in each direction.
</Callout>
