[Solved] API returns wrong results

Example:
https://www.openstreetmap.org/api/0.6/way/158601617/history
returns


<osm version="0.6" generator="CGImap 0.7.0 (10448 thorn-02.openstreetmap.org)"
copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright"
license="http://opendatacommons.org/licenses/odbl/1-0/">
  <way id="158601617" visible="true" version="1" changeset="11230310"
  timestamp="2012-04-08T21:03:27Z" user="adjuva" uid="92274">
    <nd ref="1707666203" />
    <nd ref="1707666197" />
    <nd ref="1707666196" />
    <nd ref="1707666193" />
    <nd ref="1707666198" />
    <nd ref="1707666203" />
    <tag k="description" v="HVDC converter station of the NorNet cable to norway." />
    <tag k="fenced" v="yes" />
    <tag k="operator" v="TenneT" />
    <tag k="power" v="sub_station" />
    <tag k="description" v="HVDC converter station of the NorNet cable to norway." />
    <tag k="fenced" v="yes" />
    <tag k="frequency" v="0;50" />
    <tag k="operator" v="TenneT" />
    <tag k="power" v="sub_station" />
    <tag k="description" v="HVDC converter station of the NorNet cable to norway." />
    <tag k="fenced" v="yes" />
...

Note the repeated tags.

No idea - you’ll have to ask somewhere that people involved in development are likely to read.

There is API development going on at the moment - see https://github.com/openstreetmap/operations/issues/293#issuecomment-495910497 etc.

FWIW I’ve seen the same effect before - see https://master.apis.dev.openstreetmap.org/api/0.6/way/4305365484/history .

Seems the API problem was solved for now by switching back from “write backend” to “readonly backend”