---
title: "GET /stats"
method: GET
path: "/stats"
tags: ["statistics"]
---

# GET /stats

`GET /stats`

Returns statistics for the entire database

## Response `200`

Success

- Stats
  - `trialsCount` integer — Trials count
  - `trialsPerSource` TrialsPerSource[] — Array of objects containing counts of trials, grouped by source
    - `id` string — Source's ID
    - `name` string — Source's name
    - `count` integer — Number of trials in this source
  - `trialsPerYear` TrialsPerYear[] — Array of objects containing counts of trials, grouped by year
    - `year` integer — Registration year for trials
    - `count` integer — Number of trials in this year
  - `topLocations` TopLocations[] — Array of objects containing counts of trials, grouped by location
    - `id` string — Location's ID
    - `name` string — Location's name
    - `count` integer — Number of trials in this location
  - `sourcesLatestUpdatedDate` SourcesLatestUpdatedDate[] — Array of objects containing the available sources and their latest update date
    - `id` string — Source's ID
    - `name` string — Source's name
    - `latest_updated_date` string — Date this source was last updated

## Other responses

- `default` — Error

## Changes

- **2016-09-04** `c55bfe84e6b6` — 1 info
  - api operation id `get` removed and replaced with `getStats`
- **2016-05-31** `7a0eb1704719` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/opentrials/apis/opentrials-api/changes/stats/get.md)

---

[API](https://skmtc.dev/opentrials/apis/opentrials-api.md) · [All operations](https://skmtc.dev/opentrials/apis/opentrials-api/llms.txt) · [OpenAPI document](https://skmtc.dev/opentrials/apis/opentrials-api/revisions/421e21200598?raw)
