curl --request GET \
--url https://testnet.rail402.dev/discovery/searchimport requests
url = "https://testnet.rail402.dev/discovery/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.rail402.dev/discovery/search', 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://testnet.rail402.dev/discovery/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://testnet.rail402.dev/discovery/search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.rail402.dev/discovery/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.rail402.dev/discovery/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"x402Version": 2,
"resources": [
{
"resource": "<string>",
"type": "http",
"x402Version": 2,
"accepts": [
{
"scheme": "exact",
"network": "stellar:testnet",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 123,
"extra": {
"areFeesSponsored": true
}
}
],
"lastUpdated": "2023-11-07T05:31:56Z",
"extensions": {
"bazaar": {}
},
"rail402": {
"trust": "settled",
"settlements": 123,
"listings": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "<string>",
"version": 123,
"trust": "settled",
"owner": "<string>",
"settlements": 123,
"firstCataloged": "2023-11-07T05:31:56Z",
"lastSettled": "2023-11-07T05:31:56Z",
"stellar": {
"checkedAt": "2023-11-07T05:31:56Z",
"domain": {
"host": "<string>",
"claimsOwner": true
}
}
}
],
"options": [
{
"listing": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"receivable": true
}
],
"method": "<string>",
"toolName": "<string>"
},
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
}
],
"partialResults": true,
"pagination": {
"limit": 123,
"cursor": "<string>"
},
"rail402": {
"method": "hybrid",
"recognised": [
"network=stellar:testnet",
"maxPrice=0.02 USD"
],
"revision": 123
}
}{
"error": {
"code": "search_query_required",
"reason": "The `query` parameter is required and must not be blank.",
"retryable": false
}
}{
"error": {
"code": "<string>",
"reason": "<string>",
"retryable": true,
"details": {}
}
}Search the catalog
Natural-language search over published listings. Hard filters, from parameters or recognised in the query text, apply before ranking; lexical (BM25F) and semantic (local embeddings) rankings are fused with reciprocal rank fusion. Explicit parameters override the same constraint in the text.
curl --request GET \
--url https://testnet.rail402.dev/discovery/searchimport requests
url = "https://testnet.rail402.dev/discovery/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://testnet.rail402.dev/discovery/search', 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://testnet.rail402.dev/discovery/search",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$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://testnet.rail402.dev/discovery/search"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://testnet.rail402.dev/discovery/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://testnet.rail402.dev/discovery/search")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"x402Version": 2,
"resources": [
{
"resource": "<string>",
"type": "http",
"x402Version": 2,
"accepts": [
{
"scheme": "exact",
"network": "stellar:testnet",
"asset": "<string>",
"payTo": "<string>",
"amount": "<string>",
"maxTimeoutSeconds": 123,
"extra": {
"areFeesSponsored": true
}
}
],
"lastUpdated": "2023-11-07T05:31:56Z",
"extensions": {
"bazaar": {}
},
"rail402": {
"trust": "settled",
"settlements": 123,
"listings": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"network": "<string>",
"version": 123,
"trust": "settled",
"owner": "<string>",
"settlements": 123,
"firstCataloged": "2023-11-07T05:31:56Z",
"lastSettled": "2023-11-07T05:31:56Z",
"stellar": {
"checkedAt": "2023-11-07T05:31:56Z",
"domain": {
"host": "<string>",
"claimsOwner": true
}
}
}
],
"options": [
{
"listing": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"symbol": "<string>",
"name": "<string>",
"decimals": 123,
"receivable": true
}
],
"method": "<string>",
"toolName": "<string>"
},
"description": "<string>",
"mimeType": "<string>",
"serviceName": "<string>",
"tags": [
"<string>"
],
"iconUrl": "<string>"
}
],
"partialResults": true,
"pagination": {
"limit": 123,
"cursor": "<string>"
},
"rail402": {
"method": "hybrid",
"recognised": [
"network=stellar:testnet",
"maxPrice=0.02 USD"
],
"revision": 123
}
}{
"error": {
"code": "search_query_required",
"reason": "The `query` parameter is required and must not be blank.",
"retryable": false
}
}{
"error": {
"code": "<string>",
"reason": "<string>",
"retryable": true,
"details": {}
}
}Query Parameters
What to find, in natural language. 1 to 500 characters after trimming. Longer than 500 after
trimming is search_query_too_long; longer than 2,000 is discovery_invalid_parameter.
2000Only listings of this resource type. Unknown types match nothing.
^[a-z][a-z0-9_-]{0,31}$"http"
"mcp"
Only payment options paying this address (a G… address also matches muxed addresses on it).
^[A-Z2-7]{56}$|^M[A-Z2-7]{68}$Only payment options in this scheme.
^[a-z][a-z0-9_-]{0,31}$"exact"
Only payment options on this CAIP-2 network.
^[-a-z0-9]{3,8}:[-_a-zA-Z0-9]{1,64}$"stellar:testnet"
Comma-separated extension keys (at most 10) every resource must declare in its 402 response.
^[a-zA-Z0-9_-]{1,64}(,[a-zA-Z0-9_-]{1,64}){0,9}$"bazaar"
Only payment options in this asset, by C… contract address or symbol.
^C[A-Z2-7]{55}$|^[A-Za-z0-9]{1,12}$Price ceiling, in the asset's units if asset is set, else in US dollars.
^\d{1,15}(\.\d{1,18})?$Page size, in resources. Values above 50 are clamped to 50.
x >= 1The pagination.cursor of the previous page.
512Response
A page of results, best first.
Show child attributes
Show child attributes
True when the semantic ranking was cut at its depth, or a ranked (not filter-only) search ran lexical-only because no model is loaded or embedding the query failed or took over 2 seconds.
Show child attributes
Show child attributes
Show child attributes
Show child attributes