{"uid":"cap_blceEiedOPO1JJAndta8_","slug":"fittings-nearest-point-90a8c498","name":"fittings Nearest Point","description":"The closest candidate coordinate to a query point, with great-circle distance and initial bearing.","url":"https://fittings.sh/v1/spatial/nearest-point","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"point":{"type":"object","description":"{lat, lon} or GeoJSON [longitude, latitude]"},"candidates":{"type":"array","description":"Up to 5000 points, each {lat, lon, id?} or [longitude, latitude]"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__lFudPBYYaX53Pt_Rmsyv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Finds the closest candidate coordinate to a query point, returning great-circle distance and initial bearing.","exampleAgentPrompt":"From this list of warehouse coordinates, which one is closest to the point at latitude 40.7128, longitude -74.0060? Give me the distance and the direction I'd head from there.","exampleUseCases":[{"title":"Nearest store locator for e-commerce","prompt":"I have a list of our 300 store locations and a customer at latitude 51.5074, longitude -0.1278 — which store is geographically closest to them, and how far away is it?"},{"title":"Last-mile delivery depot assignment","prompt":"Given these 80 depot coordinates, which one is nearest to the delivery address at lat 48.8566, lon 2.3522? I also need the bearing so the driver knows which direction to head."},{"title":"Emergency responder proximity routing","prompt":"We have 50 available ambulances at different positions right now — which one is physically closest to the incident at latitude 37.7749, longitude -122.4194?"}],"resultDescription":"Returns the single closest candidate point from the provided list, along with the great-circle distance in meters and the initial bearing in degrees from the query point to that candidate. If the candidate had an ID, that is included in the response.","failureModes":["Empty candidates array returns an error or empty result","Malformed coordinate objects (missing lat or lon) cause validation errors","Exceeding the 5000-candidate limit may return a 400 error","Invalid GeoJSON format (e.g. lat/lon swapped) produces incorrect results silently","Network timeout if payload is very large"],"whenToPreferThis":"Use this endpoint when you need to identify the single nearest coordinate from a set of up to 5000 candidates to a given query point, getting both distance and bearing in one call. It is ideal for logistics, store-finder, fleet dispatch, or any proximity-matching workflow where you already have a list of candidate locations. Prefer this over computing pairwise distances yourself or using a full routing engine when straight-line (great-circle) distance is sufficient and you don't need road-network routing.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T00:47:06.199Z","isFirstParty":false}