PayQL
Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway.
Rank
62
Safety
84
Downloads
1.0k
Updated
Oct 11, 2026
Version
0.1.5
Source
CLAWHUB
About
What it does, and when to use it.
Capability contract not published. No trust telemetry is available yet. 1K downloads reported by the source. Last updated 10/11/2026.
Avoid when
- Contract metadata is missing or unavailable for deterministic execution.
Risk flags: missing_or_unavailable_contract, trust_data_unavailable, schema_references_missing
Public facts
Every fact links back to the source it came from.
- Vendor
- Clawhubvendor · observed Oct 11, 2026
- Protocol compatibility
- OpenClawcompatibility · observed Oct 11, 2026
- Adoption signal
- 1K downloadsadoption · observed Oct 11, 2026
- Latest release
- 0.1.5release · observed Aug 6, 2026
- Handshake status
- UNKNOWNsecurity
Install and run
Setup complexity: low.
clawhub skill install s179kend24a91k7vj5e7dqsjfx83e31s:payqlskill- Install using `clawhub skill install s179kend24a91k7vj5e7dqsjfx83e31s:payqlskill` in an isolated environment before connecting it to live workloads.
- No published capability contract is available yet, so validate auth and request/response behavior manually.
- Review the upstream CLAWHUB listing at https://clawhub.ai/paulieb14/payqlskill before using production credentials.
Contract: missing
curl -s "https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/snapshot"
Run-check
$0.02 USD1 measured facts are behind this paywall: success rate and latency, uptime and estimated cost, when not to use it, how to call it, benchmark scores.
Agents pay $0.02 in USDC. A card payment is $0.50, the smallest a card allows.
Documentation
CLAWHUB
54,238 characters of source documentation, loaded on request.
Extracted files
5 files captured from the source.
SKILL.md
---
name: payql
description: "Get live on-chain data from The Graph, paid per query in USDC over x402 — gasless, keyless, bring-your-own-wallet. Each query spends real USDC (~$0.01) from a wallet you control — use a dedicated, low-balance Base wallet. Discover the right live subgraph, see the price before paying, then pull the data in one loop. Trigger keywords: subgraph, The Graph, GraphQL, on-chain data, DeFi, DEX, pool, TVL, swap, NFT, ENS, token holders, governance, x402, pay per query, USDC, Base, gateway."
version: 0.1.5
homepage: https://github.com/PaulieB14/payql
metadata:
clawdbot:
emoji: "💸"
---
# PayQL — pay-per-query data from The Graph
Get **live on-chain data** from The Graph's subgraphs (DeFi, DEX pools, NFTs, ENS, tokens, governance — 15,000+ subgraphs across 20+ chains), paying ~**$0.01 USDC per query** over [x402](https://x402.org). **No API key, no account, no ETH for gas** — the payment *is* the auth, and it's gasless (EIP-3009 `transferWithAuthorization` on Base).
> 💸 **This spends real USDC.** Every paid query is a live on-chain micropayment (~$0.01) from your wallet — it is **not** a free, read-only API, and the payment is visible on-chain and to the x402 facilitator. Quote the price first (free), and fund a **dedicated, low-balance wallet** — see [Wallet & safety](#wallet--safety).
## The loop: discover → price → query
1. **Discover** the right *live* subgraph for a protocol — ranked by on-chain curation signal, so you skip dead forks.
2. **Price** it — preflight the `402` challenge to read the exact USDC cost *before* paying (free).
3. **Query** — send GraphQL, pay the `402` from your wallet, get the data + a receipt back.
## Two ways to run it
### A. PayQL MCP server (turnkey)
Install and wire into your harness (Claude Desktop / Code / Cursor):
```jsonc
{
"mcpServers": {
"payql": {
"command": "npx",
"args": ["-y", "payql"],
"env": { "PAYQL_NETWORK": "base", "PAYQL_PRIVATE_KEY": "0xYOUR_BASE_WALLET_KEY" }
}
}
}
```
> ⚠️ **`PAYQL_PRIVATE_KEY` can spend its wallet's USDC.** Use a **dedicated, low-balance Base wallet** — never a primary, valuable, or reused key. It sits in your harness config (which can be logged, synced, or screenshotted), so treat it like any secret: don't commit it or paste it in shared chats. Don't want a raw key here? Use **option B** (your harness's own wallet) or an [Ampersend](https://ampersend.ai)-managed wallet with spend caps.
Tools: `search_subgraphs`, `get_payment_info` (free price quote), `query_subgraph` (paid), `get_subgraph_schema`, `wallet_status`. Full recipe + example queries in [references/gateway.md](references/gateway.md).
### B. No install — use your harness's own wallet
If your harness already has an x402 / `pay-for-service` capability, hit the gateway directly:
- **Gateway URL:** `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>`
- POST GraphQL `{"query":"..."}`. On `402`, pay the quoted USDC amount and retry — your_meta.json
{
"ownerId": "kn7ep45hbzy18628bqpwfwcxa582smkj",
"slug": "payqlskill",
"version": "0.1.5",
"publishedAt": 1785981920556
}references/gateway.md
# The Graph x402 gateway — recipe & examples
Everything needed to discover, price, and query The Graph's subgraphs pay-per-query, with no API key.
## Endpoints
| | URL |
|---|---|
| Query a subgraph (mainnet) | `https://gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |
| Query a subgraph (testnet) | `https://testnet.gateway.thegraph.com/api/x402/subgraphs/id/<SUBGRAPH_ID>` |
- **Method:** `POST`, `Content-Type: application/json`, body `{"query":"...","variables":{}}`.
- **Payment:** the first request returns `402` with the challenge in a base64 **`payment-required` response header** (`accepts[]` → `scheme: exact`, `network: eip155:8453`, `asset:` USDC `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`, `amount:` atomic USDC, `extra.assetTransferMethod: eip3009`). Sign the EIP-3009 authorization and retry with the `X-PAYMENT` header — any x402 client (`@x402/fetch`, `@graphprotocol/client-x402`) does this for you. Settlement is **gasless** (the facilitator pays gas).
- **Price:** ~**$0.01 USDC** per query.
## 1. Discover a subgraph (free if you have a registry; else a tiny paid query)
Query The Graph **network subgraph** (`DZz4kDTdmzWLWsV373w2bSmoar3umKKH9y82SUKr5qmp`) with its fulltext index, ranked by curation signal:
```graphql
query Search($text: String!, $first: Int!) {
subgraphMetadataSearch(text: $text, first: $first) {
displayName
description
subgraphs(first: 1, where: { active: true }, orderBy: currentSignalledTokens, orderDirection: desc) {
id
currentVersion { subgraphDeployment { ipfsHash queryFeesAmount signalledTokens } }
}
}
}
```
`text` uses tsquery syntax — turn `"uniswap v3"` into `"uniswap:* | v3:*"` (OR-join, so multi-word topics still match). The `subgraphs[0].id` is the `<SUBGRAPH_ID>` you query in step 2.
## 2. Query it
```graphql
{
pools(first: 3, orderBy: volumeUSD, orderDirection: desc) {
token0 { symbol }
token1 { symbol }
volumeUSD
}
}
```
Example result (Uniswap V3, `5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV`):
```json
{
"data": {
"pools": [
{ "token0": { "symbol": "USDC" }, "token1": { "symbol": "WETH" }, "volumeUSD": "1234567890.12" }
]
}
}
```
The paid response includes an `X-PAYMENT-RESPONSE` header (base64) with the settlement receipt: `{ success, transaction (tx hash), network, amount }`.
## Funding
Hold **USDC on Base** — no ETH needed (gasless). **Use a dedicated, low-balance wallet** funded with only the USDC you intend to spend; seeding it is a one-time human step. This skill makes paid **reads** — it does not swap, trade, or auto-top-up the wallet, so keep funding a separate, human-approved action. For server-side spend caps/allowlists, use an [Ampersend](https://ampersend.ai)-managed wallet.skill-card.md
## Description: PayQL helps agents discover live The Graph subgraphs, quote x402 pricing, and run paid GraphQL reads using USDC from a user-controlled Base wallet. This skill is ready for commercial/non-commercial use. ## Publisher: [paulieb14](https://clawhub.ai/user/paulieb14) ### License/Terms of Use: MIT-0 ## Use Case: Developers and agent operators use PayQL to find relevant on-chain subgraphs, preview query costs, retrieve schemas, check wallet status, and run paid read-only GraphQL queries for DeFi, NFT, ENS, token, and governance data. ### Deployment Geography for Use: Global ## Known Risks and Mitigations: Risk: The default setup can run a mutable npm package with a wallet private key that can spend real USDC. Mitigation: Use a pinned reviewed package version or locked local install, and configure only a dedicated low-balance Base wallet. Risk: Paid queries spend real USDC from the configured wallet. Mitigation: Review each quoted price before querying and keep only the USDC amount you are willing to spend or lose in the configured wallet. Risk: Wallet credentials in harness configuration can be logged, synced, committed, or exposed in shared contexts. Mitigation: Never use a primary or reused private key; prefer the harness wallet flow or a managed wallet with spend caps and allowlists. ## Reference(s): - [The Graph x402 gateway recipe and examples](artifact/references/gateway.md) - [PayQL ClawHub release page](https://clawhub.ai/paulieb14/skills/payqlskill) - [x402](https://x402.org) - [Ampersend managed wallet option](https://ampersend.ai) ## Skill Output: **Output Type(s):** [guidance, shell commands, configuration, code, text] **Output Format:** [Markdown with JSON, GraphQL, and shell command snippets] **Output Parameters:** [1D] **Other Properties Related to Output:** [May produce x402 payment guidance, GraphQL query examples, subgraph metadata, schemas, wallet status, and paid query results with receipts.] ## Skill Version(s): 0.1.5 (source: server-resolved release evidence, SKILL.md frontmatter, and skill.json) ## Ethical Considerations: Users should evaluate whether this skill is appropriate for their environment, review any generated or modified files before relying on them, and apply their organization's safety, security, and compliance requirements before deployment.
skill.json
{
"name": "payql",
"version": "0.1.5",
"description": "Get live on-chain data from The Graph's subgraphs and pay per query in USDC over x402 \u2014 gasless, keyless, bring-your-own-wallet. Each paid query spends real USDC (~$0.01) from a wallet you control \u2014 use a dedicated, low-balance Base wallet, never a primary/reused key \u2014 so it is not free read-only access. Discover the right live subgraph (ranked by curation signal), see the price before paying, then pull DeFi, DEX, NFT, ENS, token, and governance data in one agent loop. No API key, no account, no ETH for gas.",
"author": "paulieb14",
"license": "MIT",
"homepage": "https://github.com/PaulieB14/payql",
"tags": [
"x402",
"thegraph",
"subgraph",
"graphql",
"onchain-data",
"usdc",
"base",
"defi",
"nft",
"ens",
"agent-payments",
"pay-per-query",
"mcp",
"web3"
],
"categories": [
"Web",
"Finance",
"AI/ML"
],
"mcp": {
"tools": [
"search_subgraphs",
"get_payment_info",
"query_subgraph",
"get_subgraph_schema",
"wallet_status"
],
"transport": "stdio",
"endpoint": "npx -y payql"
}
}AionUi
Free, local, open-source 24/7 Cowork app and OpenClaw for Gemini CLI, Claude Code, Codex, OpenCode, Qwen Code, Goose CLI, Auggie, and more | 🌟 Star if you like it!
activepieces
AI Agents & MCPs & AI Workflow Automation • (~400 MCP servers for AI agents) • AI Automation / AI Agent with MCPs • AI Workflows & AI Agents • MCPs for AI Agents
cherry-studio
AI productivity studio with smart chat, autonomous agents, and 300+ assistants.
CopilotKit
The Frontend for Agents & Generative UI. React + Angular
Machine-readable data
The same record, as JSON, for agents and crawlers.
{
"facts": [
{
"factKey": "vendor",
"category": "vendor",
"label": "Vendor",
"value": "Clawhub",
"href": "https://clawhub.ai/paulieb14/skills/payqlskill",
"sourceUrl": "https://clawhub.ai/paulieb14/skills/payqlskill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T16:39:16.870Z",
"isPublic": true
},
{
"factKey": "protocols",
"category": "compatibility",
"label": "Protocol compatibility",
"value": "OpenClaw",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/contract",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/contract",
"sourceType": "contract",
"confidence": "medium",
"observedAt": "2026-10-11T16:39:16.870Z",
"isPublic": true
},
{
"factKey": "traction",
"category": "adoption",
"label": "Adoption signal",
"value": "1K downloads",
"href": "https://clawhub.ai/paulieb14/payqlskill",
"sourceUrl": "https://clawhub.ai/paulieb14/payqlskill",
"sourceType": "profile",
"confidence": "medium",
"observedAt": "2026-10-11T16:39:16.870Z",
"isPublic": true
},
{
"factKey": "latest_release",
"category": "release",
"label": "Latest release",
"value": "0.1.5",
"href": "https://clawhub.ai/paulieb14/payqlskill",
"sourceUrl": "https://clawhub.ai/paulieb14/payqlskill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-06T02:05:20.556Z",
"isPublic": true
},
{
"factKey": "handshake_status",
"category": "security",
"label": "Handshake status",
"value": "UNKNOWN",
"href": "https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/trust",
"sourceUrl": "https://www.xpersona.co/api/v1/agents/clawhub-paulieb14-payqlskill/trust",
"sourceType": "trust",
"confidence": "medium",
"observedAt": null,
"isPublic": true
}
],
"events": [
{
"eventType": "release",
"title": "Release 0.1.5",
"description": "0.1.5: serverInfo version now derives from package.json (it had drifted to 0.1.0 while npm shipped 0.1.2); x402 payment SDK raised to ^2.21.0; MCP SDK ^1.30.0; regression tests pin the version across package.json and skill.json.",
"href": "https://clawhub.ai/paulieb14/payqlskill",
"sourceUrl": "https://clawhub.ai/paulieb14/payqlskill",
"sourceType": "release",
"confidence": "medium",
"observedAt": "2026-08-06T02:05:20.556Z",
"isPublic": true
}
]
}Record generated Oct 11, 2026.
