WoBike icon indicating copy to clipboard operation
WoBike copied to clipboard

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

Open hb0 opened this issue 3 years ago • 10 comments

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

  • vehicles request with zoom 16 => returns 50 bike entries and bike_clusters: null
  • vehicles request with zoom 14 => returns bike: null and bike_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 both bike: null and bike_clusters: null and says in the attributes.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.

hb0 avatar Mar 22 '21 09:03 hb0

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

W1MMER avatar Mar 22 '21 17:03 W1MMER

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

hb0 avatar Mar 23 '21 14:03 hb0

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

hb0 avatar Jul 16 '21 10:07 hb0

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 avatar Jul 16 '21 11:07 W1MMER

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.

W1MMER avatar Aug 25 '21 08:08 W1MMER

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.

matt-wirtz avatar Feb 13 '22 10:02 matt-wirtz

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)

hb0 avatar Feb 14 '22 09:02 hb0

@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

W1MMER avatar Feb 14 '22 09:02 W1MMER

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?

jhZzz021 avatar May 13 '23 15:05 jhZzz021

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

ducknoir avatar Sep 05 '23 17:09 ducknoir