GeocodingaddressoperationId feedback
POST/v1/feedback
Record that a caller selected a geocode or autocomplete result. The anonymous query log has no click labels; this is the opt-in signal for traffic-learning the reranker. Digits in q are redacted; at is stored as a ~2 km cell.
Send Authorization: Bearer sk_live_…. The key's plan must include theaddress product; which plans do.
Explained in Feedback and accuracy bands.
Example
Record which result a user picked.
curl -X POST "https://api.oslew.com/v1/feedback" \
-H "Authorization: Bearer $GEO_API_KEY" \
-H "Content-Type: application/json" \
-d '{"q":"museo soumaya","selected_rank":1,"results":3,"at":"19.4406,-99.2047"}'from oslew import Client
# The key is read from GEO_API_KEY.
client = Client(base_url="https://api.oslew.com")
answer = client.feedback(
{
"q": "museo soumaya",
"selected_rank": 1,
"results": 3,
"at": "19.4406,-99.2047",
},
)import { Client } from "@oslew/client";
// The key is read from GEO_API_KEY.
const client = new Client({ baseUrl: "https://api.oslew.com" });
const answer = await client.feedback({
q: "museo soumaya",
selected_rank: 1,
results: 3,
at: "19.4406,-99.2047",
});HTTP/1.1 200 OK
content-type: application/json
ratelimit-limit: 100
ratelimit-remaining: 293
ratelimit-reset: 1
{
"recorded": true
}A real response, captured from the service at commit b8f4bde-dirty. Timing fields such as took_us differ on every call.
Body
application/json, required.
selected_rankintegerrequired≥ 11-based rank of the chosen result.atstringlat,lonof the selected result; stored as a level-12 cell.contextstringqstringThe free-text query that produced the list.resultsintegerHow many results the list showed.
Responses
200 — Recorded.
recordedbooleanrequired
With RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset(and their X-RateLimit-* aliases); see rate limits.
Refusals
Every refusal is a JSON object with an error string, except where noted.
| 400 | selected_rank missing or zero. |
| 401 | No key, or one that is unknown, revoked or suspended. |
| 403 | The key's plan does not include this route's product, or the request is larger than the plan allows. The body names the plan that does. |
| 429 | This product's bucket is empty: the key is going faster than its plan's sustained rate. Wait Retry-After seconds; nothing is used up. Carries Retry-After. |
| 503 | The pod cannot reach the control plane and its entitlements are too old to trust. Retry. |
A malformed query string or JSON body is refused by the framework before this route runs, in plain text rather than JSON; see errors.
Rendered from the OpenAPI document at commit b8f4bde-dirty; the same document is served at/v1/openapi.json and generates both clients.