# Navigate Link Record § ¶

<figure><img src="/files/NWg9GFku62Mk9bRxivzF" alt="" width="563"><figcaption></figcaption></figure>

1. Anyone with a link location and access to Event can obtain either earlier or later link locations
2. Specify the link location to navigate from - this can be any link location in the set of linked records
3. Specify the maximum number of links you want in the "links" parameter, from 1 to a manageable number - if the number of links is too large, you may experience inconvenient timeouts
4. Specify a negative value for earlier link locations
5. Specify a positive value for later link locations
6. The response indicates whether there are any link locations availble at all
7. And whether the beginning or the end of the linked records has been reached
8. Use Read Link Record to read the content of the resultant link locations

#### Example code:

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET "$URL/api/v1/linkedrecords/$LOC/navigate?links=9" \
     -H "x-api-key: $KEY" \
     -H "accept: text/plain"
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const response = await fetch('${url}/api/v1/linkedrecords/${loc1}/navigate?links=9', {
  method: 'GET',
  headers: {
    'x-api-key': '${key}',
    'accept': 'text/plain'
  }
});
```

{% endtab %}
{% endtabs %}

## **Example Responses**

#### Example cURL response with later link locations:

```json
{
  "txIds": [
    "9004f5621798965cf082ce....2222222222222222222222",
    "d205c1bcb4e796a70f70b1....3333333333333333333333"
  ],
  "endOfLinks": true
}
```

In this example, there are 2 later links than the supplied link, and the second one is the last in the linked records, so endOfLinks has been reached, as indicated by "true".

If the navigation had been 9 link locations forward from the last location ("d205c1bcb4e796a70f70b1...." in the list above), the result would have been:

#### Example cURL response with no link locations:

```json
{
  "txIds": [
  ],
  "endOfLinks": true
}
```

If the navigation had been 9 link locations backwards from the last location, assuming that there are only 3 link locations in the set, the result would have been:

#### Example cURL response with earlier link locations:

```json
{
  "txIds": [
    "d205c1bcb4e796a70f70b1....3333333333333333333333",
    "9004f5621798965cf082ce....2222222222222222222222",
    "29d728ba82160c1b327abe....1111111111111111111111"
  ],
  "endOfLinks": true
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.teranode.group/nchain-event/linked-records/api-workflow/navigate-link-record.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
