Ask Your Question
1

Does an API function exist that enables a website URL to be used for querying the Wikipedia API?

asked 2021-10-17 11:00:00 +0000

bukephalos gravatar image

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-05-02 10:00:00 +0000

huitzilopochtli gravatar image

Yes, the Wikipedia API provides an endpoint for querying a page by its URL. The endpoint is called "action=parse" and accepts the "page" parameter with the URL-encoded name of the page as its value.

For example, to query the Wikipedia page for "Washington Monument" using its URL, you can use the following API request:

https://en.wikipedia.org/w/api.php?acti…

This will return a JSON object with the parsed content of the page, including its title, sections, and HTML content.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss

Add Answer


Question Tools

Stats

Asked: 2021-10-17 11:00:00 +0000

Seen: 9 times

Last updated: May 02 '22