---
title: "Search Metrics"
method: POST
path: "/v0/platform/metrics/search"
tags: ["Metrics"]
---

# Search Metrics

`POST /v0/platform/metrics/search`

Search metric definitions with pagination and sorting controls.

## Request body

- object
  - `page_size` integer, required — Number of results returned per page.
  - `page` integer, required — Page number to return.
  - `sort` object[], required — Sorting rules applied to the result set.
    - `field` 'id' | 'created_at', required — Field to sort by.
    - `operator` 'asc' | 'desc', required — Sort direction.
  - `filter` object — Optional filter criteria.
    - `name` object — Filter by metric name. Exactly one operator must be provided.
      - `eq` string — Exact match.
      - `in` string[] — Match any value in the list.
      - `contains` string — Substring match (case-insensitive).
      - `contains_all` string[] — Must contain all specified words.
    - `id` object — Filter by metric ID. Only eq and in supported.
      - `eq` string — Exact match.
      - `in` string[] — Match any value in the list.

## Response `200`

- object
  - `items` MetricObject[], required — Metric objects returned for this page.
    - `id` string, required — Unique identifier of the metric.
    - `name` string, required — Display name of the metric.
    - `data` union, required — Union of supported metric definitions returned by the API.
      - ContractCallMetric
        - `type` 'contract_call', required — Type discriminator for this object.
        - `target` AssetIDTarget, required
          - `type` 'asset_id', required — Type discriminator for this object.
          - `identifier` string, required — Target identifier value.
        - `function_name` string, required — Contract function name to invoke.
        - `function_args` string[] — Function arguments to pass.
        - `return_field_index` integer — Index of the returned field to read.
      - ReadObjectMetric
        - `type` 'read_object', required — Type discriminator for this object.
        - `target` AssetIDTarget, required
          - `type` 'asset_id', required — Type discriminator for this object.
          - `identifier` string, required — Target identifier value.
        - `field_path` string, required — Path to the field that should be extracted.
      - APICallMetric
        - `type` 'api_call', required — Type discriminator for this object.
        - `url` string, required — Target URL for the external API call.
        - `method` 'GET' | 'POST', required — HTTP method to use.
        - `authentication` union
          - HMACAuthentication
            - `type` 'hmac', required — Type discriminator for this object.
            - `hmac_secret` string, required — Secret value for hmac secret authentication.
          - AuthorizationHeaderAuthentication
            - `type` 'authorization_header', required — Type discriminator for this object.
            - `value` string, required — Comparison value.
          - APIKeyAuthorization
            - `type` 'api_key', required — Type discriminator for this object.
            - `header_name` string, required — Header name used for API key authentication.
            - `api_key` string, required — Secret value for api key authentication.
          - BasicAuth
            - `type` 'basic_auth', required
            - `username` string, required
            - `password` string, required
        - `query_params` object — Query parameters to include in the request.
        - `content_type` 'application/json' | 'text/plain', required — Content type for the request payload.
        - `extra_headers` object — Additional headers to include in the request.
        - `sample_interval_seconds` integer, required — Polling interval in seconds.
        - `field_path` string, required — Field path to read from the response payload.
        - `body` string — Request body payload.
      - TransferMetric
        - `type` 'transfer', required — Type discriminator for this object.
        - `from` object, required — From-side transfer filter configuration.
          - `operator` 'in' | 'not_in', required — Comparison operator for from.
          - `target` union[], required — Target asset or entity selection for this rule or action.
            - union
              - …
        - `to` object, required — To-side transfer filter configuration.
          - `operator` 'in' | 'not_in', required — Comparison operator for to.
          - `target` union[], required — Target asset or entity selection for this rule or action.
            - union
              - …
      - ComputedMetric
        - `type` 'computed_metric', required — Type discriminator for this object.
        - `metrics` object[], required — Metric definitions used by this configuration.
          - `symbol` string, required — Short symbol used to reference this metric in formulas.
          - `metric_id` string, required — Identifier for the metric.
        - `formula` string, required — Formula expression used to compute this metric.
      - EventMetric
        - `type` 'event_metric', required — Type discriminator for this object.
        - `target` AssetIDTarget, required
          - `type` 'asset_id', required — Type discriminator for this object.
          - `identifier` string, required — Target identifier value.
        - `event_name` string, required — Event name to monitor.
        - `output_field` string, required — Field path to read from the response payload.
        - `event_filters` object[] — Filters applied to event parameters.
          - `parameter_name` string, required — Event parameter name to filter on.
          - `parameter_value` union, required — Event parameter value to match.
            - string
            - integer
      - SolanaAccountInfoReadMetric
        - `type` 'solana_account_info_read', required — Type discriminator for this object.
        - `target` AssetIDTarget, required
          - `type` 'asset_id', required — Type discriminator for this object.
          - `identifier` string, required — Target identifier value.
        - `abi` object, required — ABI decoding metadata required by the Solana account info reader.
          - `metadata` object, required — Byte-slice bounds used by the decoder.
            - `offset` integer, required — Byte offset where decoding starts.
            - `length` integer, required — Number of bytes to decode from offset.
          - `field_path` string, required — Path to the account-data field to extract (dot-separated).
      - SolanaInstructionMetric
        - `type` 'solana_instruction', required — Type discriminator for this object.
        - `target` AssetIDTarget, required
          - `type` 'asset_id', required — Type discriminator for this object.
          - `identifier` string, required — Target identifier value.
        - `instruction_name` string, required — Instruction name to aggregate.
        - `output_field` string, required — Instruction parameter or path whose value the metric reads.
        - `instruction_filters` object[] — Filters applied to instruction parameters — only matching instructions update the metric.
          - `parameter_name` string, required — Instruction parameter name to filter on.
          - `parameter_value` string, required — Instruction parameter value to match.
    - `created_at` string, required — Timestamp for created at.
    - `added_by` string, required — Actor that added by this record.
  - `page` integer, required — Current page number in the response.
  - `total` integer, required — Total number of matching results.
  - `pages` integer, required — Total number of pages available.
  - `size` integer, required — Number of objects returned in this page.

---

[API](https://skmtc.net/blockaid-official/apis/blockaid-api.md) · [All operations](https://skmtc.net/blockaid-official/apis/blockaid-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/blockaid-official/blockaid-api/revisions/17c41f337b2e/schema)
