WoBike
WoBike copied to clipboard
Lime API does not return bike_clusters anymore (and now always returns null or 50 vehicles)
When I tested the API in February, 2021 The API behaved this way:
-
vehicles
request with zoom 16 => returns 50bike
entries andbike_clusters: null
-
vehicles
request with zoom 14 => returnsbike: null
andbike_clusters
with entries like 0, 4, 5, 50, 100
How when I send the same requests:
-
vehicles
request with zoom 15++ => returns always 50 vehicles, never less then 50 (thus, it ignores the bounding box which is a known behavior) -
vehicles
request with zoom 14-- => returns bothbike: null
andbike_clusters: null
and says in theattributes.title: "No nearby vehicles"
as error.
Example request:
https://web-production.lime.bike/api/rider/v1/views/map?ne_lat=52.6&ne_lng=13.5&sw_lat=52.4&sw_lng=13.3&user_latitude=52.5311&user_longitude=13.3849&zoom=16
Is the error on my side or did the API behavior change?
This way it's way harder to "scrawl" a city for all it's vehicles to get an overview.
Yeah, they've done some changes. They've slightly updated the endpoints which I'll send later.
Cool.
So far it feels like the following parameters don't matter for the vehicle-search:
- User Location
- Size of the Bounding Box
- Zoom Level
I only get different data if I "move" the bounding Box, and, thus, the center of the BB.
I.e. the API just seems to return 50 (closest?) vehicles around the Bounding Box Center (bb-size does not matter).
@W1MMER you mentions some changes to the endpoints, I'm wondering what exactly you meant there.
Oh I'm so sorry! I completely forgot about this. It was mostly the parameters from what I can remember. The old fetch bikes endpoint still works fine though.
This:
Base URL: https://web-production.lime.bike/api/rider/v1/views/map
Parameters:
Parameters | Descriptions | Mandatory |
---|---|---|
accuracy | this: 154.2512554138973 |
X |
ne_lat | north east lat | X |
ne_lng | north east lng | X |
sw_lat | south west lat | X |
sw_lng | south west lng | X |
user_gps_time | like this: 2021-02-24%2018%3A19%3A44%20NZDT |
X |
user_latitude | user lat | X |
user_longitude | user lng | X |
zoom | random integer | X |
Nothing major.
I do get only 50 vehicles in the response too.
Was anyone able to circumvent this restriction? Is there a limit parameter available to override the default value of 50.
I didn't find anything in this direction. I just made multiple requests:
- starting with my whole area of interest
- if new vehicles / positions are found, I slice the area of interest in half (horizontal, next time vertical, etc.)
- repeat, until there is nothing new.
Just make sure you don't send too many requests, or else your IP is restricted (not your token)
@matt-wirtz they've switched endpoints. The new one seems to be able to load more bikes but doesn't give out as much info about the bike itself.
https://web-production.lime.bike/api/rider/v2/map/bike_pins with the same params as before.
Hello, I can only get 50 records through this URL(https://web-production.lime.bike/api/rider/v1/views/map). And get 200 records without time information through this URL (https://web-production.lime.bike/api/rider/v2/map/bike_pins ). Was anyone able to circumvent this restriction?
@W1MMER New here, just starting to poke around with these APIs. Can I ask, how are you learning about updates to the Lime API (e.g. the new bikepins endpoint)? Do you have access to documentation somewhere? Sniffing traffic? I'm wanting to understand how how people figure these things out. Thanks.