# Mapillary API v4 timeline - what is going on?

**URL:** <https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936>\
**Category:** Mapillary integrations\
**Created:** [June 6, 2021, 1:43am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936 "2021-06-06T01:43:32Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/stevage/32/68230_2.png) [@stevage](https://forum.mapillary.com/u/stevage)\
**Post date:** [June 6, 2021, 1:43am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/1 "2021-06-06T01:43:32Z")

</div>

I recently built a site for a client that uses the Mapillary API for imagery and object detections ([here](https://map.safe7y.com/)), which I will need to update for the new API v4. According to the [blog post on March 3](https://blog.mapillary.com/update/2021/03/03/preparing-for-the-new-mapillary-api.html):

- v4 of the API would be launched in May
- v3 would only be guaranteed to run until the end of May (or “several weeks” - it’s unclear)
- developers should start using “the new v4 sandbox” (not linked) immediately to prepare for the change
- “In the meantime, keep an eye on our blog, newsletter, and social media for further updates, examples, and details about the new Mapillary API.” (There have not been, afaik, any further updates on any of these channels. There hasn’t even been a newsletter since February, whereas previously there was one every month.)

This is fairly concerning.

First: the cutover timeline is incredibly short. Just “several weeks” to implement a completely new API before switching off the old one? A year or more would be typical.

Second: we are already past the date when the old API was supposedly going to be switched off, and there is still not even any documentation about the new API, no new timeline announced - complete radio silence.

Could we please have an update?

---

<div class="post-metadata">

**Author:** ![chrisbeddow](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/chrisbeddow/32/844_2.png) [@chrisbeddow](https://forum.mapillary.com/u/chrisbeddow)\
**Post date:** [June 8, 2021, 5:25pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/2 "2021-06-08T17:25:23Z")

</div>

Hi @stevage, I will get these questions answered on the blog ASAP.

To break it down, let me know if these questions are the ones that need addressing:

1. until when will API v3 continue functioning?
2. what parts of API v3 will be limited once API v4 releases?
3. where is the documentation for API v4?
4. when is API v4 released?

^ the best I can tell you is that API v4 will be available widely any day now, and I’m eager to get you started on it, we can have a live call to go over this too.

---

<div class="post-metadata">

**Author:** ![filipc](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/filipc/32/1103_2.png) [@filipc](https://forum.mapillary.com/u/filipc)\
**Post date:** [June 8, 2021, 5:35pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/3 "2021-06-08T17:35:50Z")

</div>

Is there, or will there ever be a way to use the object tags ?  
I did not find it in the API.

---

<div class="post-metadata">

**Author:** ![tomc](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tomc](https://forum.mapillary.com/u/tomc)\
**Post date:** [June 8, 2021, 7:32pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/4 "2021-06-08T19:32:16Z")

</div>

Commenting to also receive updates on API rollout

---

<div class="post-metadata">

**Author:** ![stevage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/stevage/32/68230_2.png) [@stevage](https://forum.mapillary.com/u/stevage)\
**Post date:** [June 9, 2021, 12:18am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/5 "2021-06-09T00:18:48Z")

</div>

Thanks Chris. My main two questions are:

- when does the API v4, with documentation, get released?
- when does the API v3 get turned off?

The API v3 works just fine, so I don’t have any particular urgency. I just want to be able to do some planning for the upgrade so the site doesn’t suddenly break.

---

<div class="post-metadata">

**Author:** ![stevage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/stevage/32/68230_2.png) [@stevage](https://forum.mapillary.com/u/stevage)\
**Post date:** [June 10, 2021, 8:50am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/6 "2021-06-10T08:50:35Z")

</div>

Just relaying here that the new API docs are available here: [https://www.mapillary.com/developer/api-documentation/](https://www.mapillary.com/developer/api-documentation/)

---

<div class="post-metadata">

**Author:** ![tomc](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tomc](https://forum.mapillary.com/u/tomc)\
**Post date:** [June 11, 2021, 9:11pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/7 "2021-06-11T21:11:30Z")

</div>

Hi

Does anyone have any examples using the v4 API yet?

I am not too familiar with OAuth2, does this require hosting an endpoint to receive a token? Or can this be done through requests only with a username/password?

Thanks

---

<div class="post-metadata">

**Author:** ![boyce](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/boyce/32/70804_2.png) [@boyce](https://forum.mapillary.com/u/boyce)\
**Post date:** [June 13, 2021, 6:53am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/8 "2021-06-13T06:53:12Z")

</div>

Hi there - I have only managed to work with the graph endpoints. You don’t need to host your own endpoints - just use the client token from the dashboard.

Using `request` in python it looks something like this

```auto
url = 'https://graph.mapillary.com/image_ids?sequence_id=780170ac-64b2-4f12-8b41-06dfd83b39be'
data = dict()
headers = dict(Authorization="OAuth <client_token>")
x = requests.get(url, headers=headers)
data = x.json()['data']
print(data)

url = 'https://graph.mapillary.com/297238201933760?fields=id,computed_geometry,captured_at,thumb_2048_url'
x = requests.get(url, headers=headers)
data = x.json()
print(data)

```

Note that there is a space between `OAuth` and your actual token (e.g. `OAuth MLY|ASBKGFLKSDGFJSHDGF`)

Can’t figure out how to work with [https://tiles.mapillary.com](https://tiles.mapillary.com) though.

---

<div class="post-metadata">

**Author:** ![jorrarro](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/jorrarro/32/70811_2.png) [@jorrarro](https://forum.mapillary.com/u/jorrarro)\
**Post date:** [June 13, 2021, 9:04am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/9 "2021-06-13T09:04:12Z")

</div>

I have [tiles.mapillary.com](http://tiles.mapillary.com) set up for QGIS like this:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/mapillary/original/3X/7/1/710e4e699b1cfdb48afb17e98193b33f40b4cda1.png)

No style URL yet, so everything looks the same. Other stuff (images, points etc) work the same way, just with different URLs. For downloading the data separately you have to calculate the tile numbers ([like this](https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames)) for your area and use those for z,x and y.

Here is a sample Python code for getting one tile as geoJSON:

> import requests  
> from vt2geojson.tools import vt\_bytes\_to\_geojson
> 
> import math  
> def deg2num(lat\_deg, lon\_deg, zoom):  
> lat\_rad = math.radians(lat\_deg)  
> n = 2.0 \*\* zoom  
> xtile = int((lon\_deg + 180.0) / 360.0 \* n)  
> ytile = int((1.0 - math.asinh(math.tan(lat\_rad)) / math.pi) / 2.0 \* n)  
> return (xtile, ytile)
> 
> MAP\_ACCESS\_TOKEN = “MLY|xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”
> 
> z = 14  
> lat = 59.4368  
> lon = 24.7537
> 
> x,y = deg2num (lat, lon, z)
> 
> #uncomment the one layer you wish to use
> 
> #type=“mly1\_computed\_public”  
> #type=“mly\_map\_feature\_point”  
> #type=“mly\_map\_feature\_traffic\_sign”  
> #type=“mly1\_computed\_public”  
> type=“mly1\_public”
> 
> url = f"[https://tiles.mapillary.com/maps/vtp/{type}/2/{z}/{x}/{y}?access\_token={MAP\_ACCESS\_TOKEN}](https://tiles.mapillary.com/maps/vtp/%7Btype%7D/2/%7Bz%7D/%7Bx%7D/%7By%7D?access_token=%7BMAP_ACCESS_TOKEN%7D)"
> 
> r = requests.get(url)  
> assert r.status\_code == 200, r.content  
> vt\_content = r.content  
> features = vt\_bytes\_to\_geojson(vt\_content, x, y, z)  
> print (features)

---

<div class="post-metadata">

**Author:** ![boyce](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/boyce/32/70804_2.png) [@boyce](https://forum.mapillary.com/u/boyce)\
**Post date:** [June 13, 2021, 9:36pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/10 "2021-06-13T21:36:48Z")

</div>

Sweet! That was very helpful!

There is `mapbox_vector_tile` that can decode the pbf into dictionary as well.

---

<div class="post-metadata">

**Author:** ![chrisbeddow](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/chrisbeddow/32/844_2.png) [@chrisbeddow](https://forum.mapillary.com/u/chrisbeddow)\
**Post date:** [June 16, 2021, 5:16pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/11 "2021-06-16T17:16:06Z")

</div>

@filipc this currently is still not supported. I assume your current use case for this is tagging defibrillators in the image? Can you explain the workflow you would want in entirety?

---

<div class="post-metadata">

**Author:** ![filipc](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/filipc/32/1103_2.png) [@filipc](https://forum.mapillary.com/u/filipc)\
**Post date:** [June 16, 2021, 5:28pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/12 "2021-06-16T17:28:19Z")

</div>

I want to see all emergencies in my AR glasses.

---

<div class="post-metadata">

**Author:** ![klay6096tw](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/klay6096tw/32/70815_2.png) [@klay6096tw](https://forum.mapillary.com/u/klay6096tw)\
**Post date:** [June 17, 2021, 7:54am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/13 "2021-06-17T07:54:11Z")

</div>

Hi, I run into some problems about Detection API [detection-api-in-v4](http://mapillary.trydiscourse.com/t/detection-api-in-v4/4999)  
does anyone have similar problems with the Detection API?

Thanks.

---

<div class="post-metadata">

**Author:** ![chrisbeddow](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/chrisbeddow/32/844_2.png) [@chrisbeddow](https://forum.mapillary.com/u/chrisbeddow)\
**Post date:** [June 17, 2021, 9:02pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/14 "2021-06-17T21:02:39Z")

</div>

Also not supported. But let’s see what the future brings. 🙂

---

<div class="post-metadata">

**Author:** ![stevage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/stevage/32/68230_2.png) [@stevage](https://forum.mapillary.com/u/stevage)\
**Post date:** [June 28, 2021, 10:33am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/15 "2021-06-28T10:33:08Z")

</div>

Am I correct in saying that line-geometry object detections (construction, line markings etc) are no longer available as of v4?

---

<div class="post-metadata">

**Author:** ![stevage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/stevage/32/68230_2.png) [@stevage](https://forum.mapillary.com/u/stevage)\
**Post date:** [June 28, 2021, 11:42am UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/16 "2021-06-28T11:42:36Z")

</div>

Another thing I’m confused about is how to get the IDs of map features. In the `point` vector tiles layer, the only attributes are:

- “ID of the image”
- value
- first\_seen\_at
- last\_seen\_at

Yet the map feature endpoint ([https://graph.mapillary.com/:map\_feature\_id](https://graph.mapillary.com/:map_feature_id)) takes a map feature ID.

Where does it come from? Is the image ID in the point layer actually a map feature?

(We track the map feature IDs in order to filter out ones that are assessed as not useful.)

---

<div class="post-metadata">

**Author:** ![stevage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/stevage/32/68230_2.png) [@stevage](https://forum.mapillary.com/u/stevage)\
**Post date:** [June 28, 2021, 12:13pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/17 "2021-06-28T12:13:40Z")

</div>

Not sure if I’m doing something wrong, but the graph endpoint of the new API doesn’t seem to be returning any information for map features.

[https://graph.mapillary.com/218855313114838?access\_token=MLY|4156154957765752|f94ebf](https://graph.mapillary.com/218855313114838?access_token=MLY%7C4156154957765752%7Cf94ebf)…

This is just returning this JSON:

{  
“id”: “218855313114838”  
}

I don’t know what to make of that - is it a bad request? Server misbehaving?

---

<div class="post-metadata">

**Author:** ![chrisbeddow](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/chrisbeddow/32/844_2.png) [@chrisbeddow](https://forum.mapillary.com/u/chrisbeddow)\
**Post date:** [June 28, 2021, 8:48pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/18 "2021-06-28T20:48:07Z")

</div>

Hi Steve,

For the geometry of the detection, if you are working with Python, try using mapbox-vector-tile library to decode the `geometry` attribute of the detection (different from the geometry of the other data like images that has standard GeoJSON format). It is encoded as a vector tile so needs decoding to use.

For the map feature IDs: this is a typo in the docs! I will make moves for a fix. That is the ID of the map feature which is returned.

For your test API request, you need to specify the parameter `fields=` with the fields you want. So try:

[https://graph.mapillary.com/309498777295492?fields=first\_seen\_at,last\_seen\_at,object\_value,object\_type,geometry,images&access\_token=MLY|4358850594197155|a12e79fbf1b784091dd47dea5f35f3ec](https://graph.mapillary.com/309498777295492?fields=first_seen_at,last_seen_at,object_value,object_type,geometry,images&access_token=MLY%7C4358850594197155%7Ca12e79fbf1b784091dd47dea5f35f3ec)

Thanks for thoroughly testing this.

Are you doing this in JavaScript, Python, something else?

---

<div class="post-metadata">

**Author:** ![stevage](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/stevage/32/68230_2.png) [@stevage](https://forum.mapillary.com/u/stevage)\
**Post date:** [June 29, 2021, 12:51pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/19 "2021-06-29T12:51:22Z")

</div>

> For the geometry of the detection, if you are working with Python, try using mapbox-vector-tile library to decode the `geometry` attribute of the detection (different from the geometry of the other data like images that has standard GeoJSON format). It is encoded as a vector tile so needs decoding to use.

Sorry, I’m a bit confused - you’re saying that line features (construction zones and line markings in particular) _are_ available in the tiles? But they have a non-standard encoding?

(I’m working in JavaScript, but I’m fairly comfortable working with vector tiles at that level if need be. Need a few more details though.)

> For the map feature IDs: this is a typo in the docs! I will make moves for a fix. That is the ID of the map feature which is returned.

Thank god! 🙂

> For your test API request, you need to specify the parameter `fields=` with the fields you want.

Thanks, makes sense. Suggest improving the docs to make this clearer within each entity. Yes, it’s spelt out at the “Entities” level, but if you search/skim to “Map feature” like I did, you would have no way of knowing this.

---

<div class="post-metadata">

**Author:** ![chrisbeddow](https://sea1.discourse-cdn.com/flex015/user_avatar/forum.mapillary.com/chrisbeddow/32/844_2.png) [@chrisbeddow](https://forum.mapillary.com/u/chrisbeddow)\
**Post date:** [June 29, 2021, 2:29pm UTC](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936/20 "2021-06-29T14:29:11Z")

</div>

Hi Steve, sorry I misunderstood you–no, the line features are not available in the tiles, if referring to the lines we had in v3. But we do have point features that are lane marking and traffic signs for construction.

[Next page](https://forum.mapillary.com/t/mapillary-api-v4-timeline-what-is-going-on/4936.md?page=2)
