Completely lost with the Wikipedia Viewer app

Completely lost with the Wikipedia Viewer app

I just started implementing the wikipedia but i am getting nowhere with Wiki’s API documentation. I don’t even know how to pass in the search request in the URL. All I have got is this

$.getJSON(searchURL, {
    action: "query",
    format: "json",
    rvprop: "content",

This is all i got from the Wikipedia api’s documentation.How do i make a proper json request?

1 Like


The Wikimedia API is a bear. Here are the parameters I suggest:

action = query
list = search
format = json
srsearch = the search term entered by the user

I think there are some other things I’m forgetting, but these are the most important. Using $.getJSON will automatically request jsonp where needed, but I still like to specify dataType: jsonp.



Maybe use the sandbox to elaborate ur request string