API request returns null values for cetain keys (e.g., DataProvider)

Hi everyone,

I’m new here so I was browsing the forum first, to see if anyone has faced a similar issue, but wasn’t able to find anything that matched my precise problem.

I make the following API request, but I get null values for certain keys (e.g., “DataProvider”: null, “OperatorInfo”: null, “UsageType”: null, “StatusType”: null, “SubmissionStatus”: null), when I should get nested dictionaries:

api_url = f"https://api.openchargemap.io/v3/poi/?output=json&countrycode={country_code}&maxresults=200000&compact=true&key={api_key}"

params = {
“fields”: “AddressInfo,Connections,NumberOfPoints”

response = requests.get(api_url, params=params)

I must also mention that the same code was used by a colleague a few weeks prior, with complete data extraction for the specific country. Does anybody have a clue why this happens and/or has a possible solution for this issue?

Much appreciated,


compact=true removes reference data objects from the output and removes indentation formatting etc. If you omit compact=true you will get fully populated reference data objects.

verbose=false removes null fields.

So compact=true&verbose=false gives the smallest result set. This can be used along with our referencedata

I note in your code you also have a params object but I can’t tell that that does to your request, it’s not part of our API.

More info on requesting POI data:

Fetching core reference data (so you can match IDs to reference data like OperatorInfo if required) https://openchargemap.org/site/develop/api#/operations/get-referencedata