---
title: "Service: /discussions/forurl [GET]"
source: https://dev.pageseeder.com/api/services/list-url-discussions-public_get.html
description: "GET service that retrieves public discussions attached to a specified URL, with options to filter by locator fragment, comment type, and discussion size. Supports pagination and group filtering."
last_updated: 2026-09-08T13:36:54+10:00
document_type: api_endpoint
operation_id: comment-GET
resource_id: comment
path_template: /discussions/forurl
http_method: GET
api_category: comment
implementation_version: 6.2005
api_since: 5.2101
deprecated_since: null
obsolete_since: null
api_support: supported
cache_control: null
generated_at: 2026-09-02
tokens: ~914
---

# /discussions/forurl \[GET\]

## Description

Returns the list of public [discussions](../../reference/glossary/comment.md) attached to the specified URL.

To create a comment on a public URL, use the [/comments/forurl \[POST\]](create-comment-url-public_post.md) service.

## Parameters

| Name | Description | Required | Type | Default |
| --- | --- | --- | --- | --- |
| url |  The URL for the URI with optional `#fragment` | yes | url |  |
| attachedto | The comments to return that are attached to this URI | no | enum | `all` |
| comments | Which comments to include in each discussion | no | enum | `all`  |
| archived | If `true`, include discussions where all comments are archived | no | boolean | `false` |
| results | The number of results to return | no | long | `1000` |
| returngroups | The groups to return in the output | no | enum | `none` |
| discussionsize | Max number of comments per discussion | no | long | `100` |

### `attachedto`

Must be one of:

- `none`
- `all`

### `comments`

The comment display must be one of:

- `all` – all comments in the discussion
- `archive` – all comments including archived comments
- `first` – only the first comment
- `last` – only the last comment
- `none` – no comments

### `returngroups`

Must be one of:

- `none` – do not include the group
- `user` – only include the group that the use belongs to
- `all` – (Only administrators can use this option)

### `url`

The URL defines where the discussions are attached.

If the URL does not include a fragment part (i.e. no locator following a ‘#’), then all discussions attached to the URL are returned. Example: `http://example.com/abc`

If the URL includes a fragment part (i.e. locator following a ‘#’), then only the discussions attached to that locator are returned. Example: `http://example.com/abc#part1`

If the URL ends with `#default`, only the discussions attached the URL itself are returned. In other words, discussions attached to specific locators are not returned. Example: `http://example.com/abc#default`

## Permission

This service requires no permissions but will only work on groups configured for public access and requires `publicEnable=non-member` in the [Global properties](../../guide/configuration/properties/global_properties.md).

## Response

This service returns a [\<uri\>](../elements/element_uri.md) corresponding to the specified URL.

Each discussion is returned under the `<locator>` onto which they are attached.

See the following example:

```xml

<uri id="23"
     type="..."
     scheme="..."
     host="..."
     port="..."
     path="..."
     decodedpath="..."
     mediatype="...">
  <displaytitle> ... </displaytitle>
  <labels> ... </labels>
  <locator fragment="12">
    <discussion id="123"
                title="My thread"
                replycount="3"
                lastcommentid="234"
                lastcommentdate="2012-08-20T14:27:48+10:00">
      <comment id="234"
               contentrole="File Attachment"
               created="2012-03-08T12:34:00+10:00">
        <title>My thread</title>
        <content type="text/plain">Some text</content>
        <attachment>
          <uri id="189"> ... </uri>
        </attachment>
        <attachment fragment="5">
          <uri id="289"> ... </uri>
        </attachment>
      </comment>
    </discussion>
    <discussion id="100"> ... </discussion>
    <attachedto>
      <comment ...> ... </comment>
    </attachedto>
    ...
  </locator>
  ...
</uri>
```

## Error Handling

| Code | Cause / Description |
| --- | --- |
| 0x1304 | The URL is invalid |
| 0x1314 | The URL was not specified |
| 0x1315 | The URL was not found |

