# Find a place
$ curl -G https://pins.prim.sh/v1/places/search \\
-H "X-402-Payment: $TOKEN" \\
--data-urlencode "query=coffee near 37.7749,-122.4194"
{
"results": [
{
"name": "Agent Brew",
"location": { "lat": 45.5512, "lng": -122.6750 },
"status": "open",
"hours": { "open": "07:00", "close": "19:00" },
"rating": 4.8
}
]
}
# Get routing
$ curl -X POST https://pins.prim.sh/v1/routing/directions \\
-H "X-402-Payment: $TOKEN" \\
-d '{"from": "45.5512,-122.6750", "to": "45.5231,-122.6765"}'
Agent needs to know if a business is open before calling via ring.sh. pins.sh provides structured hours and status.
Calculate travel times between coordinates. Optimize delivery routes. No maps UI, just distance matrices.
"Where am I?" Agent IP → Geolocation → Nearby POIs. Gives the agent spatial awareness.
Businesses submit clean data to pins.sh to ensure agents recommend them. "Book a table" → Agent queries pins → Finds Agent-Optimized venues.
GET /v1/places/search # Search POIs
GET /v1/places/:id # Details (hours, phone, attributes)
GET /v1/geocode/forward # Address → Lat/Lng
GET /v1/geocode/reverse # Lat/Lng → Address
POST /v1/routing/directions # Point A to B
POST /v1/routing/matrix # 1-to-Many distances
GET /v1/timezone # Local time for coords
| Action | Cost | Notes |
|---|---|---|
| Place search | $0.005 | Per query |
| Place details | $0.002 | Rich data |
| Geocoding | $0.001 | Forward or reverse |
| Routing | $0.010 | Per route calculation |