WikipediaData
WikipediaData[article]
gives the plain text of the specified Wikipedia article.
WikipediaData[article,property,options]
gives the value of the specified property, modified by optional parameters, for the given Wikipedia article.
WikipediaData["Category"category,property,options]
gives the value of the specified property, modified by optional parameters, for the given Wikipedia category.
WikipediaData["PageID"pageid,property,options]
gives the value of the specified property, modified by optional parameters, for the article corresponding to the given numerical Wikipedia page ID.
Details and OptionsDetails and Options
- WikipediaData utilizes MediaWiki's API to retrieve article and category contents and metadata from the English-language Wikipedia.
- Properties related to article content and metadata include:
-
"ArticlePlaintext" plain text version of article content "ArticleWikicode" article content in Wikicode "ArticleContributors" list of article contributors "PageID" Wikipedia page ID number "SummaryPlaintext" brief article summary in plain text "SummaryWikicode" brief article summary in Wikicode "Title" article title "RandomArticle" random article - Properties about linked articles and websites include:
-
"LinksList" list of Wikipedia articles referenced in the specified article "LinksRules" list of rules representing links out from the specified article "BacklinksList" list of Wikipedia articles that reference the specified article "BacklinksRules" list of rules representing links into the specified article "SeeAlsoList" list of Wikipedia pages referenced in the specified article's See Also section "SeeAlsoRules" list of rules of Wikipedia pages referenced in the specified article's See Also section "ExternalLinks" list of external URLs referenced in the specified article - Properties about categories include:
-
"CategoryLinks" list of rules representing links between a specified category and its subcategories "CategoryMembers" list of subcategory and article titles contained in a given category "CategoryMemberIDs" list of subcategory and article page IDs contained in a given category "CategoryArticles" list of article titles contained in a given category "CategoryArticleIDs" list of article page IDs contained in a given category "ParentCategories" list of categories in which a given page is contained - Properties about corresponding pages in other Wikipedia language versions include:
-
"LanguagesList" list of Wikipedia language versions that have a corresponding article "LanguagesURLs" list of URLs to corresponding articles in other Wikipedia language versions "LanguagesURLRules" list of language-URL rules for corresponding articles in other Wikipedia language versions "TitleTranslation" list of pairs of language and title rules for corresponding articles in other Wikipedia language versions "TitleTranslationRules" list of language-title rules for corresponding articles in other Wikipedia language versions - Properties that return GeoLocation information associated with a given page include:
-
"GeoPosition" primary GeoPosition associated with a page "GeoNearbyArticles" list of article titles whose primary GeoPosition is within a given radius of a page "GeoNearbyDataset" dataset of information about articles whose primary GeoPosition is within a given radius of a page - Properties that return images and image metadata include:
-
"ImageList" list of thumbnail images from a given page "ImageDataset" dataset of information about images from a given page - Most WikipediaData properties support a "MaxItems" option:
-
MaxItems 500 number of results to return - Properties that return article links support the following properties:
-
"MaxLevel" 1 number of levels to search outward from the specified page "MaxLevelItems" 500 number of links to follow at each level - "GeoNearby" properties also support a GeoDistance option:
-
"GeoDistance" 10000 search radius in meters around a given point (maximum 10000 meters); also allows Quantity objects
ExamplesExamplesopen allclose all
Basic Examples (6)Basic Examples (6)
Get the text of a Wikipedia article:
Retrieve articles associated with Wolfram Language entities:
Retrieve articles by Wikipedia page ID:
Retrieve raw Wikicode markup for an article:
| In[4]:= |
Get a list of Wikipedia articles linked from or linking back to a given article:
Get lists of rules representing links between pages:
| In[3]:= |
Get a list of Wikipedia language versions that contain a corresponding article:
Get article titles in other versions of Wikipedia:
Get URLs for corresponding articles in other versions of Wikipedia:
Get the primary GeoPosition associated with a page or pages:
Get a Dataset of articles whose primary coordinates are near a given page:
Find Wikipedia articles whose primary coordinates are located within a GeoDisk:
Get a list of thumbnail images on a Wikipedia page:
Get a list of articles in a given Wikipedia category:
Get a list of articles, subcategories, and other pages in a given category:
Get a list of rules representing links between categories:
| In[3]:= |
Find out to what categories a given page belongs:
Get the title of a Wikipedia article from its Wolfram Language entity:
- Services
- Technical Services
- Corporate Consulting
- Company
- News
- Events
- About Wolfram
- Careers
- Contact
- Connect
- Wolfram Community
- Wolfram Blog
- Newsletter