How to call the place API?

Hi Everyone,

I am pretty new to metabrainz, I am asked to develop a mobile app that take a search term for places from user and then show the resluts as a pin on a map. I am asked to use the https://wiki.musicbrainz.org/Development API.
I have gone through the musicbrainz API in this page:

https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2/Search

and I think the “Place” api should the right API for my application.
I try to call the API like using this URL:
http://musicbrainz.org/ws/2/place/?query=c&fmt=json&limit=20

I just would like to confirm that the way that I am calling the API is correct. The reason I am asking because I found the return data is mismatch , some data have a field named “coordinates” include place’s latitude and longitude which I can use to show the pin on the map but some return places do not have coordinates. Some places have “address” filed some do not have.Some places have “life-span” filed some do not have.(I need somehow to use this life-span field in my application also)

So I am thinking maybe the way that I am calling the api is wrong that is why it returning wrong data , or maybe this is not the right API to call?
Also I have another question is there any limit in calling this API?Or I can call this API as much as I want in my app? Do I need to register an account to use this API or it is open?
I would be grateful if anyone can help me.

Thank you in advance.

Hi!

It’s (almost definitely) not returning wrong data, it’s returning the data we have. If nobody has added coordinates, or an address, or a time span, then there won’t be any :slight_smile:

The rate-limiting info for the web service is here - the limit is generally 1 request per second. You can call it as much as you want otherwise, but if you’re going to make any money out of this (including ads) you should register and let us know. If the income is tiny we’ll probably not want any money, but we’d still want to know :slight_smile:

I think I’m not forgetting anything, but let me know if I am!

4 Likes

Hi Reoosarevok,

Thank you so much for your reply. Regarding your question if I am going to make money by using this app , the answer is no, I am just doing this as an assignment that represent my coding skill . My supervisor would like to check my coding skills. wish me luck :slight_smile:

Thank you again for taking your time to reply me back.

2 Likes

If anything, maybe a mention that per our social contract, adding on to your first sentence:

MusicBrainz is a community edited database, so as @reosarevok said, if no one in the community has added any given piece of data, that piece of data will be missing. (The same if someone has (knowingly or unknowingly) added wrong data, that’s what we’ll have to. We’re only as knowledgeable as our community wants us to be. :slight_smile: )