Search the catalog
curl --request GET \
--url https://facilitator.rail402.dev/discovery/searchimport requests
url = "https://facilitator.rail402.dev/discovery/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://facilitator.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://facilitator.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://facilitator.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://facilitator.rail402.dev/discovery/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://facilitator.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": "https://your-seller.example/quote",
"accepts": [
{
"scheme": "exact",
"network": "stellar:testnet",
"asset": "CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA",
"amount": "500000",
"payTo": "GBOQSB3F...QR2",
"maxTimeoutSeconds": 60,
"extra": {}
}
],
"description": "<string>",
"lastUpdated": "2023-11-07T05:31:56Z",
"domainVerified": true,
"quality": {
"totalSettlements": 123,
"uniquePayers": 123
}
}
],
"pagination": {
"limit": 123,
"cursor": "<string>"
},
"searchMethod": "hybrid (bm25+static-embedding, rrf)",
"partialResults": true
}{
"code": "invalid_network",
"reason": "<string>",
"retryable": true,
"details": {}
}Discovery
Search the catalog
Natural-language ranking over the catalog. The result array is resources (not items),
paginated by opaque cursor. A missing or empty query returns 400 invalid_payload.
GET
/
discovery
/
search
Search the catalog
curl --request GET \
--url https://facilitator.rail402.dev/discovery/searchimport requests
url = "https://facilitator.rail402.dev/discovery/search"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://facilitator.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://facilitator.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://facilitator.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://facilitator.rail402.dev/discovery/search")
.asString();require 'uri'
require 'net/http'
url = URI("https://facilitator.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": "https://your-seller.example/quote",
"accepts": [
{
"scheme": "exact",
"network": "stellar:testnet",
"asset": "CBIELTK6YBZJU5UP2WWQEUCYKLPU6AUNZ2BQ4WWFEIE3USCIHMXQDAMA",
"amount": "500000",
"payTo": "GBOQSB3F...QR2",
"maxTimeoutSeconds": 60,
"extra": {}
}
],
"description": "<string>",
"lastUpdated": "2023-11-07T05:31:56Z",
"domainVerified": true,
"quality": {
"totalSettlements": 123,
"uniquePayers": 123
}
}
],
"pagination": {
"limit": 123,
"cursor": "<string>"
},
"searchMethod": "hybrid (bm25+static-embedding, rrf)",
"partialResults": true
}{
"code": "invalid_network",
"reason": "<string>",
"retryable": true,
"details": {}
}Query Parameters
Required range:
1 <= x <= 100⌘I