Fetch cited geospatial facts with an x402 payment
curl --request POST \
--url https://api.mireye.com/v1/x402/fetch \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"fields": [
"<string>"
],
"lat": 123,
"lng": 123
}
'import requests
url = "https://api.mireye.com/v1/x402/fetch"
payload = {
"address": "<string>",
"fields": ["<string>"],
"lat": 123,
"lng": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>', fields: ['<string>'], lat: 123, lng: 123})
};
fetch('https://api.mireye.com/v1/x402/fetch', 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.mireye.com/v1/x402/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '<string>',
'fields' => [
'<string>'
],
'lat' => 123,
'lng' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mireye.com/v1/x402/fetch"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"lat\": 123,\n \"lng\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mireye.com/v1/x402/fetch")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"lat\": 123,\n \"lng\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mireye.com/v1/x402/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"lat\": 123,\n \"lng\": 123\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Fetch
POST /v1/x402/fetch
Pay per call with USDC on Base for cited public geospatial facts. No Mireye API key required.
POST
/
v1
/
x402
/
fetch
Fetch cited geospatial facts with an x402 payment
curl --request POST \
--url https://api.mireye.com/v1/x402/fetch \
--header 'Content-Type: application/json' \
--data '
{
"address": "<string>",
"fields": [
"<string>"
],
"lat": 123,
"lng": 123
}
'import requests
url = "https://api.mireye.com/v1/x402/fetch"
payload = {
"address": "<string>",
"fields": ["<string>"],
"lat": 123,
"lng": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({address: '<string>', fields: ['<string>'], lat: 123, lng: 123})
};
fetch('https://api.mireye.com/v1/x402/fetch', 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.mireye.com/v1/x402/fetch",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'address' => '<string>',
'fields' => [
'<string>'
],
'lat' => 123,
'lng' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mireye.com/v1/x402/fetch"
payload := strings.NewReader("{\n \"address\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"lat\": 123,\n \"lng\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mireye.com/v1/x402/fetch")
.header("Content-Type", "application/json")
.body("{\n \"address\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"lat\": 123,\n \"lng\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mireye.com/v1/x402/fetch")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"address\": \"<string>\",\n \"fields\": [\n \"<string>\"\n ],\n \"lat\": 123,\n \"lng\": 123\n}"
response = http.request(request)
puts response.read_body{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Fetch cited public facts for one US coordinate or street address using an
x402 v2 payment. Each successful call costs $0.001 USDC on Base
(
Use an x402 v2 compatible client with a Base wallet funded with USDC to complete
the paid retry. A Mireye API key does not replace the payment on this route.
The account-wallet
eip155:8453), regardless of the number of selected fields. No Mireye account,
API key, prepaid balance, or subscription is required for this route.
Authenticated POST /v1/fetch remains free. This separate
route lets wallet-equipped agents pay directly without creating an API key.
Payment flow
- Send the Fetch request below. Without payment, the API returns
402with aPayment-Requiredheader. Decode its base64-encoded x402 v2 JSON to read the payment requirements andextensions.bazaardiscovery metadata. The response body is empty JSON ({}). - An x402 client checks the amount, Base network and recipient, signs a USDC
payment authorization, and retries the same request with
Payment-Signature. - After verification and successful execution, the payment settles. The
200response contains Fetch data and aPayment-Responsesettlement header.
curl -i https://api.mireye.com/v1/x402/fetch \
-H 'Content-Type: application/json' \
-d '{"lat":37.7749,"lng":-122.4194,"fields":["elevation"]}'
Data and limits
The request schema, US coverage, field selectors, presets, response provenance, address handling and capacity limits match Fetch. Parcel identity, ownership, boundaries and licensed parcel-derived fields are excluded. Use the authenticated Enrich API for those. Readpartial_failures and each field’s status: a successful Fetch response
can contain absent or failed fields and still costs the fixed call price.
HTTP error responses do not proceed to settlement. Failed settlement withholds
the data response.
Errors and retries
| HTTP | Meaning | Action |
|---|---|---|
402 | Payment is missing, invalid, or could not settle. | Read the x402 requirements or settlement result. Correct the payment before retrying. |
400 / 422 | The paid request has invalid fields, location or body. | Correct the request; the failed execution is not settled. |
429 | Fetch capacity is busy. | Respect Retry-After; the failed execution is not settled. |
503 with x402_unavailable | The payment service is unavailable. | Retry later; no payment was accepted by this gate. |
Idempotency-Key, max_cost_usd and /v1/operations recovery
flow do not apply here. Configure spending limits in your x402 client. If a
response is lost after signing, inspect the payment outcome before authorizing
a new payment; a new authorization can create a separate charge.Body
application/json
Required string length:
1 - 256Available options:
terrain, flood_risk, wildfire_underwrite, land_cover, site_selection, building_lookup, points_of_interest, utilities, boundaries, solar_siting, wind_siting, storage_siting, data_center_siting, grid_interconnect, natural_hazard Response
Successful Response