# Usage rankings (/docs/api/insights/rankings_get)

Top capabilities, providers, categories and opted-in apps by calls and hits over the last day, week or month across all GridRouter traffic, with change vs the previous window and trending movers.

`GET /v1/rankings`

```json
{
  "operationId": "rankings_get",
  "summary": "Usage rankings",
  "description": "Top capabilities, providers, categories and opted-in apps by calls and hits over the last day, week or month across all GridRouter traffic, with change vs the previous window and trending movers.",
  "tags": [
    "rankings"
  ],
  "parameters": [
    {
      "schema": {
        "type": "string",
        "enum": [
          "day",
          "week",
          "month"
        ],
        "default": "week"
      },
      "required": false,
      "name": "window",
      "in": "query"
    },
    {
      "schema": {
        "type": "string",
        "maxLength": 40,
        "pattern": "^[a-z]+$"
      },
      "required": false,
      "name": "category",
      "in": "query"
    },
    {
      "schema": {
        "type": "integer",
        "minimum": 1,
        "maximum": 50,
        "default": 20
      },
      "required": false,
      "name": "limit",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "rankings"
                ]
              },
              "window": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month"
                ]
              },
              "category": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "source": {
                "type": "string",
                "enum": [
                  "live",
                  "unavailable",
                  "sample"
                ]
              },
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "to": {
                "type": "string",
                "format": "date-time"
              },
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "capabilities": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "calls": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hits": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hit_rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "share": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "change": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "category",
                    "calls",
                    "hits",
                    "hit_rate",
                    "share",
                    "change"
                  ]
                }
              },
              "providers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "calls": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hits": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hit_rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "share": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "change": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "category",
                    "calls",
                    "hits",
                    "hit_rate",
                    "share",
                    "change"
                  ]
                }
              },
              "apps": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "calls": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hits": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hit_rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "share": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "change": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "category",
                    "calls",
                    "hits",
                    "hit_rate",
                    "share",
                    "change"
                  ]
                }
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "calls": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hits": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hit_rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "share": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "change": {
                      "type": [
                        "number",
                        "null"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "category",
                    "calls",
                    "hits",
                    "hit_rate",
                    "share",
                    "change"
                  ]
                }
              },
              "movers": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string"
                    },
                    "category": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "calls": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hits": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hit_rate": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "share": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "change": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "capability",
                        "provider",
                        "app"
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "category",
                    "calls",
                    "hits",
                    "hit_rate",
                    "share",
                    "change",
                    "kind"
                  ]
                }
              },
              "series": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "date": {
                      "type": "string",
                      "format": "date"
                    },
                    "id": {
                      "type": "string"
                    },
                    "calls": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "date",
                    "id",
                    "calls"
                  ]
                }
              }
            },
            "required": [
              "object",
              "window",
              "category",
              "source",
              "from",
              "to",
              "generated_at",
              "capabilities",
              "providers",
              "apps",
              "categories",
              "movers",
              "series"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "retry_after_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
