Well, the query seems good, and I will try to do more in this lenguage.
I have another question, I get the result in JSON or CSV format, and then
the URL "http://www.wikidata.org/entity/Q8660"; goes me to another page with
city information.. Can I obtain this information in XML format or JSON? In
this way I could parse all the attributes and get the most interesting for
me.

Thanks,

Guillem

2017-03-08 11:14 GMT+01:00 Thomas PT <[email protected]>:

> Hello Guillem,
>
> You are probably looking for something like https://www.wikidata.org that
> is a Wikipedia sister project.
> It provides nice APIs for use cases like yours:
> https://www.wikidata.org/wiki/Wikidata:Data_access
>
> See for example http://tinyurl.com/gswbvyo
>
> Cheers,
>
> Thomas
>
> > Le 8 mars 2017 à 11:09, Guillem Barbosa <[email protected]> a
> écrit :
> >
> > Hello, my name is Guillem and I'm a student that I'm working in Liquid
> Galaxy project, and now I have some questions and doubts that I would like
> to resolve to continue with the project.
> >
> > I have been working with WIkimedia API, I found some information about
> it and I tried diferent actions to get responses and compare. For example,
> in my case I want to obtain the most populated cities in the world.
> >
> > First of all, my query will be:
> > " https://en.wikipedia.org/w/api.php?action=query&format=
> xml&titles=List_of_cities_proper_by_population&prop=
> revisions&rvprop=content " (in this page there are a list of most
> populated cities in the world)
> > The response is all the Wikipedia page, and the information text is
> inside <rev> tag. Then, my task is to parse the text response and obtain
> the cities name in the list. I would like to know if ther are some
> posibility to obtain only the cities list, and it will be more easy to get
> it.
> >
> > Once I have the names of the cities, the next step is to obtain the
> coordinates for each one. Here I have two possibilities: a new query with
> API (" https://en.wikipedia.org/w/api.php?action=query&format=
> xml&titles=Shanghai&prop=revisions&rvprop=content ") I put the city name
> in the parameter "title", and then the response is so extended, but I get
> only the Infobox part to obtein the mainly information about the city.
> > And the second option is to use bdpedia, I find this option searching
> and it also can be a posibility, but my doubt is: when I search "
> dbpedia.org/data/Tokyo " the properties and values are the same in the
> wikimedia page for the city? I have discoverd that I can obtain the
> response in json or xml format.
> > In this way, I could get some information about the city, and search for
> each tag or property that is well identified.
> >
> > I haven't found the way to obtain more detailed some information about
> in this case a city (I would like to have the mainly information
> organizated in tags and then it will be more easy to obtain the results).
> So, the other option is to do the proces that I have explained, this
> requires more work but also will be valid.
> >
> > Thanks for you time
> >
> > your sincerely,
> >
> > Guillem.
> > _______________________________________________
> > Mediawiki-api mailing list
> > [email protected]
> > https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
> _______________________________________________
> Mediawiki-api mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/mediawiki-api
>
>
_______________________________________________
Mediawiki-api mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api

Reply via email to