Skip to main content
GET
/
v2
/
x402
/
discovery
/
search
Search x402 resources
curl --request GET \
  --url https://api.cdp.coinbase.com/platform/v2/x402/discovery/search \
  --header 'Authorization: Bearer <token>'
{
  "x402Version": 2,
  "resources": [
    {
      "resource": "https://api.example.com/weather/forecast",
      "description": "Real-time weather forecast data.",
      "type": "http",
      "x402Version": 2,
      "lastUpdated": "2024-01-15T10:30:00Z",
      "extensions": {
        "bazaar": {
          "info": {
            "input": {
              "type": "http",
              "method": "GET"
            }
          },
          "schema": {}
        }
      },
      "accepts": [
        {
          "scheme": "exact",
          "network": "eip155:8453",
          "amount": "1000000",
          "payTo": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
          "asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
          "maxTimeoutSeconds": 60
        }
      ],
      "quality": {
        "l30DaysTotalCalls": 42,
        "l30DaysUniquePayers": 15,
        "lastCalledAt": "2024-01-15T10:30:00Z"
      }
    }
  ],
  "partialResults": false,
  "searchMethod": "text"
}

Query Parameters

query
string

Full-text or semantic search query to find matching resources.

Maximum string length: 400
Example:

"weather forecast"

network
string

Filter results by network in CAIP-2 format (e.g., eip155:8453) or legacy name (e.g., base, base-sepolia, solana). Legacy names are normalized to their CAIP-2 equivalents before filtering.

Example:

"eip155:8453"

asset
string

Filter results by asset address. For EVM networks, provide a 0x-prefixed EVM address. For Solana networks, provide a base58-encoded address. Matching is case-insensitive.

Example:

"0x036CbD53842c5426634e7929541eC2318f3dCF7e"

scheme
string

Filter results by payment scheme (e.g., exact).

Example:

"exact"

payTo
string

Filter results by the merchant's payment address. For EVM networks, provide a 0x-prefixed EVM address. For Solana networks, provide a base58-encoded address. A blockchain address. Format varies by network (e.g., 0x-prefixed for EVM, base58 for Solana).

Required string length: 1 - 128
Example:

"0x742d35Cc6634C0532925a3b844Bc454e4438f44e"

urlSubstring
string

Filter results to resources whose URL contains this value (case-insensitive substring match against the resource URL). Useful for narrowing results to a specific domain, subdomain, or path segment. Combine with query to perform semantic search restricted to a URL subset. Tip: include enough of the URL to disambiguate (e.g. api.example.com rather than example) — a short substring may also match resources whose path contains the same string.

Required string length: 3 - 2048
Example:

"api.example.com"

maxUsdPrice
string

Filter results to resources with a USD price at or below this value.

Example:

"1.00"

extensions
string[]

Filter results to resources that support the specified protocol extensions. Can be specified multiple times to filter by multiple extensions.

Example:
["bazaar"]
limit
integer
default:20

Maximum number of resources to return. Must be a positive integer no greater than 20. Defaults to 20.

Required range: 1 <= x <= 20

Response

Successfully retrieved matching x402 resources.

Response from a search for x402 resources.

resources
object[]
required

List of x402 resources matching the search query and filters.

Example:
[
{
"resource": "https://api.example.com/weather/forecast",
"description": "Real-time weather forecast data.",
"type": "http",
"x402Version": 2,
"lastUpdated": "2024-01-15T10:30:00Z",
"accepts": [
{
"scheme": "exact",
"network": "eip155:8453",
"amount": "1000000",
"payTo": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"maxTimeoutSeconds": 60
}
],
"extensions": {
"bazaar": {
"info": {
"input": { "type": "http", "method": "GET" }
},
"schema": {}
}
},
"quality": {
"l30DaysTotalCalls": 42,
"l30DaysUniquePayers": 15,
"lastCalledAt": "2024-01-15T10:30:00Z"
},
"serviceName": "Weather API",
"tags": ["weather", "data"]
}
]
partialResults
boolean
required

Indicates whether the result set was truncated because there were more results than the requested limit.

Example:

false

x402Version
enum<integer>
required

The version of the x402 protocol.

Available options:
1,
2
Example:

2

searchMethod
enum<string>

The search method used to retrieve the results (e.g., "text" or "vector").

Available options:
text,
vector
Example:

"text"