@lap v0.3
# Machine-readable API spec. Each @endpoint block is one API call.
@api IdealSpot GeoData
@base https://idealspot-geodata.p.rapidapi.com/api/v1
@version 1.0
@auth ApiKey X-RapidAPI-Key in header
@common_fields {X-RapidAPI-Key: any # (Required) Rapid API Key. See https://rapidapi.com/idealspot-inc-idealspot-inc-default/api/idealspot-geodata, X-RapidAPI-Host: any}
@endpoints 7
@toc data(3), geometries(2), traffic(2)

@group data
@endpoint GET /data/insights
@desc Fetch Available Insights
@returns(200)

@endpoint GET /data/insights/{insight_id:}
@desc Fetch Insight Query Parameters
@required {insight_id:: any # Insight ID. See developer documentation for full list.}
@returns(200)

@endpoint GET /data/insights/{insight_id:}/query
@desc Query Insight at Location
@required {version: any # (Required) Insight version. Insight versions are incremented when a response format changes in any way, including the addition of new groups. Old versions are retained, unmodified, for backwards compatibility., location[]: any # (Required) Represents a buffer, region, or custom polygon specification. Accepts the `Location` model (as a `Buffer`, `Region`, or `Custom Polygon`) formatted as a JSON string. Multiple `location` query parameters are allowed. NOTE: When requesting multiple locations, you must include brackets(i.e. `?location[]=...&location[]=...`). If not included, only the last location will be used. For more detail, see https://idealspot.gitlab.io/developer-docs/#location, insight_id:: any # Insight ID. See https://developer.idealspot.com/data for full list.}
@returns(200)

@endgroup

@group geometries
@endpoint GET /geometries/regions/intersecting/{latitude}/{longitude}
@desc Fetch Administrative Regions using Lat/Lng
@required {latitude: any # (Required) Search coordinate latitude, longitude: any # (Required) Search coordinate longitude}
@returns(200)

@endpoint GET /geometries/geometry
@desc Fetch Geometries
@required {location[]: any # (Required) Represents a buffer, region, or custom polygon specification. Accepts the `Location` model (as a `Buffer`, `Region`, or `Custom Polygon`) formatted as a JSON string. Multiple `location` query parameters are allowed. NOTE: When requesting multiple locations, you must include brackets(i.e. `?location[]=...&location[]=...`). If not included, only the last location will be used.}
@returns(200)

@endgroup

@group traffic
@endpoint GET /traffic/roads/nearest/{latitude}/{longitude}
@desc Fetch Nearest Road Segments
@required {n: any # Number of road segments to return (between 1 and 20), latitude: any # (Required) Search coordinate latitude, longitude: any # (Required) Search coordinate longitude}
@returns(200)

@endpoint GET /traffic/counts/{segment_id}
@desc Vehicle Traffic Counts for Road Segment
@required {segment_id: any # (Required) Road segment ID. Fetched from Search Road Segments}
@returns(200)

@endgroup

@end
