Data Dictionary

Wikimedia Enterprise APIs contain several data points that can help access the nature, context, and content of an article. All Wikimedia Enterprise APIs return the same article response, so use this reference to find specific data fields and how they may be useful to you.

Namespace IDs

Identifier

Name

Description

0

(Main)

Article namespace including Wikipedia article pages

6

File

Media namespace for Wikipedia articles. Contains all image, video, or other multimedia content as part of a particular project

10

Template

Template namespace contains Wikitext templates

14

Category

Category namespace contains articles consisting of aggregate categories

API Response Schema

Field Attribute

Type

Description

name

string

Name displayed at the top of the article page

Example: Squirrel

identifier

number

Unique identifier of the article.

Note: This is different from the revision identifier and maps directly to an article’s MediaWiki ID (primary key).

Example: 28492

date_modified

string

Timestamp of the last revision of the article in RFC3339 format.

Example: 2021-08-31T04:51:39Z

protection

array

List of community-specific protections and restrictions on the article. This is how you can tell which editor permissions are needed to work on this article.

Type: The type of event that the protection is applied to

Level: Editor status needed to operate in the type of protection

Expiry: Length of time that this protection or restriction is active

[
 {
 "type": "edit",
 "level": "autoconfirmed",
 "expiry": "infinity"
 },
 {
 "type": "move",
 "level": "autoconfirmed",
 "expiry": "infinity"
 }
 ]

version

object

Metadata related to the latest specific revision of the article.

version.identifier

number

Revision ID. Unique identifier of the revision, different from the article identifier.

Example: 1041549311

version.comment

string

Tags attached to the version.

Note: Tags can be added to an article to signify that this revision was part of a campaign, specific project-run initiative, tracked edit type, or other Wikimedia event.

Example: "Sample comment describing reason for revision"

version.tags

array

Comment attached by the editor to the latest version. This returns a parsed response.

Note: When a revision is saved, the editor has the ability to leave a comment describing why they created this revision.

[
 "mobile edit",
 "mobile app edit",
 "android app edit"
 ]

version.is_minor_edit

boolean

Was this change considered minor by the editor.

Note: When a revision is saved, the editor has the ability to mark whether this is a minor revision. Although this option is set by editors themselves and can lack consistency, minor revisions are typically grammar corrections and are less critical to review.

Example: false

version.is_flagged_stable

boolean

Was this revision marked stable by the project community.

Note: Depending on the project, there are different community approaches to having administrative approval on revisions as they happen. This will reflect whether or not the revision has been approved. While false does not mean this is a vandalized article, true is typically a good indicator that this is a good revision.

Example: false

version.scores

object

This object contains version scores calculated as part of Wikimedia’s ORES project.

There are two models included:

  • damaging: predicts whether or not an edit causes damage
  • goodfaith: predicts whether an edit was saved in good faith

Included in these models are three data points:

  • Prediction
  • Probability true
  • Probability false

Available for projects supported within Wikimedia Foundation’s ORES APIs

"scores": {
	"damaging": {
		"prediction": false,
		"probability": {
			"false": 0.959002615965355,
			"true": 0.040997384034645014
 		}
 	},
 	"goodfaith": {
 		"prediction": true,
 		"probability": {
 			"false": 0.01258411739167109,
 			"true": 0.9874158826083289
 		}
 	}
}

version.editor

object

Editor-specific signals that can help contextualize the revision:

  • Name
  • Edit count
  • Groups
  • Is bot
  • Is anonymous
  • Date started
{
	"identifier": 4904587,
	"name": "USERNAME",
	"groups": [
 		"extendedconfirmed",
 		"*",
 		"user",
 		"autoconfirmed"
 	],
 	"date_started": "2010-10-20T05:41:16Z",
 	"edit_count": 25123
}

url

string

URL of the article

Example: https://en.wikipedia.org/wiki/Squirrel

namespace

object

Namespace that this article belongs to.

Note: Within Wikimedia, namespaces are used to define the type of article that you are looking at. This indicates the difference between articles, discussion pages, category pages, and other article types.

"namespace": {
	"name": "Article",
	"identifier": 0
}

in_language

object

Human language the article is written in.

Note: Use the projects API for a list of supported projects and languages.

"in_language": {
	"name": "English",
	"identifier": "en"
}

main_entity

object

Wikidata QID that this article is related to.

"main_entity": {
	"identifier": "Q9482",
	"url": "http://www.wikidata.org/
entity/Q9482"
}

additional_entities

array

Array of Wikidata entities used in this article page and how they are used. Identifier of Entity URL Aspects of the Entity used (coding defined here)

"additional_entities": [
    {
        "identifier": "P1992",
        "url": "http://www.wikidata.org/entity/P1992",
        "aspects": [
            "C.P1630"
        ]
    },
    {
        "identifier": "P3031",
        "url": "http://www.wikidata.org/entity/P3031",
        "aspects": [
            "C.P1630"
        ]
    }...
]

categories

array

Project categories that this article belongs to.

Note: Within Wikimedia, the Category namespace is used to aggregate articles around specific topics. At the article level, this helps conceptualize the landscape of topics an article belongs to.

[
	{
		"name": "Category:All articles to be expanded",
		"url": "https://en.wikipedia.org/wiki/Category:
All_articles_to_be_expanded"
	},
]

templates

array

Wikitext templates used in this article.

Note: You can reference these if parsing the wikitext content directly.

[
	{
		"name": "Squirrel",
		"url": "https://en.wikipedia.org/
wiki/Squirrel"
	},
	{
		"name": "Template:;",
		"url": "https://en.wikipedia.org/
wiki/Template:;"
	},
	{
		"name": "Template:About",
		"url": "https://en.wikipedia.org/
wiki/Template:About"
	},
	{
		"name": "Template:Anglicise rank",
		"url": "https://en.wikipedia.org/wiki/
Template:Anglicise_rank"
	}
	...
]

redirects

array

Wikimedia articles that redirect to this article.

Note: Each name value is likely an alternate language spelling, similar topic item, or general consolidation of the content around this article.

[
	{
		"url": "https://en.wikipedia.org/
wiki/Sciuridae",
		"name": "Sciuridae"
	},
	{
		"url": "https://en.wikipedia.org/
wiki/Sciurid",
		"name": "Sciurid"
	},
 	{
		"url": "https://en.wikipedia.org/
wiki/Squirrels",
		"name": "Squirrels"
	},
	{
		"url": "https://en.wikipedia.org/
wiki/Bushy_tailed_tree_rat",
		"name": "Bushy tailed tree rat"
 	}
	...
]

is_part_of

array

Wikimedia project this article belongs to.

{
	"name": "Wikipedia",
	"identifier": "enwiki"
}

article_body

object

Article content in HTML and wikitext. The HTML is optimized for parsing out content, visit here for DOM Specs.

{
	"html": "...html goes here...",
	"wiktext": "...wikitext goes here..."
}

license

array

List of relevant licenses that affect this article and content reuse.

[
	{
		"name": "Creative Commons Attribution Share Alike 3.0 Unported",
		"identifier": "CC-BY-SA-3.0",
		"url": "https://creativecommons.org/
licenses/by-sa/3.0/"
 	}
 	...
]

Project IDs & Info