Skip to main content
https://travis-ci.org/goldsmith/Wikipedia.png?branch=master https://pypip.in/d/wikipedia/badge.png https://pypip.in/v/wikipedia/badge.png

Wikipedia is a Python library that makes it easy to access and parse data from Wikipedia.

Search Wikipedia, get article summaries, get data like links and images from a page, and more. Wikipedia wraps the MediaWiki API so you can focus on using Wikipedia data, not getting it.

>>> import wikipedia
>>> print wikipedia.summary("Wikipedia")
# Wikipedia (/wkpidi/ or /wkipidi/ WIK-i-PEE-dee-) is a collaboratively edited, multilingual, free Internet encyclopedia supported by the non-profit Wikimedia Foundation...

>>> wikipedia.search("Barack")
# [u'Barak (given name)', u'Barack Obama', u'Barack (brandy)', u'Presidency of Barack Obama', u'Family of Barack Obama', u'First inauguration of Barack Obama', u'Barack Obama presidential campaign, 2008', u'Barack Obama, Sr.', u'Barack Obama citizenship conspiracy theories', u'Presidential transition of Barack Obama']

>>> ny = wikipedia.page("New York")
>>> ny.title
# u'New York'
>>> ny.url
# u'http://en.wikipedia.org/wiki/NewYork'
>>> ny.content
# u'New York is a state in the Northeastern region of the United States. New York is the 27th-most exten'...
>>> ny.links[0]
# u'1790 United States Census'

Installation

To install Wikipedia, simply run:

$ pip install wikipedia

Documentation

Read the docs at https://wikipedia.readthedocs.org/en/latest/.

License

MIT licensed. See the LICENSE file for full details.

Credits

  • wiki-api by @richardasaurus for inspiration

  • @nmoroze and @themichaelyang for feedback and suggestions

  • The Wikimedia Foundation for giving the world free access to data

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wikipedia-0.9.7.tar.gz (15.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wikipedia-0.9.7.macosx-10.8-intel.exe (79.2 kB view details)

Uploaded Source

File details

Details for the file wikipedia-0.9.7.tar.gz.

File metadata

  • Download URL: wikipedia-0.9.7.tar.gz
  • Upload date:
  • Size: 15.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for wikipedia-0.9.7.tar.gz
Algorithm Hash digest
SHA256 01ae8b2e7f7e70d6e14ea89ea77f4973a6670d2c50d9c491a659986a80630826
MD5 9ba76734b03b9d1c5da3da1a2f80efb8
BLAKE2b-256 582cdd08bf846c67a46307d6815a302980e12e67763ce8e7a8f10e37047e1552

See more details on using hashes here.

File details

Details for the file wikipedia-0.9.7.macosx-10.8-intel.exe.

File metadata

File hashes

Hashes for wikipedia-0.9.7.macosx-10.8-intel.exe
Algorithm Hash digest
SHA256 bf2cac8c51842df089fbe103d88586742eec90cace7288199acf30649e32a2f5
MD5 f9beafca27be99940f434b95e114a94e
BLAKE2b-256 b78321b8c89b222cea32ff335f5a862b1de57f7fbe053d7b03d5006156d1cab5

See more details on using hashes here.

Release history Release notifications | RSS feed

1.4.0

1 file

1.3.1

1 file

1.3.0

1 file

1.2.1

1 file

1.2

1 file

1.1

1 file

1.0.3

1 file

1.0.2

1 file

1.0.1

1 file

1.0.0

2 files

0.9.8

2 files

This release

0.9.7 This release

2 files

0.9.6

2 files

0.9.5

2 files

0.9.4

2 files

0.9.3

2 files

0.9.2

2 files

0.9.1

2 files

0.9

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page