List x402 resources
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"x402Version": 2,
"items": [
{
"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"
],
"iconUrl": "https://res.cloudinary.com/bdb-prod/image/upload/...",
"curated": true,
"skillUrl": "https://skills.cdp.coinbase.com/weather-api/SKILL.md"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1000
}
}{
"errorType": "invalid_request",
"errorMessage": "Invalid request. Please check the request parameters."
}{
"errorType": "internal_server_error",
"errorMessage": "An internal server error occurred. Please try again later."
}{
"errorType": "bad_gateway",
"errorMessage": "Bad gateway. Please try again later."
}{
"errorType": "service_unavailable",
"errorMessage": "Service unavailable. Please try again later."
}x402 Facilitator
List x402 resources
Lists all active discovered x402 resources. This endpoint returns resources that have been discovered and cached by the x402 facilitator, including their payment requirements and metadata. The response is paginated, and by default, returns 100 items per page.
GET
/
v2
/
x402
/
discovery
/
resources
List x402 resources
curl --request GET \
--url https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"x402Version": 2,
"items": [
{
"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"
],
"iconUrl": "https://res.cloudinary.com/bdb-prod/image/upload/...",
"curated": true,
"skillUrl": "https://skills.cdp.coinbase.com/weather-api/SKILL.md"
}
],
"pagination": {
"limit": 100,
"offset": 0,
"total": 1000
}
}{
"errorType": "invalid_request",
"errorMessage": "Invalid request. Please check the request parameters."
}{
"errorType": "internal_server_error",
"errorMessage": "An internal server error occurred. Please try again later."
}{
"errorType": "bad_gateway",
"errorMessage": "Bad gateway. Please try again later."
}{
"errorType": "service_unavailable",
"errorMessage": "Service unavailable. Please try again later."
}Query Parameters
Filter by protocol type (e.g., "http", "mcp"). Currently, the only supported protocol type is "http".
Example:
"http"
The number of discovered x402 resources to return per page.
The offset of the first discovered x402 resource to return.
Response
Successfully retrieved discovery list.
Response containing discovered x402 resources.
The version of the x402 protocol.
Available options:
1, 2 Example:
2
List of discovered x402 resources.
Show child attributes
Show child attributes
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"],
"iconUrl": "https://res.cloudinary.com/bdb-prod/image/upload/...",
"curated": true,
"skillUrl": "https://skills.cdp.coinbase.com/weather-api/SKILL.md"
}
]
Pagination information for the response.
Show child attributes
Show child attributes
Example:
{ "limit": 100, "offset": 0, "total": 1000 }
Was this page helpful?
⌘I