{"uid":"cap_BTPoCksEW13VaQPVt3JMT","slug":"s2-cell-token-generator-f9849166","name":"S2 Cell Token Generator","description":"Creates an S2 cell token from a coordinate and level using the S2 geometry library. Missing facts are returned as null and named in unavailable_fields where applicable. Derived values disclose their method; source-backed values disclose source, time window and age. ","url":"https://geo.halowerk.com/v1/s2-cell","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"lat":{"type":"number","maximum":90,"minimum":-90,"description":""},"lon":{"type":"number","maximum":180,"minimum":-180,"description":""},"level":{"type":"integer","maximum":30,"minimum":0,"description":""}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_rLxhbDGh3Rb6b8sj_-rrs","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Converts a geographic coordinate (lat/lon) and S2 level to an S2 cell token using the S2 geometry library","exampleAgentPrompt":"Convert the coordinates 37.7749, -122.4194 to an S2 cell token at level 13.","exampleUseCases":[{"title":"Ride-sharing spatial partitioning","prompt":"I need to index pickup location 40.7128, -74.0060 as an S2 cell at level 15 so I can bucket nearby drivers efficiently."},{"title":"Geofence membership testing","prompt":"Can you get the S2 cell token for latitude 51.5074, longitude -0.1278 at level 12? I want to check which S2-indexed geofences that point falls into."},{"title":"Map tile spatial indexing","prompt":"Give me the S2 cell token for the coordinate 35.6895, 139.6917 at S2 level 10 — I'm building a spatial index for map tiles in Tokyo."}],"resultDescription":"Returns the S2 cell token string for the specified coordinate and level, along with any derived metadata and disclosure of computation method. Unavailable fields are returned as null and listed in unavailable_fields.","failureModes":["Latitude out of range [-90, 90] returns validation error","Longitude out of range [-180, 180] returns validation error","Level out of range [0, 30] returns validation error","Missing required fields (lat, lon, level) returns error","Payment failure (x402) blocks request"],"whenToPreferThis":"Choose this endpoint when you need S2 cell tokens specifically — useful for spatial indexing systems, geofence lookup, proximity matching, or any application built on Google's S2 geometry library. Prefer over H3 or geohash endpoints when your downstream system uses S2 cell IDs for spatial partitioning.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T06:50:05.648Z","isFirstParty":false}