On-Demand API Documentation

Our On-demand REST API returns the current version of any article from all supported Wikimedia projects. Query by article name across all projects or use metadata filtering to request by project and language, with more options to optimize response payloads. On-demand returns JSON by default, but if you would prefer a NDJSON response be sure to include the Accept: application/x-ndjson header in your requests.

The Structured Contents articles endpoint is our sandbox beta endpoint that includes fully parsed Wikipedia Infobox and article sections data in JSON with more features in the roadmap.

Article Lookup

Most current revision of an article.

GET https://api.enterprise.wikimedia.com/v2/articles/{name}
Parameters
Path parameters
name
string
Required
Article name.
Query parameters
limit
integer
Optional
Limit of articles to return.
fields
array
Optional
Allows to select what fields you receive in your response.
filters
array
Optional
Allows you to filter the response payload.
Response
  • application/json
    [ { "event": { "identifier": "string", "type": "string", "date_created": "string" }, "additional_entities": "array", "article_body": { "html": "string", "wikitext": "string" }, "has_parts": "array", "categories": "array", "date_modified": "string", "identifier": "integer", "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" }, "is_part_of": { "identifier": "string", "code": "string", "name": "string", "url": "string", "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" } }, "license": "array", "main_entity": { "identifier": "string", "url": "string" }, "name": "string", "abstract": "string", "namespace": { "identifier": "number", "name": "string", "description": "string" }, "protection": "array", "redirects": "array", "templates": "array", "url": "string", "version": { "comment": "string", "editor": { "date_started": "string", "edit_count": "integer", "groups": "array", "identifier": "integer", "is_anonymous": "boolean", "is_bot": "boolean", "name": "string" }, "identifier": "integer", "is_flagged_stable": "boolean", "is_minor_edit": "boolean", "noindex": "boolean", "scores": { "revertrisk": { "prediction": "boolean", "probability": "object" } }, "maintenance_tags": { "citation_needed_count": "integer", "pov_count": "integer", "clarification_needed_count": "integer", "update_count": "integer" }, "tags": "array" }, "visibility": { "comment": "boolean", "text": "boolean", "user": "boolean" } } ]
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
POST https://api.enterprise.wikimedia.com/v2/articles/{name}
Parameters
Path parameters
name
string
Required
Article name.
Request Body
fields
array
filters
array
limit
integer
application/json
{ "fields": "[\"name\",\"identifier\"]\n", "filters": "[{\"field\": \"in_language.identifier\", \"value\": \"en\"}]\n", "limit": 3 }
Response
  • application/json
    [ { "event": { "identifier": "string", "type": "string", "date_created": "string" }, "additional_entities": "array", "article_body": { "html": "string", "wikitext": "string" }, "has_parts": "array", "categories": "array", "date_modified": "string", "identifier": "integer", "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" }, "is_part_of": { "identifier": "string", "code": "string", "name": "string", "url": "string", "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" } }, "license": "array", "main_entity": { "identifier": "string", "url": "string" }, "name": "string", "abstract": "string", "namespace": { "identifier": "number", "name": "string", "description": "string" }, "protection": "array", "redirects": "array", "templates": "array", "url": "string", "version": { "comment": "string", "editor": { "date_started": "string", "edit_count": "integer", "groups": "array", "identifier": "integer", "is_anonymous": "boolean", "is_bot": "boolean", "name": "string" }, "identifier": "integer", "is_flagged_stable": "boolean", "is_minor_edit": "boolean", "noindex": "boolean", "scores": { "revertrisk": { "prediction": "boolean", "probability": "object" } }, "maintenance_tags": { "citation_needed_count": "integer", "pov_count": "integer", "clarification_needed_count": "integer", "update_count": "integer" }, "tags": "array" }, "visibility": { "comment": "boolean", "text": "boolean", "user": "boolean" } } ]
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }

Article Structured Contents (BETA)

Lookup for the structured representation of the Article.

GET https://api.enterprise.wikimedia.com/v2/structured-contents/{name}
Parameters
Path parameters
name
string
Required
Article name.
Query parameters
limit
integer
Optional
Limit of articles to return.
fields
array
Optional
Allows to select what fields you receive in your response.
filters
array
Optional
Allows you to filter the response payload.
Response
  • application/json
    [ { "name": "string", "identifier": "integer", "abstract": "string", "description": "string", "url": "string", "date_created": "string", "date_modified": "string", "infobox": "array", "sections": "array", "main_entity": { "identifier": "string", "url": "string" }, "additional_entities": "array", "image": { "content_url": "string", "width": "string", "height": "string", "caption": "string", "alternative_text": "string" }, "version": { "comment": "string", "editor": { "date_started": "string", "edit_count": "integer", "groups": "array", "identifier": "integer", "is_anonymous": "boolean", "is_bot": "boolean", "name": "string" }, "identifier": "integer", "is_flagged_stable": "boolean", "is_minor_edit": "boolean", "noindex": "boolean", "scores": { "revertrisk": { "prediction": "boolean", "probability": "object" } }, "maintenance_tags": { "citation_needed_count": "integer", "pov_count": "integer", "clarification_needed_count": "integer", "update_count": "integer" }, "tags": "array" }, "is_part_of": { "identifier": "string", "code": "string", "name": "string", "url": "string", "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" } }, "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" }, "license": { "identifier": "string", "name": "string", "url": "string" } } ]
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
POST https://api.enterprise.wikimedia.com/v2/structured-contents/{name}
Parameters
Path parameters
name
string
Required
Article name.
Request Body
fields
array
filters
array
limit
integer
application/json
{ "fields": "[\"name\",\"identifier\"]\n", "filters": "[{\"field\": \"in_language.identifier\",\"value\": \"en\"}]\n", "limit": 3 }
Response
  • application/json
    [ { "name": "string", "identifier": "integer", "abstract": "string", "description": "string", "url": "string", "date_created": "string", "date_modified": "string", "infobox": "array", "sections": "array", "main_entity": { "identifier": "string", "url": "string" }, "additional_entities": "array", "image": { "content_url": "string", "width": "string", "height": "string", "caption": "string", "alternative_text": "string" }, "version": { "comment": "string", "editor": { "date_started": "string", "edit_count": "integer", "groups": "array", "identifier": "integer", "is_anonymous": "boolean", "is_bot": "boolean", "name": "string" }, "identifier": "integer", "is_flagged_stable": "boolean", "is_minor_edit": "boolean", "noindex": "boolean", "scores": { "revertrisk": { "prediction": "boolean", "probability": "object" } }, "maintenance_tags": { "citation_needed_count": "integer", "pov_count": "integer", "clarification_needed_count": "integer", "update_count": "integer" }, "tags": "array" }, "is_part_of": { "identifier": "string", "code": "string", "name": "string", "url": "string", "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" } }, "in_language": { "identifier": "string", "name": "string", "alternate_name": "string", "direction": "string" }, "license": { "identifier": "string", "name": "string", "url": "string" } } ]
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }
  • application/json
    { "message": "string", "status": "integer" }