ubahnverleih / WoBike

Documentation of Bike Sharing APIs 🚴🛴🛵
952 stars 131 forks source link

Lime API does not return bike_clusters anymore (and now always returns null or 50 vehicles) #202

Open hb0 opened 3 years ago

hb0 commented 3 years ago

When I tested the API in February, 2021 The API behaved this way:

How when I send the same requests:

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.

W1MMER commented 3 years ago

Yeah, they've done some changes. They've slightly updated the endpoints which I'll send later.

hb0 commented 3 years ago

Cool.

So far it feels like the following parameters don't matter for the vehicle-search:

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).

hb0 commented 3 years ago

@W1MMER you mentions some changes to the endpoints, I'm wondering what exactly you meant there.

W1MMER commented 3 years ago

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.

W1MMER commented 3 years ago

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.

matt-wirtz commented 2 years ago

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.

hb0 commented 2 years ago

I didn't find anything in this direction. I just made multiple requests:

Just make sure you don't send too many requests, or else your IP is restricted (not your token)

W1MMER commented 2 years ago

@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.

image

jhZzz021 commented 1 year ago

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?

ducknoir commented 1 year ago

@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.