How to get all Wikipedia article titles?

2019-03-07 07:38发布

问题:

How to get all Wikipedia article titles in one place without extra characters and pageids. Just the article's title. Something like this:

When I download wikipedia dump, I get this

Maybe I know a movement that might get me all pages but I wanted to get all pages in one take.

回答1:

You'll find it on https://dumps.wikimedia.org

The latest List of page titles in main namespace for English Wikipedia as a database dump is here (69 MB).

If you rather want it through the API you use query and list=allpages but that only give you maximum 500 (5k for bots) at a time, so you will have to make more than 10 000 API calls for the English Wikipedia.

Example: https://en.wikipedia.org/w/api.php?action=query&format=xml&list=allpages&aplimit=max