**Version: 202601**

# List shop metafields

**GET** `/openapi/2026-01/metafields-shop`

List metafields attached to the current shop.

## Request

**Query Parameters**

- `namespace` string

  A container for a group of metafields. Grouping metafields within a namespace prevents your metafields from conflicting with other metafields with the same key name. For example, "global"
- `key` string

  The key of the metafield (unique within the namespace). For example, "color"
- `type` string

  Metafield value type:

  *   `JSON`: JSON value
  *   `string`: String value
- `limit` int64

  Maximum number of metafields to return per page. Default is 50
- `cursor` uint64

  Cursor for pagination
- `fields` string

  Comma-separated list of fields to include in the response. For example, "ID,value,key"
- `create_at_max` string

  Filter for metafields whose creation time is not later than this point. ISO-8601 format. For example, "2023-01-01T00:00:00Z"
- `create_at_min` string

  Filter for metafields whose creation time is not earlier than this point. ISO-8601 format. For example, "2023-01-01T00:00:00Z"
- `update_at_max` string

  Filter for metafields whose last update time is not later than this point. ISO-8601 format. For example, "2023-01-01T00:00:00Z"
- `update_at_min` string

  Filter for metafields whose last update time is not earlier than this point. ISO-8601 format. For example, "2023-01-01T00:00:00Z"

## Responses

**200**

OK

**application/json**

**Schema | Example**

**Schema**

- `code` string

  error code
- `message` string

  error message
- `data` object

  - `metafields` object[]

    List of metafields

    *   Array \[

    - `id` string

      The unique identifier for the metafield
    - `store_id` uint32

      The ID of the store that owns the metafield
    - `owner_resource` string

      Resource type the metafield is attached to:

      *   `shop`: Shop
      *   `product`: Product
      *   `product_image`: Product image
      *   `product_variant`: Product variant
      *   `order`: Order
      *   `page`: Custom page
      *   `customer`: Customer
      *   `collection`: Collection
      *   `blog`: Blog
      *   `article`: Article
      *   `app`: App
    - `owner_id` string

      The ID of the resource the metafield is attached to. For example, the product ID
    - `namespace` string

      A container for a group of metafields. Grouping metafields within a namespace prevents your metafields from conflicting with other metafields with the same key name. For example, "global"
    - `key` string

      The key of the metafield (unique within the namespace). For example, "color"
    - `type` string

      Field type of the metafield:

      *   `date`: Date
      *   `date_time`: Date and time
      *   `weight`: Weight
      *   `volume`: Volume
      *   `dimension`: Dimension
      *   `integer`: Integer
      *   `number_decimal`: Decimal
      *   `file_reference`: File reference
      *   `single_line_text_field`: Single-line text
      *   `multi_line_text_field`: Multi-line text
      *   `json`: JSON
      *   `color`: Color
      *   `rating`: Rating
      *   `url`: URL
      *   `boolean`: Boolean (true or false)
      *   `string`: String
    - `value` GoogleProtobufValue

      The value of the metafield; its data type is determined by the `type` field. For example, "red"
    - `description` string

      A brief description of the metafield. For example, "The color of the product"
    - `definition_id` uint64

      The ID of the associated metafield definition. For example, "123456"
    - `created_at` string

      The time when the metafield was created, in ISO-8601 format
    - `updated_at` string

      The time when the metafield was last updated, in ISO-8601 format
    *   \]
  - `cursor` uint64

    Cursor for pagination
  - `has_more` boolean

    Whether there are more records

```json
{
  "code": "string",
  "message": "string",
  "data": {
    "metafields": [
      {
        "id": "string",
        "store_id": 0,
        "owner_resource": "string",
        "owner_id": "string",
        "namespace": "string",
        "key": "string",
        "type": "string",
        "description": "string",
        "definition_id": 0,
        "created_at": "string",
        "updated_at": "string"
      }
    ],
    "cursor": 0,
    "has_more": true
  }
}
```
