The main api only returns 100 changesets, but the user has more than that, how can all of their changeset be queried? asked 07 Jun '13, 07:47 amritkarma |
You would have to get them 100 at a time. For example http://api.openstreetmap.org/api/0.6/changesets?display_name=EdLoach returns my most recent 100 changesets. My 100th changeset (as I type) shows created_at="2013-04-19T09:29:30Z" So, my next 100 older changesets can be queried by: where the first time is "closed after" and the second time is "created before", so I picked an arbitrary "closed after" date before the project began. So to get the next 100 older changesets each time, use the created_by time from the last changeset returned from the previous query as the "created before" time for the next one. At some point you will either get fewer than 100 changesets returned, or an empty result (example here based on a "created before" date set before I began mapping) if a user has an exact multiple of 100 changesets. answered 07 Jun '13, 08:43 EdLoach ♦ 2
But see the http://wiki.openstreetmap.org/wiki/API_usage_policy and don't do this for many users.
(07 Jun '13, 10:02)
gormo
I wrote a script to query this API to obtain all changesets for a user https://github.com/andrewharvey/osm-get-user-changeset-metadata
(02 Nov '20, 21:47)
aharvey
|