Agent API

Discover endpoints

Search the whole marketplace in natural language and get ranked endpoints with their price, reliability and ready-to-run next steps. Free, no key needed.

POST/v1/discover

A GET /v1/discover?query=… form also works (q is accepted as an alias), with the same fields as query parameters.

Authentication

None. Discovery is free and works without a key.

Body

querystringrequired
What you need, in plain words (1–1000 characters). English and Chinese both work, e.g. “token price on solana”.
limitinteger
Max results. Default 5, max 40.
minScorenumber
Drop results scoring below this. Default 0.3.
categorystring
Only this API category (case-insensitive), e.g. Crypto.
providerstring
Only this API slug.
maxPricenumber
Only endpoints costing at most this much per call (USD).

Request

bash
curl -X POST https://gw.pikeway.ai/v1/discover \
  -H "Content-Type: application/json" \
  -d '{"query": "token price on solana", "limit": 3}'

Response

200 OK
{
  "results": [
    {
      "provider": "birdeye",
      "providerName": "Birdeye",
      "endpoint": "/defi/price",
      "method": "GET",
      "name": "Token price",
      "description": "Current price of a token by mint address",
      "category": "Crypto",
      "tags": ["solana", "price", "defi"],
      "score": 0.874,
      "scoreBreakdown": {
        "relevance": 0.912,
        "reliability": 0.991,
        "price": 0.667,
        "matchedTerms": ["token", "price", "solana"],
        "popularity": 0.41,
        "semantic": 0.83
      },
      "price": {
        "type": "PER_CALL",
        "amount": { "value": 0.001, "currency": "USD" },
        "notes": ["charged only when the upstream call succeeds (HTTP 2xx)"]
      },
      "stats": { "successRate30d": 0.991, "p50Ms": 182 },
      "hints": {
        "inspect": "curl -s -X POST https://gw.pikeway.ai/v1/inspect -H 'Content-Type: application/json' -d '{\"endpoint\":\"/defi/price\",\"method\":\"GET\",\"provider\":\"birdeye\"}'",
        "run": "curl -s -X POST https://gw.pikeway.ai/v1/run -H 'Authorization: Bearer $PIKEWAY_API_KEY' -H 'Content-Type: application/json' -d '{…}'",
        "docs": "…/apis/birdeye?ep=GET+%2Fdefi%2Fprice"
      }
    }
  ],
  "query": "token price on solana",
  "count": 1
}
Result fields
provider · endpoint · methodstring
Pass these to /v1/inspect and /v1/run. provider is the API slug, endpoint the path template.
scorenumber 0–1
Overall rank: mostly relevance, with reliability, price and real usage as tie-breakers.
scoreBreakdownobject
relevance (text match, blended with semantic similarity when available), reliability (30-day success rate, 0.9 when unknown), price (cheaper is higher), popularity (30-day successful calls), matchedTerms.
priceobject
type is PER_CALL, PER_TOKEN or BYOK; amount is per call in USD. free: true for free endpoints. Bring-your-own-key APIs add byok, notes and signupUrl.
statsobject
successRate30d and p50Ms, when there's enough traffic.
hintsobject
Ready-made curl commands for inspect and run, and a link to the endpoint's docs page.

An empty results array means nothing scored above minScore; try other words or lower it.

Errors

  • 400 query is required (1-1000 characters)
  • 400 body must be JSON: {"query": "..."}
  • 405 use POST (methods other than GET and POST)