{
    "openapi": "3.1.0",
    "info": {
        "title": "Maps API",
        "version": "v1",
        "description": "Address search, geocoding and route calculation through one interface."
    },
    "servers": [
        {
            "url": "https://api.flowdata.one/v1",
            "description": "FlowData API"
        }
    ],
    "security": [
        {
            "bearerAuth": []
        }
    ],
    "tags": [
        {
            "name": "search",
            "description": "Location search"
        },
        {
            "name": "geocoding",
            "description": "Geocoding"
        },
        {
            "name": "routing",
            "description": "Directions"
        }
    ],
    "paths": {
        "/maps/search": {
            "get": {
                "operationId": "maps-search",
                "summary": "Search addresses and places",
                "description": "Searches for addresses and places. An existing result is served from our own database without asking a map service. A search without results is not billed.",
                "tags": [
                    "search"
                ],
                "parameters": [
                    {
                        "name": "q",
                        "in": "query",
                        "required": true,
                        "description": "Search term, up to 256 characters",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "limit",
                        "in": "query",
                        "required": false,
                        "description": "Number of results, 1 to 10, default 10",
                        "schema": {
                            "type": "integer"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Country filter, ISO 3166-1 alpha-2, for example DE",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "required": false,
                        "description": "Language of the results, default de",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "proximity",
                        "in": "query",
                        "required": false,
                        "description": "Preferred location as lng,lat",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "types",
                        "in": "query",
                        "required": false,
                        "description": "Result types; the request then goes directly to Mapbox",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "addresses": [
                                        {
                                            "full_address": "Berlin, Deutschland",
                                            "lat": 52.5200066,
                                            "lng": 13.404954,
                                            "place_name": "Berlin",
                                            "postcode_name": "10115",
                                            "country_name": "Deutschland",
                                            "country_code": "DE"
                                        }
                                    ],
                                    "attribution": "NOTICE: © 2026 FlowSuite and its suppliers. All rights reserved. Use of this data is subject to the Terms of Service (https://creativeskyline.de/agb). This response and the information it contains may not be retained."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/maps/geocode": {
            "get": {
                "operationId": "maps-geocode",
                "summary": "Resolve an address or coordinates",
                "description": "Turns an address into coordinates and full address data, or coordinates back into an address. Only a successful response is billed; 404 without a result is free.",
                "tags": [
                    "geocoding"
                ],
                "parameters": [
                    {
                        "name": "address",
                        "in": "query",
                        "required": false,
                        "description": "Address for the forward lookup",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "lng",
                        "in": "query",
                        "required": false,
                        "description": "Longitude for the reverse lookup, together with lat",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "lat",
                        "in": "query",
                        "required": false,
                        "description": "Latitude for the reverse lookup, together with lng",
                        "schema": {
                            "type": "number"
                        }
                    },
                    {
                        "name": "country",
                        "in": "query",
                        "required": false,
                        "description": "Country filter, ISO 3166-1 alpha-2",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "required": false,
                        "description": "Language of the results, default de",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "address": {
                                        "full_address": "Friedrichstraße 43, 10117 Berlin, Deutschland",
                                        "lat": 52.5094,
                                        "lng": 13.3889,
                                        "place_name": "Berlin",
                                        "postcode_name": "10117",
                                        "country_name": "Deutschland",
                                        "country_code": "DE"
                                    },
                                    "attribution": "NOTICE: © 2026 FlowSuite and its suppliers. All rights reserved. Use of this data is subject to the Terms of Service (https://creativeskyline.de/agb). This response and the information it contains may not be retained."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/maps/directions": {
            "get": {
                "operationId": "maps-directions",
                "summary": "Calculate a route",
                "description": "Calculates a route between two or more points, with distance, duration and geometry. Only a successful response is billed; 404 without a route is free.",
                "tags": [
                    "routing"
                ],
                "parameters": [
                    {
                        "name": "origin",
                        "in": "query",
                        "required": true,
                        "description": "Start point as lng,lat, for example 13.4050,52.5200",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "destination",
                        "in": "query",
                        "required": true,
                        "description": "Destination as lng,lat",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "profile",
                        "in": "query",
                        "required": false,
                        "description": "driving, driving-traffic, walking or cycling, default driving-traffic",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "waypoints",
                        "in": "query",
                        "required": false,
                        "description": "Waypoints as lng,lat, separated by |",
                        "schema": {
                            "type": "string"
                        }
                    },
                    {
                        "name": "language",
                        "in": "query",
                        "required": false,
                        "description": "Language of the instructions, default de",
                        "schema": {
                            "type": "string"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object"
                                },
                                "example": {
                                    "success": true,
                                    "routes": [
                                        {
                                            "distance": 3120.4,
                                            "duration": 540.2,
                                            "legs": [
                                                {
                                                    "distance": 3120.4,
                                                    "duration": 540.2
                                                }
                                            ]
                                        }
                                    ],
                                    "attribution": "NOTICE: © 2026 FlowSuite and its suppliers. All rights reserved. Use of this data is subject to the Terms of Service (https://creativeskyline.de/agb). This response and the information it contains may not be retained."
                                }
                            }
                        }
                    },
                    "default": {
                        "description": "Error response",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Error"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "securitySchemes": {
            "bearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "description": "FlowData key as Authorization: Bearer fd_…"
            }
        },
        "schemas": {
            "Error": {
                "type": "object",
                "required": [
                    "error"
                ],
                "properties": {
                    "error": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "message": {
                                "type": "string"
                            },
                            "type": {
                                "type": "string"
                            },
                            "details": {
                                "type": "object"
                            }
                        }
                    }
                }
            }
        }
    }
}