Scan your whole stack
From OX Research Newsroom
Are you using osmfeatures?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v1.2.1
osmfeatures was last scanned on 29 Nov 2026 at version 1.2.1. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 1.2.1 LATEST | 29 Nov 2026 | No rules fired |
| 1.2.0 | 19 Nov 2026 | No rules fired |
| 1.1.0 | 5 Nov 2026 | No rules fired |
| 1.0.2 | 24 Oct 2026 | Not shown |
| 1.0.1 | 15 Oct 2026 | Not shown |
Findings for v1.2.1. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 1.2.1; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Official Python client for the MapLark OSM Features API with GeoJSON, FlatGeobuf, GeoParquet, CSV formats. Hosted OSM APIs as a Service for using OSM in applications at scale.
Query OpenStreetMap features such as buildings, streets, and Points of Interest easily. Search for OSM features by bounding box, tags, and geometry shape and get GeoJSON back within less than 250ms (dependent on query size). No converting between formats manually. The API keeps OpenStreetMap semantics intact, like tags and ways, and returns GeoJSON Features you can feed straight into Leaflet, MapLibre, OpenLayers, or any geospatial toolchain. It is backed by postgis with tiered API keys and rate limiting to keep noisy neighbours out to give you predictable latency for real traffic.
The postgis translation layer is very simple:
node - Pointway - LineString or Polygonrelation - MultiPolygon or grouped geometriesYou filter with the same tags mappers already use (amenity=cafe, building=yes, and so on). Knowledge from OSM, Overpass, and tagging docs transfers immediately.
To narrow down between "open ways" and "closed ways", use the way_shape parameter:
way_shape=line - open ways (roads, paths, rivers) or line-shaped relations (routes, boundaries)way_shape=polygon - closed ways (buildings, parks) or multipolygon relations.way_shape=all - both shapes (default when way_shape is omitted).For example, to get all buildings in an area:
type=way & tags=building
This is the equivalent of the Overpass query way[building].
Read the full API reference here https://maplark.com/developer.
This client library comes with complete-tile queries, optional bbox tiling, retry/backoff, pandas/geopandas output, async support, convenience methods for common OSM layers (buildings, amenities, bike roads, and so on), an MCP server (stdio or Streamable HTTP) for Claude / Cursor / Custom agents, and places/routes methods for opening hours and walk/bike routing.
pip install osmfeatures
pip install "osmfeatures[geo]" # pandas / geopandas / shapely support
pip install "osmfeatures[mcp]" # MCP server for Claude / Cursor (stdio or HTTP)
Official client for the MapLark OSM Features API (GeoJSON, FlatGeobuf, GeoParquet, CSV).
The SDK talks to api.maplark.com by default.
from osmfeatures import OSMFeaturesClient
with OSMFeaturesClient(api_key="sk-...") as client:
fc = client.query(bbox="18.06,59.32,18.09,59.34", tags=["building"])
print(len(fc.features), "buildings found")
from osmfeatures import OSMFeaturesClient
client = OSMFeaturesClient(api_key="sk-...")
You can use the client directly and close it when done, or use a context manager:
from osmfeatures import OSMFeaturesClient
with OSMFeaturesClient(api_key="sk-...") as client:
...
query() calls GET /v3/osm_features and returns the whole tile. Omit limit for the API default. Paid keys may raise limit up to their max_limit. A larger match set is truncated (X-Has-More: true). Pass auto_split=True to read the key's max_limit from GET /v1/account/tier, count first with a scalar GET /v2/osm_features/count (no group_by), and jump to a power-of-2 tile grid when the match set exceeds that cap (one extra jump if a leftover leaf is still dense). That adds latency. Pass bbox_tiles=2 (or 4, 8, ...) to split the bbox up front. query() does not take cursor.
fc = client.query(
bbox="18.063,59.322,18.082,59.332",
type="way",
way_shape="line",
tags=["highway=cycleway"],
)
Common filters:
bbox="min_lon,min_lat,max_lon,max_lat"location="lat,lng" with radius in metreswithin="relation/155790" or within="way/123" (ST_Covers, including the boundary; not with bbox / radius / osm_ids)tags=["amenity=restaurant"] or tags=["ele>500"] (list items AND together, sent as one tags=a,b value; > is URL-encoded by the client)tags=["bicycle=yes|bicycle=designated"] (OR inside one item)tags=["amenity=cafe|amenity=bar", "wheelchair=yes"] (AND of ORs)tags=["a|(b,c)"] (OR of ANDs: parentheses group one operator)tags=["!access=private"] (exclude)| or &: tags=['name="Ben & Jerry\'s"']. Unquoted & is not AND.type="node" | "way" | "relation"way_shape="polygon" | "line" | "all" (omit = both shapes; all also means both)clip_geometry=True | False (omit for the API default; set False to keep full geometry outside bbox)node_ids=False drops way properties.node_ids, the ordered OSM node IDs (on by default; a closed way repeats the first ID). Smaller responses cost fewer creditsmembers=False drops relation properties.members, the ordered OSM members as {type, ref, role} (on by default, like Overpass out body)bbox_tiles=2 (power of 2) to split a bbox that exceeds your tier area capauto_split=True to split and fetch directly (auto_split_skip_count=False to count first, then fetch; reads max_limit from GET /v1/account/tier, cached on the client; jumps to a power-of-2 grid when the match set exceeds that cap; one extra jump if a leftover leaf is still dense; a lower limit truncates; jumps when a 400 names a bbox-area cap). Caps at 16 tiles (OSMFeaturesTooManyTilesError if covering the bbox needs more, OSMFeaturesTooDenseError if a tile still overflows). OSMFeaturesTimeoutError is only a real wall-clock miss.accept="text/csv" / "application/flatgeobuf" / "application/vnd.apache.parquet" (returns BinaryQueryResult)Use this to query a larger bbox than what is allowed by splitting the bbox up into multiple tiles and requests.
all_restaurants = client.query(
bbox="18.063,59.322,18.082,59.332",
tags="amenity=restaurant",
auto_split=True,
)
Analyze feature counts with a histogram over a very large area - city and country sized bounding boxes allowed. For example, you can find out how many cafes, bars, and restaurants are in different cities or countries.
client.count calls GET /v2/osm_features/count. Omit group_by for a scalar total. Example amenity histogram:
client.count(
group_by="amenity",
bbox="18.05,59.32,18.10,59.34",
type="node",
tags=["amenity"],
)
# {"groups": [{"value": "restaurant", "count": 184}, {"value": "cafe", "count": 91},
# {"value": "bar", "count": 47}], "total": 412, "truncated": False}
client.density calls GET /v2/osm_features/density. Occupied grid bins come back as a GeoJSON FeatureCollection of points with properties.count, plus total and truncated. These are not OSM features (no osm_id or tags). Omit cell_deg for 0.1. type omitted is nodes. A positive tags filter is required (tags=["place"] or tags=["a|b"]). limit is the max occupied cells (the key's max_limit when omitted).
A Europe box (-26,33,52,72, about 3042 deg²) fits the density area cap (4000 deg²) and the 80° span. It is above max_units_per_request on every non-enterprise tier, so pass disable_budget_warning=True to run it. The same box still 400s on count (area cap 400 deg²). A unit-cap 400 on count can use that flag the same way. A bbox-area 400 cannot.
client.density(
bbox="-26,33,52,72",
tags=["place"],
cell_deg=0.1,
disable_budget_warning=True,
)
CLI: osmfeatures density --bbox -26,33,52,72 --tags place --cell-deg 0.1 --disable-budget-warning.
Async methods mirror the sync API (query_async, query_all_async):
import asyncio
from osmfeatures import AsyncOSMFeaturesClient
async def main() -> None:
async with AsyncOSMFeaturesClient(api_key="sk-...") as client:
fc = await client.query_async(
bbox="18.06,59.32,18.09,59.34",
tags=["building"],
)
print(len(fc.features))
asyncio.run(main())
For common datasets, use convenience methods. They call query_all() today:
from osmfeatures import OSMFeaturesClient, get_buildings, get_restaurants
with OSMFeaturesClient(api_key="sk-...") as client:
buildings = get_buildings(client, bbox="18.063,59.322,18.082,59.332")
restaurants = get_restaurants(client, bbox="18.063,59.322,18.082,59.332")
print(len(buildings.features), len(restaurants.features))
usage = client.usage()
print("Usage:", usage)
Add real geospatial intelligence to your Artificial Intelligence agents. Use Maplark in Claude Code or build new custom agentic apps.
The Maplark MCP Server is the agent surface. Your LLM is the planner: it chooses OSM tags, a bbox or location+radius, a time, a travel mode, and the next tool. The tools compute metres, ranks, opening-hours status, and walk/bike paths. You do not compute haversine, parse opening_hours strings, or invent coordinates.
Results come back as summaries (ids, names, OSM tags, lon/lat scalars, distance_m, openNow) plus a collection_id. They never include GeoJSON coordinate arrays. Call preview_map(collection_id) to draw: a page loads OpenFreeMap in MapLibre and fetches GeoJSON from the preview URL, so coordinates never enter the model. Call export_geojson only when the user asked for a raw file: stdio writes a path, HTTP returns a download URL, never coordinates.
places_search, places_nearby, places_detailsgeocode, geocode_reverse, geocode_status (GET /geocode/nominatim/{search,reverse,status})usage (GET /v1/usage: credits left, reset time, upgrade_urls for the user to pay; agents cannot buy a plan)routes_isochrone, routes_path, routes_optimized_pathquery, count (histogram / total), density (grid bins; preview_map the id)nearest_within, pairs_within, filter_open, point_in_polygon, points_in_polygonpreview_map, export_geojsonpip install "osmfeatures[mcp]"
export MAPLARK_API_KEY="sk-..."
osmfeatures mcp
MapLark serves Streamable HTTP at https://api.maplark.com/mcp. Pass your API key per request. Do not put a process-level key on the server.
{
"mcpServers": {
"maplark": {
"url": "https://api.maplark.com/mcp",
"headers": { "Authorization": "Bearer YOUR_KEY" }
}
}
}
Self-host the same transport:
osmfeatures mcp --http --host 127.0.0.1 --port 8081
preview_map returns a public URL (/mcp/preview/...). Anyone with the link can open the map until the MCP session goes idle (1 hour, refreshed while the map is used). No API key is required to view it.
First install uv for one-click server start.
{
"mcpServers": {
"maplark": {
"command": "uvx",
"args": ["--from", "osmfeatures[mcp]", "osmfeatures", "mcp"],
"env": { "MAPLARK_API_KEY": "sk-..." }
}
}
}
Planner rules: you pick tags, bbox or location+radius, budgets, openNow/asOf, and the next tool. Code computes metres, ranks, network paths, and opening-hours status.
| Prompt | MCP tools |
|---|---|
| "Top pubs in Stockholm open after 6pm" | geocode, places_search with as_of, filter_open, preview_map |
| "Laptop friendly cafes in Berlin open at 9am" | places_nearby or places_search with bbox and openNow=true |
| "Open restaurants within 150 m of T-Centralen in Stockholm" | two places_search, then nearest_within |
| "Vegan restaurants open after 6pm on a walk from T Centralen to Sodermalm in Stockholm" | geocode, routes_path, places_search, filter_open, nearest_within, preview_map |
| "Top clubs open late in Toronto, Canada" | places_search with as_of, then filter_open |
| "Open cafes within a 10-minute bike ride" | routes_isochrone + places_search in a covering radius + points_in_polygon |
| "Cafes on a tour of Gamla Stan" | places_search, filter_open + routes_optimized_path (loop=true) |
| "Suggest a walk to a bar, a restaurant, and a cafe, no particular order" | routes_optimized_path with loop=false |
| "Is the office a 20-minute walk from the apartment?" | routes_isochrone from A, point_in_polygon for B |
| "Amenity heatmap for Sweden" | geocode (bbox), density (amenity; disable_budget_warning if the unit cap 400s), preview_map |
| "Show this on a map" | preview_map(collection_id) after a search or route |
The same operations exist on OSMFeaturesClient when you are not going through an LLM (see Places and routes).
query() is the generic OSM layer: buildings, roads, park polygons, any tag and geometry shape. Places and routes are the place and mobility layer on top of the same data. You pick OSM tags, an area, a time, and a travel mode. The API returns coordinates, opening-hours status, straight-line ranks, and walk/bike geometry. You do not compute metres or parse opening_hours strings yourself.
These are the same operations as the MCP tools; call them on OSMFeaturesClient when you are not going through an LLM.
Runnable Python chains live in tests/example_apps/test_geo_agent.py. Full HTTP reference: https://maplark.com/developer.
Nominatim search, reverse, and status. Nominatim's boundingbox ([south, north, west, east]) is remapped to MapLark west,south,east,north for places_search and query. MCP tools return the same objects.
geocode() is the top search hit (GET /geocode/nominatim/search with format=json and limit=1):
found = client.geocode("Södermalm, Stockholm")
bbox = found["place"]["bbox"]
# {"status": "ok", "place": {label, lon, lat, bbox, osm_type, osm_id}}
# or {"status": "no_results", "reason": ..., "place": None}
geocode_reverse(lat, lon) is the place at a point (GET /geocode/nominatim/reverse with format=json). Optional zoom is Nominatim detail 0..18 (API default 18). Same {status, place} shape; no hit is no_results.
at = client.geocode_reverse(59.325, 18.071)
print(at["place"]["label"], at["place"]["bbox"]) Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.