Google Places · Proxied · Pay-per-request
x402 · USDC · Base Mainnet · USDC · Solana Mainnet

Payment

Protocol x402 (HTTP 402 Payment Required) Facilitatorhttps://portsidelabs-x402-facilitator-536698811508.us-west1.run.app

SVM — Solana

Price $0.001 USDC per request Network Solana Mainnet (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp) Pay to 4F7vL61eYmywh9S1z4vuNnnpXKDGNnHqFbj26gT8HAUx Asset EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v (USDC)

Payment Flow

  1. Make a request to any endpoint without an X-Payment header.
  2. Receive HTTP 402 with a WWW-Authenticate body describing available payment options (amount, asset, payTo, network).
  3. Choose a payment option and sign the appropriate authorization — EIP-3009 transferWithAuthorization for EVM (Base), or a USDC SPL transfer transaction for SVM (Solana).
  4. Encode the signed authorization as the X-Payment header and re-send the request.
  5. The facilitator verifies the authorization on-chain, the API responds with data, then the facilitator settles the transfer.

Endpoints

GET /places/{placeId}

Fetch details for a single place by its Google Place ID. Returns structured place data from the Google Places API v1.

HeaderRequiredDescription
X-PaymentrequiredSigned x402 payment authorization
X-Goog-FieldMaskoptionalComma-separated fields to return. Default: displayName,formattedAddress,location
Request
GET /places/ChIJN1t_tDeuEmsRUsoyG83frY4
X-Goog-FieldMask: displayName,formattedAddress,location,rating,websiteUri
X-Payment:        <signed-x402-authorization>
Response 200
{
  "displayName": {
    "text": "Sydney Opera House",
    "languageCode": "en"
  },
  "formattedAddress": "Bennelong Point, Sydney NSW 2000, Australia",
  "location": {
    "latitude":  -33.8567844,
    "longitude": 151.2152967
  }
}
POST /places/search

Full-text place search via Google Places API Text Search. Accepts a JSON body and returns a list of matching places.

HeaderRequiredDescription
Content-Typerequiredapplication/json
X-PaymentrequiredSigned x402 payment authorization
X-Goog-FieldMaskoptionalComma-separated fields to return. Default: places.displayName,places.formattedAddress
Body fieldRequiredDescription
textQueryrequiredNatural language search query
languageCodeoptionalBCP-47 language code for results (e.g. "en")
locationBiasoptionalPrefer results near a given location
maxResultCountoptionalMax results to return (1–20, default 20)
Request
POST /places/search
Content-Type:    application/json
X-Goog-FieldMask: places.displayName,places.formattedAddress,places.rating
X-Payment:       <signed-x402-authorization>

{
  "textQuery": "coffee shops near downtown Portland",
  "maxResultCount": 5
}
Response 200
{
  "places": [
    {
      "displayName": { "text": "Stumptown Coffee Roasters" },
      "formattedAddress": "128 SW 3rd Ave, Portland, OR 97204, USA",
      "rating": 4.5
    },
    // …up to maxResultCount entries
  ]
}

Field Masks

Use X-Goog-FieldMask to request only the fields you need. Unmask only what you use — billed per request regardless of field count. Full reference: Google Places Field Reference

FieldDescription
displayNameLocalized place name
formattedAddressFull human-readable address
locationLatitude / longitude
ratingAggregate user rating (1.0 – 5.0)
websiteUriPlace's own website URL
internationalPhoneNumberE.164 formatted phone number
regularOpeningHoursOpening hours with periods array
priceLevelPRICE_LEVEL_FREE … PRICE_LEVEL_VERY_EXPENSIVE
typesPlace type array (e.g. restaurant, locality)
photosPhoto references (up to 10)

Error Responses

StatusMeaning
402 Payment RequiredNo or invalid X-Payment header — inspect body for payment requirements
400 Bad RequestMalformed request body or missing required field
404 Not FoundPlace ID not found in Google Places
500 Internal Server ErrorUpstream Google API error or facilitator failure