Duplication api response

Hi.

thanks for this service. I want to use your API in my app, but I faced with one problem, when I make request it seems that in response I have duplication.

example:
GET
https://api.openchargemap.io/v3/poi/?client=ocm.app.ionic.7.4.8&verbose=false&output=json&includecomments=true&maxresults=250&compact=true&boundingbox=(37.54513673542641,-77.46455311695473),(37.54751524559816,-77.44830288304615)

in response I recieved an array of 16 elements, but on map they apear as one charger:
and if close look on response it realy one charger, because the coordinates are the same and address also the same but every element have it own unique UUID.
How on map Front-end know that this is the same charger, and show it only once?
how can I filter to remove dublicates?

Thanks.

image

API response:
[{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-22T05:51:00Z","ID":163371,"UUID":"599AEB21-A1F2-4EF6-8809-419C2D46D0AF","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163728,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234940,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-22T05:51:00Z","DataQualityLevel":1,"DateCreated":"2020-08-22T05:51:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-20T05:50:00Z","ID":163202,"UUID":"1C781B08-2ADC-432C-905A-E953672EDB29","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163559,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234760,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-20T05:50:00Z","DataQualityLevel":1,"DateCreated":"2020-08-20T05:50:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-17T05:35:00Z","ID":162807,"UUID":"78ED5DA5-A57B-4A71-AC9A-CFD3379BAABF","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163164,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234329,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-17T05:35:00Z","DataQualityLevel":1,"DateCreated":"2020-08-17T05:35:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-17T05:35:00Z","ID":162807,"UUID":"78ED5DA5-A57B-4A71-AC9A-CFD3379BAABF","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163164,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234329,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-17T05:35:00Z","DataQualityLevel":1,"DateCreated":"2020-08-17T05:35:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-15T05:37:00Z","ID":162732,"UUID":"F6F90AE5-26F5-46E3-AAAA-ED2ACBEB3364","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163089,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234243,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-15T05:37:00Z","DataQualityLevel":1,"DateCreated":"2020-08-15T05:37:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-15T05:37:00Z","ID":162732,"UUID":"F6F90AE5-26F5-46E3-AAAA-ED2ACBEB3364","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163089,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234243,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-15T05:37:00Z","DataQualityLevel":1,"DateCreated":"2020-08-15T05:37:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-15T05:37:00Z","ID":162732,"UUID":"F6F90AE5-26F5-46E3-AAAA-ED2ACBEB3364","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163089,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234243,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-15T05:37:00Z","DataQualityLevel":1,"DateCreated":"2020-08-15T05:37:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-15T05:37:00Z","ID":162732,"UUID":"F6F90AE5-26F5-46E3-AAAA-ED2ACBEB3364","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163089,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234243,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-15T05:37:00Z","DataQualityLevel":1,"DateCreated":"2020-08-15T05:37:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-15T05:37:00Z","ID":162732,"UUID":"F6F90AE5-26F5-46E3-AAAA-ED2ACBEB3364","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163089,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234243,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-15T05:37:00Z","DataQualityLevel":1,"DateCreated":"2020-08-15T05:37:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-15T05:37:00Z","ID":162732,"UUID":"F6F90AE5-26F5-46E3-AAAA-ED2ACBEB3364","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163089,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234243,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-15T05:37:00Z","DataQualityLevel":1,"DateCreated":"2020-08-15T05:37:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-13T05:31:00Z","ID":162644,"UUID":"189C11F1-D1E3-442F-8786-F733BC69C888","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":163001,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":234090,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-13T05:31:00Z","DataQualityLevel":1,"DateCreated":"2020-08-13T05:31:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-11T05:29:00Z","ID":162526,"UUID":"50CB7A91-52E5-49B6-B32A-2EA8162727AB","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":162883,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":233921,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-11T05:29:00Z","DataQualityLevel":1,"DateCreated":"2020-08-11T05:29:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-09T05:29:00Z","ID":162471,"UUID":"04352518-882C-46F0-93E4-246F9B914236","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":162828,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":233841,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-09T05:29:00Z","DataQualityLevel":1,"DateCreated":"2020-08-09T05:29:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-07T05:30:00Z","ID":162369,"UUID":"5FDDBA70-C120-462C-8487-FE438B720D3A","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":162726,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":233702,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-07T05:30:00Z","DataQualityLevel":1,"DateCreated":"2020-08-07T05:30:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-04T05:33:00Z","ID":162269,"UUID":"E9E3190F-D72D-44F7-98C6-14C9A06C8CE9","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":162626,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":233539,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-04T05:33:00Z","DataQualityLevel":1,"DateCreated":"2020-08-04T05:33:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-08-02T05:34:00Z","ID":162121,"UUID":"FF846416-528F-4E1B-B37C-3E100FD9F0B4","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":162478,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":233330,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-08-02T05:34:00Z","DataQualityLevel":1,"DateCreated":"2020-08-02T05:34:00Z","SubmissionStatusTypeID":200},{"IsRecentlyVerified":true,"DateLastVerified":"2020-07-31T05:45:00Z","ID":161996,"UUID":"959F7D93-5769-497D-9C90-350B155AE27C","DataProviderID":1,"OperatorID":23,"OperatorsReference":"37188","UsageTypeID":4,"AddressInfo":{"ID":162353,"Title":"Pupatella","AddressLine1":"1 N Morris St","Town":"Richmond","StateOrProvince":"VA","Postcode":"23220","CountryID":2,"Latitude":37.546347,"Longitude":-77.456361,"ContactTelephone1":"(804) 355-3135","DistanceUnit":0},"Connections":[{"ID":233154,"ConnectionTypeID":30,"StatusTypeID":50,"LevelID":2,"PowerKW":12.0,"CurrentTypeID":20,"Quantity":2}],"NumberOfPoints":2,"GeneralComments":"2 Tesla Connectors, up to 12kW.Available for customers. Self park.","StatusTypeID":50,"DateLastStatusUpdate":"2020-07-31T05:45:00Z","DataQualityLevel":1,"DateCreated":"2020-07-31T05:45:00Z","SubmissionStatusTypeID":200}]

Thanks for pointing that out, looks to be a whole bunch of duplicates which is really weird as normally it would take some decent effort to get duplicates listed. I’ll see if I can figure out where it came from.

@Simon_Hewison this looks to be an automated status import, if you’re aware of what could have caused this can you make sure that data sets are clean of approx dupes (i.e lat/longs within a few meters of each other should be considered likely duplicates and not included in automated updates).

Worked out what it was. The Openchargemap API has a maxresults option, which is mandatory when you need to get more than the 250 result maximum default. For tesla, I do the comparison by country, and Tesla now have more locations in the USA than the (arbitrary) 19500 limit that I set. As such, some locations weren’t being spotted as already existing.
I’ve upped the limit, but again, it’s to an arbitrary number.
Is there a better way of doing this so that I don’t care about the size of the results, but I don’t want to overload the Openchargemap API?
I’ll also build in a safeguard so that if the script gets the maximum number of results, it will abort, so as to prevent any duplicates.

Cool, the maxresults parameter can be 1000000 though so that’s one way.

The best way is to run your own API mirror, which can be done either in docker ( https://www.github.com/openchargemap/ocm-system/tree/master/API%2FOCM.Net%2FOCM.API.Worker%2FREADME.md) or by cloning the current data from the GitHub json data dump and importing it into a local database of your own choice. That way you have unlimited access to data to compare against.

Really for imports and updates we should funnel