---
title: "Service: /groups/{group}/uris/{uri}/xreftree [GET]"
source: https://dev.pageseeder.com/api/services/list-uri-xreftree_get.html
description: "Loads the xref tree for a PSML URI, returning fragments containing cross-references in document order. Supports filtering by xref types, depth control for forward/reverse xrefs, and optional duplicate/fragment inclusion with configurable size limits."
last_updated: 2026-09-08T11:47:42+10:00
document_type: api_endpoint
operation_id: xref-GET
resource_id: xref
path_template: /groups/{group}/uris/{uri}/xreftree
http_method: GET
api_category: xref
implementation_version: 6.2005
api_since: 5.7913
deprecated_since: null
obsolete_since: null
api_support: supported
cache_control: null
generated_at: 2026-09-02
tokens: ~1065
---

# /groups/\{group\}/uris/\{uri\}/xreftree \[GET\]

## Description

Loads the xref tree for a PSML [URI](../../reference/glossary/uri.md).

Starting from a nominated URI, this service returns a tree of [fragments](../../reference/glossary/fragment.md) that contain xrefs.

- The fragments and xrefs in the tree are in the same order as they are in the document, starting with the default fragment.
- Only [PSML document](../../reference/glossary/psml.md) fragments accessible to the [group](../../reference/glossary/group.md) are in the response.

If `allfragments=false` and depth is larger than 1:

- Forward xrefs to fragments (not default) only contain xrefs from the target fragment.
- Reverse xrefs only contain [reverse xrefs](../../reference/glossary/reverse_xref.md) from the source fragment and default.

If `duplicates=false` and xrefs for a URI or fragment have already been output, they might be omitted at another position in the tree when they are leaf nodes. When this happens, the element `<omitted forward="[true|false]" reverse="[true|false]" />` is output. If forward="`true`", then forward xrefs might have been omitted and if reverse="`true`", then reverse xrefs might have been omitted. They are omitted from that point and lower in the tree.

## Parameters

| Name | Description | Required | Type | Default value |
| --- | --- | --- | --- | --- |
| allfragments | Whether to follow xrefs in fragments not directly referenced | no | boolean | `false` |
| duplicates | Whether to output duplicate xrefs (that already appear in the tree) | no | boolean | `false` |
| followtypes | Comma-separated list of types of xrefs to follow | no | string | `embed,transclude` |
| forward | Whether to include forward xrefs | no | boolean | `true` |
| forwarddepth | The maximum depth of forward xrefs to follow | no | integer | `0` |
| properties | Comma-separated list of property names to include (not properties with `datatype="xref"` or `markdown`) | no | string |  |
| publicationid | The `ID` of the publication for `version` parameter | no | publicationid |  |
| reverse | Whether to include reverse xrefs | no | boolean | `false` |
| reversedepth | The maximum depth of reverse xrefs to follow | no | integer | `0` |
| types | Comma-separated list of types of xrefs to include (default all) | no | string |  |
| version | Name of version to load for all documents | no | string |  |
| xrefsize | The maximum number of xrefs returned | no | integer | `500` |

## Permission

This service is restricted to guest and higher unless the group is accessible to public.

## Response

Output format is as follows:

```xml

<uri id=[id] ... >
  <!-- URI details -->
  <displaytitle>[displaytitle]</displaytitle>
  ...
  <fragment id="default">
    <!-- Forward XRefs found -->
    <xref title="[title]"
          display="[display]"
          uriid="[target ID]" ... >
            [<metadata>
              <property name="" ... /> ... </metadata>]

      <fragment id="[fragment ID]"
                    [labels=""] ...>
        [<property name="" ... /> ...]
         ...
      </fragment>
      <fragment ...> ... </fragment>
      ...
    </xref>
    <xref title="[title]"
              display="[display]"
              uriid="[target ID]" ... />
    <xref title="[title]"
              display="[display]"
              uriid="[target ID]"
              frag="2" ...>
      <fragmentnotfound id="2"/>
    </xref>
    ...
    <!-- Reverse XRefs found -->
    <reversexref title="[title]"
                 display="[display]"
                 uriid="[source ID]"
                 [urilabels=""] ...>
      <fragment ...> ... </fragment>
      ...
    </reversexref>
       ...
    </fragment>
    <fragment id="10">
      <xref title="[title]"
            display="[display]"
            uriid="[target ID]"
            [urilabels=""]
            [blocklabels=""]
            [inlinelables=""]
            [property=""] ... >
        <!-- if forward or reverse xrefs have been omitted
          -->
        <omitted forward="true" reverse="true"/>
      </xref>
    </fragment>
     ...
    <!-- if xrefsize has been reached -->
    <limitreached xrefs="[xrefsize]"/>
</uri>
```

## Error Handling

No specific errors expected for this service.

