Skip to main content
POST
https://api.clay.com/public/v0
/
tables
/
query
Run a structured query across one or more tables
curl --request POST \
  --url https://api.clay.com/public/v0/tables/query \
  --header 'Content-Type: application/json' \
  --header 'clay-api-key: <api-key>' \
  --data '
{
  "query": {
    "tables": [
      {
        "id": "<string>",
        "alias": "<string>"
      }
    ],
    "filter": {
      "field": "<string>",
      "path": [
        "<string>"
      ],
      "value": "<string>"
    },
    "group_by": [
      "<string>"
    ],
    "join": [
      {
        "on": {
          "left": "<string>",
          "right": "<string>"
        },
        "table": "<string>",
        "type": "inner"
      }
    ],
    "order_by": [
      {
        "field": "<string>",
        "direction": "asc"
      }
    ],
    "select": [
      {
        "as": "<string>",
        "field": "<string>",
        "path": [
          "<string>"
        ]
      }
    ]
  }
}
'
{
  "data": [
    {}
  ],
  "cursor": "<string>",
  "fields": {}
}

Authorizations

clay-api-key
string
header
required

Personal API key tied to your Clay user. Create one under Settings → Account in the Clay app.

Body

application/json

Body

query
object
required
cursor
string
limit
integer
default:50
Required range: 1 <= x <= 100

Response

200

data
object[]
required
cursor
string
fields
object