# Get usage time series

> For the complete documentation index, see [llms.txt](/docs/llms.txt).

POST https://admin-api.alchemy.com/v1/usage/time-series

Retrieves usage over time in hourly or daily buckets.
You can filter by product, app, network, method, and request type.
You can group by one dimension.

See [Time series products](/docs/reference/admin-api/overview#time-series-products) for `products` values and units.

Reference: https://www.alchemy.com/docs/admin-api/usage/get-usage-time-series

## Headers

| Name | Type | Required | Description |
|------|------|----------|-------------|
| Authorization | string | Yes | Access key. > ⚠️ This is not an app API key. Learn how to [create an access key](https://www.alchemy.com/docs/how-to-create-access-keys). |

## Code Examples

### cURL

```bash
curl --request POST \
  --url https://admin-api.alchemy.com/v1/usage/time-series \
  --header 'Authorization: Bearer <Access Key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "startTime": "2026-06-01T00:00:00Z",
  "endTime": "2026-06-07T23:59:59Z",
  "products": [
    "SUPERNODE_CU"
  ],
  "metrics": [
    "amount"
  ],
  "filters": {
    "appIds": [
      "string"
    ],
    "networks": [
      "string"
    ],
    "methods": [
      "string"
    ],
    "requestTypes": [
      "http"
    ]
  },
  "groupBy": [
    "requestType"
  ],
  "granularity": "hour"
}'
```

### JavaScript

```javascript
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <Access Key>'},
  body: JSON.stringify({
    startTime: '2026-06-01T00:00:00Z',
    endTime: '2026-06-07T23:59:59Z',
    products: ['SUPERNODE_CU'],
    metrics: ['amount'],
    filters: {
      appIds: ['string'],
      networks: ['string'],
      methods: ['string'],
      requestTypes: ['http']
    },
    groupBy: ['requestType'],
    granularity: 'hour'
  })
};

fetch('https://admin-api.alchemy.com/v1/usage/time-series', options)
  .then(res => res.json())
  .then(res => console.log(res))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://admin-api.alchemy.com/v1/usage/time-series"

payload = {
    "startTime": "2026-06-01T00:00:00Z",
    "endTime": "2026-06-07T23:59:59Z",
    "products": ["SUPERNODE_CU"],
    "metrics": ["amount"],
    "filters": {
        "appIds": ["string"],
        "networks": ["string"],
        "methods": ["string"],
        "requestTypes": ["http"]
    },
    "groupBy": ["requestType"],
    "granularity": "hour"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <Access Key>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

### Go

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://admin-api.alchemy.com/v1/usage/time-series"

	payload := strings.NewReader("{\n  \"startTime\": \"2026-06-01T00:00:00Z\",\n  \"endTime\": \"2026-06-07T23:59:59Z\",\n  \"products\": [\n    \"SUPERNODE_CU\"\n  ],\n  \"metrics\": [\n    \"amount\"\n  ],\n  \"filters\": {\n    \"appIds\": [\n      \"string\"\n    ],\n    \"networks\": [\n      \"string\"\n    ],\n    \"methods\": [\n      \"string\"\n    ],\n    \"requestTypes\": [\n      \"http\"\n    ]\n  },\n  \"groupBy\": [\n    \"requestType\"\n  ],\n  \"granularity\": \"hour\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Content-Type", "application/json")
	req.Header.Add("Authorization", "Bearer <Access Key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(string(body))

}
```

### Java

```java
HttpResponse<String> response = Unirest.post("https://admin-api.alchemy.com/v1/usage/time-series")
  .header("Content-Type", "application/json")
  .header("Authorization", "Bearer <Access Key>")
  .body("{\n  \"startTime\": \"2026-06-01T00:00:00Z\",\n  \"endTime\": \"2026-06-07T23:59:59Z\",\n  \"products\": [\n    \"SUPERNODE_CU\"\n  ],\n  \"metrics\": [\n    \"amount\"\n  ],\n  \"filters\": {\n    \"appIds\": [\n      \"string\"\n    ],\n    \"networks\": [\n      \"string\"\n    ],\n    \"methods\": [\n      \"string\"\n    ],\n    \"requestTypes\": [\n      \"http\"\n    ]\n  },\n  \"groupBy\": [\n    \"requestType\"\n  ],\n  \"granularity\": \"hour\"\n}")
  .asString();
```

### C#

```csharp
using RestSharp;


var options = new RestClientOptions("https://admin-api.alchemy.com/v1/usage/time-series");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <Access Key>");
request.AddJsonBody("{\n  \"startTime\": \"2026-06-01T00:00:00Z\",\n  \"endTime\": \"2026-06-07T23:59:59Z\",\n  \"products\": [\n    \"SUPERNODE_CU\"\n  ],\n  \"metrics\": [\n    \"amount\"\n  ],\n  \"filters\": {\n    \"appIds\": [\n      \"string\"\n    ],\n    \"networks\": [\n      \"string\"\n    ],\n    \"methods\": [\n      \"string\"\n    ],\n    \"requestTypes\": [\n      \"http\"\n    ]\n  },\n  \"groupBy\": [\n    \"requestType\"\n  ],\n  \"granularity\": \"hour\"\n}", false);
var response = await client.PostAsync(request);

Console.WriteLine("{0}", response.Content);

```


## Operation Specification

```yaml
path: /v1/usage/time-series
method: POST
operation:
  operationId: GetUsageTimeSeries
  responses:
    '200':
      description: Retrieved usage time series successfully
      content:
        application/json:
          schema:
            description: |-
              Standard API response wrapper.
              All API responses are wrapped in this format for consistency.
            properties:
              data:
                properties:
                  query:
                    description: Echo of the query after the API applies defaults.
                    properties:
                      startTime:
                        type: string
                        description: |-
                          Start of the query range as an ISO 8601 UTC timestamp.
                          This is the requested start. The API can clamp the internal start to the available history for your plan.
                      endTime:
                        type: string
                        description: |-
                          End of the query range as an ISO 8601 UTC timestamp.
                          The API sets this to now when the request omits `endTime`.
                      granularity:
                        description: Time bucket size used for this query.
                        enum:
                          - hour
                          - day
                        type: string
                      products:
                        items:
                          enum:
                            - SUPERNODE_CU
                            - BLAST_CU
                            - SUPERNODE_ENHANCED_CU
                            - SOLANA_ARCHIVAL_CU
                            - SPONSORED_GAS
                            - SOLANA_GRPC_TB
                          type: string
                        type: array
                        description: Billing product meters used for this query.
                      metrics:
                        items:
                          enum:
                            - amount
                          type: string
                        type: array
                        description: Metrics included in this query.
                      filters:
                        description: Filters applied to this query.
                        properties:
                          appIds:
                            items:
                              type: string
                            type: array
                            description: Public app IDs to include.
                          networks:
                            items:
                              type: string
                            type: array
                            description: Network slugs to include, for example `eth-mainnet`.
                          methods:
                            items:
                              type: string
                            type: array
                            description: RPC method names to include, for example `eth_getLogs`.
                          requestTypes:
                            items:
                              enum:
                                - http
                                - websocket
                                - webhook
                                - grpc
                              type: string
                            type: array
                            description: 'Request types: `http`, `websocket`, `webhook`, `grpc`.'
                        type: object
                        additionalProperties: false
                      groupBy:
                        items:
                          enum:
                            - requestType
                            - app
                            - network
                            - method
                          type: string
                        type: array
                        description: Group-by dimensions applied to this query. Empty when the request has no grouping.
                    required:
                      - startTime
                      - endTime
                      - granularity
                      - products
                      - metrics
                      - groupBy
                    type: object
                    additionalProperties: false
                  freshness:
                    description: How current the usage data is.
                    properties:
                      dataThrough:
                        type: string
                        description: Latest timestamp included in this response.
                      containsPartialToday:
                        type: boolean
                        description: True when the query range includes the current UTC day.
                      updateCadence:
                        description: How often usage data is updated. Always `minute`.
                        enum:
                          - minute
                        type: string
                    required:
                      - dataThrough
                      - containsPartialToday
                      - updateCadence
                    type: object
                    additionalProperties: false
                  data:
                    items:
                      properties:
                        startTime:
                          type: string
                          description: Start of this time bucket as an ISO 8601 UTC timestamp.
                        endTime:
                          type: string
                          description: End of this time bucket as an ISO 8601 UTC timestamp.
                        isPartial:
                          type: boolean
                          description: True when this bucket is the current hour or day and is not complete.
                        dimensions:
                          description: Group-by values for this bucket. Empty when the request has no `groupBy`.
                          properties:
                            requestType:
                              type: string
                              description: Request type when grouped by `requestType`.
                            app:
                              type: string
                              description: Public app ID when grouped by `app`.
                            network:
                              type: string
                              description: Network slug when grouped by `network`, for example `eth-mainnet`.
                            method:
                              type: string
                              description: RPC method when grouped by `method`, for example `eth_getLogs`.
                          type: object
                          additionalProperties: false
                        amount:
                          type: string
                          description: Product-native usage for this bucket. Present when `metrics` includes `amount`.
                        unit:
                          type: string
                          description: MoneyUnit name for `amount`, for example `ALCHEMY_COMPUTE_UNIT`.
                      required:
                        - startTime
                        - endTime
                        - isPartial
                        - dimensions
                      type: object
                      additionalProperties: false
                    type: array
                    description: Usage buckets for the query. One entry per time bucket, or per bucket and group-by value.
                required:
                  - query
                  - freshness
                  - data
                type: object
                additionalProperties: false
            required:
              - data
            type: object
            additionalProperties: false
    '400':
      description: Invalid input
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                          - 2000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 400
                  status: 400
                  message: Invalid input
    '401':
      description: Requires authentication
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                          - 2000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 401
                  status: 401
                  message: Requires authentication
    '403':
      description: Forbidden
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                          - 2000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 403
                  status: 403
                  message: Forbidden
    '404':
      description: Not found
      content:
        application/json:
          schema:
            description: |-
              Standard error response wrapper.
              All error responses are wrapped in this format for consistency.
            properties:
              error:
                properties:
                  message:
                    type: string
                  code:
                    anyOf:
                      - type: integer
                        format: int32
                      - enum:
                          - 500
                          - 400
                          - 401
                          - 403
                          - 404
                          - 200
                          - 201
                          - 1000
                          - 2000
                        type: number
                  status:
                    type: integer
                    format: int32
                  context:
                    description: Additional information about the error specific to the endpoint.
                    properties: {}
                    type: object
                    additionalProperties: {}
                required:
                  - message
                  - code
                  - status
                type: object
                additionalProperties: false
            required:
              - error
            type: object
            additionalProperties: false
          examples:
            Example 1:
              value:
                error:
                  code: 404
                  status: 404
                  message: Path not found
  description: |-
    Retrieves usage over time in hourly or daily buckets.
    You can filter by product, app, network, method, and request type.
    You can group by one dimension.

    See [Time series products](/docs/reference/admin-api/overview#time-series-products) for `products` values and units.
  summary: Get usage time series
  security:
    - api_key:
        - ADMIN_USAGE_READ
    - user_auth:
        - viewer
        - developer
        - admin
  parameters: []
  requestBody:
    required: true
    content:
      application/json:
        schema:
          properties:
            startTime:
              type: string
              description: |-
                Start of the query range as an ISO 8601 UTC timestamp.
                If this is older than the available history for your plan, the API clamps the start and omits older buckets.
                `query.startTime` still echoes this requested value.
              example: '2026-06-01T00:00:00Z'
            endTime:
              type: string
              description: End of the query range as an ISO 8601 UTC timestamp. Defaults to now when omitted.
              example: '2026-06-07T23:59:59Z'
            products:
              items:
                enum:
                  - SUPERNODE_CU
                  - BLAST_CU
                  - SUPERNODE_ENHANCED_CU
                  - SOLANA_ARCHIVAL_CU
                  - SPONSORED_GAS
                  - SOLANA_GRPC_TB
                type: string
              type: array
              description: 'Billing product names: `SUPERNODE_CU`, `SUPERNODE_ENHANCED_CU`, `BLAST_CU`, `SOLANA_ARCHIVAL_CU`, `SPONSORED_GAS`, `SOLANA_GRPC_TB`. Defaults to `SUPERNODE_CU`. Products in one request must share a native unit. See [Time series products](/docs/reference/admin-api/overview#time-series-products).'
              example:
                - SUPERNODE_CU
            metrics:
              items:
                enum:
                  - amount
                type: string
              type: array
              description: 'Metrics to return: `amount`. Defaults to `amount`.'
            filters:
              description: Optional AND filters by app, network, method, or request type. Requires a paid plan.
              properties:
                appIds:
                  items:
                    type: string
                  type: array
                  description: Public app IDs to include.
                networks:
                  items:
                    type: string
                  type: array
                  description: Network slugs to include, for example `eth-mainnet`.
                methods:
                  items:
                    type: string
                  type: array
                  description: RPC method names to include, for example `eth_getLogs`.
                requestTypes:
                  items:
                    enum:
                      - http
                      - websocket
                      - webhook
                      - grpc
                    type: string
                  type: array
                  description: 'Request types: `http`, `websocket`, `webhook`, `grpc`.'
              type: object
              additionalProperties: false
            groupBy:
              items:
                enum:
                  - requestType
                  - app
                  - network
                  - method
                type: string
              type: array
              description: 'Group results by one dimension: `requestType`, `app`, `network`, `method`. At most one value. Requires a paid plan.'
            granularity:
              description: 'Time bucket size: `hour` or `day`. Defaults to `day`.'
              enum:
                - hour
                - day
              type: string
          required:
            - startTime
          type: object
          additionalProperties: false
```
