# space.highport.admin.listTopSites

> Published by [lexicons.highport.space](https://lexicon.garden/identity/did:plc:ciygg5hma4q7ah2kxaszkyob)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.admin.listTopSites)
- [Documentation](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.admin.listTopSites/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:ciygg5hma4q7ah2kxaszkyob/space.highport.admin.listTopSites/examples)

## Definitions

### `space.highport.admin.listTopSites`

**Type**: `query`

Domains ranked by successful, non-crawler requests over a trailing window. Safe to publish: a domain is left out if it is not serving, has a malware finding, or is denylisted in any way (directly, by pattern, or through its identity, space, record or serving CID). Counts can lag by up to ten minutes.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `days` | `integer` | No | How many days back the window reaches from now. |
| `limit` | `integer` | No | Maximum sites to return. Fewer come back if not enough domains qualify. |
| `minRequests` | `integer` | No | Minimum requests a domain needs to be ranked, so near-dead domains do not rank in a quiet window. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `sites` | `array` | Yes |  |

#### Errors

- **AnalyticsDisabled**: No analytics store is configured, so no traffic was recorded. An empty list means something else: the window had no traffic worth ranking.

### `space.highport.admin.listTopSites#topSite`

**Type**: `object`

One domain's rank in the window, and what it publishes.

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domain` | `string` | Yes | The hostname. |
| `siteDid` | `string` (did) | Yes | The domain's registered owner. |
| `requests` | `integer` | Yes | Non-crawler 2xx responses in the window. The ranking uses this figure, so bytes, error loops and scrapers cannot move it. |
| `recordCid` | `string` (cid) | No | The record version behind the serving snapshot, which lets a later run tell a republished site from an unchanged one. Absent when the domain serves without an active snapshot. |
| `botRequests` | `integer` | Yes | Crawler responses at any status, reported separately from requests so callers can see what was excluded. |

## Raw Schema

```json
{
  "id": "space.highport.admin.listTopSites",
  "defs": {
    "main": {
      "type": "query",
      "errors": [
        {
          "name": "AnalyticsDisabled",
          "description": "No analytics store is configured, so no traffic was recorded. An empty list means something else: the window had no traffic worth ranking."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "sites"
          ],
          "properties": {
            "sites": {
              "type": "array",
              "items": {
                "ref": "#topSite",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "days": {
            "type": "integer",
            "default": 7,
            "maximum": 30,
            "minimum": 1,
            "description": "How many days back the window reaches from now."
          },
          "limit": {
            "type": "integer",
            "default": 20,
            "maximum": 100,
            "minimum": 1,
            "description": "Maximum sites to return. Fewer come back if not enough domains qualify."
          },
          "minRequests": {
            "type": "integer",
            "default": 0,
            "minimum": 0,
            "description": "Minimum requests a domain needs to be ranked, so near-dead domains do not rank in a quiet window."
          }
        }
      },
      "description": "Domains ranked by successful, non-crawler requests over a trailing window. Safe to publish: a domain is left out if it is not serving, has a malware finding, or is denylisted in any way (directly, by pattern, or through its identity, space, record or serving CID). Counts can lag by up to ten minutes."
    },
    "topSite": {
      "type": "object",
      "required": [
        "domain",
        "requests",
        "botRequests",
        "siteDid"
      ],
      "properties": {
        "domain": {
          "type": "string",
          "description": "The hostname."
        },
        "siteDid": {
          "type": "string",
          "format": "did",
          "description": "The domain's registered owner."
        },
        "requests": {
          "type": "integer",
          "description": "Non-crawler 2xx responses in the window. The ranking uses this figure, so bytes, error loops and scrapers cannot move it."
        },
        "recordCid": {
          "type": "string",
          "format": "cid",
          "description": "The record version behind the serving snapshot, which lets a later run tell a republished site from an unchanged one. Absent when the domain serves without an active snapshot."
        },
        "botRequests": {
          "type": "integer",
          "description": "Crawler responses at any status, reported separately from requests so callers can see what was excluded."
        }
      },
      "description": "One domain's rank in the window, and what it publishes."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
