{"openapi":"3.1.0","info":{"title":"Monarcha GIS API","description":"Standalone API for geocoding and OpenStreetMap queries","version":"1.0.0"},"paths":{"/health":{"get":{"summary":"Health Check","description":"Health check endpoint","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/geocode":{"post":{"summary":"Geocode Endpoint","description":"Intelligently geocode a location query and return appropriate GeoJSON:\n- Administrative boundaries (Polygons) for regions, cities, countries\n- Point features for specific addresses, landmarks, buildings\n\nExamples:\n- \"San Francisco, CA\" -> Boundary polygon of the city\n- \"560 20th Street San Francisco, CA\" -> Point at the address\n- \"Empire State Building, NYC\" -> Point at the building\n- \"France\" -> Boundary polygon of the country","operationId":"geocode_endpoint_api_geocode_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeocodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/osm":{"post":{"summary":"Osm Query Endpoint","description":"Query OpenStreetMap data using natural language and return GeoJSON features.\n\nExamples:\n- \"All buildings in Mercer Island, WA\" -> FeatureCollection of building polygons\n- \"Parks in Berlin, Germany\" -> FeatureCollection of park polygons\n- \"Restaurants in San Francisco\" -> FeatureCollection of restaurant points","operationId":"osm_query_endpoint_api_osm_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OSMRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/nl-geocode-advanced":{"post":{"summary":"Advanced Nl Geocode Endpoint","description":"🚀 ADVANCED Natural Language Geocoding with comprehensive spatial operations.\n\nThis endpoint uses a hybrid approach combining:\n- Nominatim for place lookup (5M+ places from Who's On First)\n- Natural Earth for high-quality continent boundaries\n- Spatial operations library for complex geometric operations\n- Claude Sonnet 4 for natural language understanding\n\nSupported spatial operations:\n- **Buffer**: \"within 50km of Paris\"\n- **Union**: \"California and Nevada\"\n- **Intersection**: \"in New Mexico, west of Albuquerque\"\n- **Difference**: \"France except Paris\"\n- **Directional**: \"north of Seattle\", \"west of London\"\n- **CoastOf**: \"coast of California\"\n- **BorderBetween**: \"border between USA and Mexico\"\n- **Between**: \"between Baltimore and Washington DC\"\n- **OffTheCoastOf**: \"50 nautical miles off the coast of Florida\"\n\nReturns:\n    GeoJSON with complex geometries","operationId":"advanced_nl_geocode_endpoint_api_nl_geocode_advanced_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NLGeocodeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/country-border":{"post":{"summary":"Country Border Endpoint","description":"Get country border GeoJSON using vector search and S3.\n\nThis endpoint uses vector search to map natural language queries like\n\"border of France\" to country names, then fetches the GeoJSON from S3.\n\nExamples:\n- \"border of France\" -> Returns France border GeoJSON\n- \"France border\" -> Returns France border GeoJSON\n- \"German border\" -> Returns Germany border GeoJSON","operationId":"country_border_endpoint_api_country_border_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CountryBorderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/ocean-border":{"post":{"summary":"Ocean Border Endpoint","description":"Get ocean/sea border GeoJSON using vector search and S3.\n\nThis endpoint uses vector search to map natural language queries like\n\"border of Pacific Ocean\" to ocean/sea names, then fetches the GeoJSON from S3.\n\nExamples:\n- \"border of Pacific Ocean\" -> Returns Pacific Ocean border GeoJSON\n- \"Mediterranean Sea border\" -> Returns Mediterranean Sea border GeoJSON\n- \"Caribbean Sea\" -> Returns Caribbean Sea border GeoJSON","operationId":"ocean_border_endpoint_api_ocean_border_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OceanBorderRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/api/water-feature":{"post":{"summary":"Water Feature Endpoint","description":"Get water feature (lake, river, or ocean) GeoJSON using vector search and S3.\n\nThis endpoint uses vector search to map natural language queries to water feature names,\nthen fetches the GeoJSON from S3.\n\nExamples:\n- \"Lake Tahoe\" -> Returns Lake Tahoe GeoJSON\n- \"Amazon River\" -> Returns Amazon River GeoJSON\n- \"Pacific Ocean\" -> Returns Pacific Ocean border GeoJSON\n- With filter: {\"query\": \"Superior\", \"feature_type\": \"lake\"} -> Returns Lake Superior only","operationId":"water_feature_endpoint_api_water_feature_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaterFeatureRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"HTTPBearer":[]}]}},"/":{"get":{"summary":"Root","description":"Root endpoint with API information","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"APIResponse":{"properties":{"status":{"type":"string","title":"Status"},"data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"timestamp":{"type":"string","title":"Timestamp"}},"type":"object","required":["status"],"title":"APIResponse"},"CountryBorderRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language query for country border (e.g., 'border of France', 'France border')"}},"type":"object","required":["query"],"title":"CountryBorderRequest"},"GeocodeRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language location query (e.g., 'Empire State Building, NYC')"}},"type":"object","required":["query"],"title":"GeocodeRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"NLGeocodeRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Complex natural language spatial query (e.g., 'within 50km of Paris', 'France except Paris')"}},"type":"object","required":["query"],"title":"NLGeocodeRequest"},"OSMRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language OSM query (e.g., 'All buildings in Mercer Island, WA')"}},"type":"object","required":["query"],"title":"OSMRequest"},"OceanBorderRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language query for ocean/sea border (e.g., 'border of Pacific Ocean', 'Mediterranean Sea border')"}},"type":"object","required":["query"],"title":"OceanBorderRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WaterFeatureRequest":{"properties":{"query":{"type":"string","title":"Query","description":"Natural language query for a water feature (e.g., 'Lake Tahoe', 'Amazon River', 'Pacific Ocean')"},"feature_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feature Type","description":"Optional filter for feature type: 'lake', 'river', or 'ocean'"}},"type":"object","required":["query"],"title":"WaterFeatureRequest"}},"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}}}}