# Top growing services

> Returns services ranked by largest percent growth between current and previous period.

Source: https://docs.levelfour.ai/api-reference/costs/get-costs-top-growing


## GET /api/v1/costs/top-growing

Returns services ranked by largest percent growth between current and previous period.

### Authentication

Send `Authorization: Bearer <token>`.

### Parameters

- `provider` (query, string, default `aws`)
- `compare_to` (query, string, default `previous_period`)
- `limit` (query, integer, default `10`)
- `credits` (query, one of `before`, `after`, default `after`): Cost basis for Google Cloud: after credits (default) or before them. AWS stays on its invoiced basis.

### Responses

#### 200: Successful Response

- `success` (boolean, default `true`)
- `timestamp` (date-time string)
- `data` (object, required)
  - `items` (array of object, required)
    - `id` (string, required)
    - `name` (string, required)
    - `cost` (number, required)
    - `previous_cost` (number, required)
    - `delta_pct` (number, required)
    - `delta_absolute` (number, required)
  - `window` (object, nullable): The two windows compared. Null when the tenant has no cost data yet.
    - `current_start` (string, required): First day of the current window, YYYY-MM-DD
    - `current_end` (string, required): Last day of the current window: the last day with billing data
    - `previous_start` (string, required): First day of the window the current one is compared against
    - `previous_end` (string, required): Last day of the comparison window
  - `credits` (one of `before`, `after`, nullable): Cost basis applied: after or before Google Cloud credits

#### Errors

- `400`: Bad Request
- `401`: Authentication Error
- `403`: Authorization Error
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Rate Limit Exceeded
- `500`: Internal Server Error

Body of `400`, `401`, `403`, `404`, `409`, `422`, `429`, `500`:

- `success` (`false`, required)
- `error` (object, required)
  - `code` (string, required)
  - `message` (string, required)
  - `details` (any)
- `timestamp` (date-time string, required)
