---
updatedAt: 2026-06-21T19:39:10.000Z
agentTools:
  projectIndex: https://developers.rebrandly.com/llms.txt
---

# /v1/links/count

Get how many links with given filtering conditions

# OpenAPI definition

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Rebrandly Legacy",
    "description": "Transform your long URLs into short branded links",
    "termsOfService": "https://rebrandly.com/terms-conditions",
    "version": "1.0.0",
    "contact": {
      "url": "https://developers.rebrandly.com"
    }
  },
  "servers": [
    {
      "url": "https://api.rebrandly.com"
    }
  ],
  "components": {
    "schemas": {
      "CountResult": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 42,
            "default": 0
          }
        }
      }
    },
    "securitySchemes": {
      "viaApikey": {
        "type": "apiKey",
        "in": "header",
        "name": "apikey"
      }
    }
  },
  "security": [
    {
      "viaApikey": []
    }
  ],
  "paths": {
    "/v1/links/count": {
      "get": {
        "summary": "/v1/links/count",
        "description": "Get how many links with given filtering conditions",
        "operationId": "countLinks",
        "parameters": [
          {
            "name": "favourite",
            "in": "query",
            "description": "Filter branded short links depnding on the favourite (loved) property",
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "domain.id",
            "in": "query",
            "description": "Filter branded short links which refer to a specific branded domain id",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "workspace",
            "in": "header",
            "description": "Which workspace id to filter links by. No workspace specified will select default workspace.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CountResult"
                }
              }
            }
          }
        },
        "deprecated": false,
        "tags": [
          "Links"
        ]
      }
    }
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "samples-enabled": true
  }
}
```