Neynar · Example Payload

Execute Sql

Executes a raw SQL query against the deployment database. Only SELECT, WITH, and EXPLAIN queries are allowed. Admin access required.

studio

Execute Sql is an example object payload from Neynar, with 9 top-level fields. It illustrates the shape of data this provider's APIs accept or return.

Top-level fields

operationIdmethodpathsummarydescriptiontagsparametersrequestBodyresponses

Example Payload

Raw ↑
{
  "operationId": "execute-sql",
  "method": "POST",
  "path": "/v2/studio/deployment/database/sql",
  "summary": "Execute raw SQL query (admin only)",
  "description": "Executes a raw SQL query against the deployment database. Only SELECT, WITH, and EXPLAIN queries are allowed. Admin access required.",
  "tags": [
    "studio"
  ],
  "parameters": [],
  "requestBody": {
    "required": true,
    "schema": {
      "properties": {
        "deployment_id": {
          "description": "Deployment ID (UUID)",
          "format": "uuid",
          "type": "string"
        },
        "fid": {
          "description": "Farcaster ID (optional for admins)",
          "example": 3,
          "format": "int32",
          "minimum": 0,
          "type": "integer"
        },
        "sql": {
          "description": "SQL query to execute",
          "maxLength": 10000,
          "minLength": 1,
          "type": "string"
        }
      },
      "required": [
        "deployment_id",
        "sql"
      ],
      "type": "object"
    },
    "example": null
  },
  "responses": {
    "200": {
      "description": "Success",
      "schema": {
        "properties": {
          "columns": {
            "description": "Column metadata",
            "items": {
              "properties": {
                "name": {
                  "description": "Column name",
                  "type": "string"
                },
                "type": {
                  "description": "Column data type",
                  "type": "string"
                }
              },
              "required": [
                "name",
                "type"
              ],
              "type": "object"
            },
            "type": "array"
          },
          "executionTimeMs": {
            "description": "Query execution time in milliseconds",
            "type": "number"
          },
          "rowCount": {
            "description": "Number of rows returned",
            "type": "number"
          },
          "rows": {
            "description": "Query result rows",
            "items": {
              "additionalProperties": {},
              "type": "object"
            },
            "type": "array"
          }
        },
        "required": [
          "columns",
          "rows",
          "rowCount",
          "executionTimeMs"
        ],
        "type": "object"
      },
      "example": null
    },
    "400": {
      "description": "Bad Request",
      "schema": {
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "example": null
    },
    "403": {
      "description": "Forbidden",
      "schema": {
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "example": null
    },
    "404": {
      "description": "Resource not found",
      "schema": {
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "example": null
    },
    "500": {
      "description": "Server Error",
      "schema": {
        "properties": {
          "code": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "error"
        ],
        "type": "object"
      },
      "example": null
    }
  }
}

Work with this as data

Every example here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for examples

4 MCP tools reach this
  • find_examplesBrowse and filter every example in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This example
curl "https://apis.io/api/v1/examples/execute-sql"
All examples
curl "https://apis.io/api/v1/examples?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.