Wikidata Labels API

Label management

Operations 2

GET /entities/items/{item_id}/labels/{language_code} Wikidata Get a Label for an Item #
PUT /entities/items/{item_id}/labels/{language_code} Wikidata Set a Label for an Item #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/wikidata-labels-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

wikidata-labels-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Wikidata REST API & MediaWiki Descriptions Labels API
  description: Wikidata provides multiple APIs for accessing its structured knowledge graph. The Wikibase REST API (OpenAPI-based) provides entity read/write operations. The MediaWiki Action API provides entity retrieval, editing, and search via the wbgetentities, wbsearchentities, and wbeditentity actions. The SPARQL endpoint at query.wikidata.org supports SPARQL 1.1 queries.
  version: '1.0'
  contact:
    name: Wikidata Support
    url: https://www.wikidata.org/wiki/Wikidata:Contact_the_development_team
  license:
    name: CC0 1.0 Universal (Public Domain)
    url: https://creativecommons.org/publicdomain/zero/1.0/
servers:
- url: https://www.wikidata.org/w/rest.php/wikibase/v0
  description: Wikibase REST API (Beta)
- url: https://www.wikidata.org/w/api.php
  description: MediaWiki Action API
tags:
- name: Labels
  description: Label management
paths:
  /entities/items/{item_id}/labels/{language_code}:
    get:
      operationId: getItemLabel
      summary: Wikidata Get a Label for an Item
      description: Returns the label for a Wikidata item in a specific language.
      tags:
      - Labels
      parameters:
      - $ref: '#/components/parameters/ItemId'
      - $ref: '#/components/parameters/LanguageCode'
      responses:
        '200':
          description: Label value
          content:
            application/json:
              schema:
                type: string
                example: Douglas Adams
              examples:
                getItemLabel200Example:
                  summary: Default getItemLabel 200 response
                  x-microcks-default: true
                  value:
                    id: Q42
                    type: item
                    labels:
                      en: Douglas Adams
                      fr: Douglas Adams
                      de: Douglas Adams
                    descriptions:
                      en: English author and humorist
                      fr: auteur et humoriste anglais
                    aliases:
                      en:
                      - DNA
                      - Douglas Noel Adams
                    statements:
                      P31:
                      - id: Q42$F078E5B3-F9A8-480E-B7AC-D97778CBBEF9
                        rank: normal
                        property:
                          id: P31
                        value:
                          type: value
                          content: Q5
                    sitelinks:
                      enwiki:
                        title: Douglas Adams
                        url: https://en.wikipedia.org/wiki/Douglas_Adams
        '404':
          description: Label not found for this language
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    put:
      operationId: setItemLabel
      summary: Wikidata Set a Label for an Item
      description: Sets or replaces the label for a Wikidata item in the specified language.
      tags:
      - Labels
      security:
      - OAuth2: []
      - MediaWikiSession: []
      parameters:
      - $ref: '#/components/parameters/ItemId'
      - $ref: '#/components/parameters/LanguageCode'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - label
              properties:
                label:
                  type: string
                comment:
                  type: string
                  description: Edit summary
                bot:
                  type: boolean
      responses:
        '200':
          description: Label updated
        '201':
          description: Label created
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  parameters:
    LanguageCode:
      name: language_code
      in: path
      required: true
      description: BCP 47 language code
      schema:
        type: string
      example: en
    ItemId:
      name: item_id
      in: path
      required: true
      description: Wikidata item ID
      schema:
        type: string
        pattern: ^Q\d+$
      example: Q42
  securitySchemes:
    OAuth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://www.mediawiki.org/w/index.php?title=Special:OAuth/authorize
          tokenUrl: https://www.mediawiki.org/w/index.php?title=Special:OAuth/token
          scopes:
            editpage: Edit Wikidata items
            createeditmovepage: Create new items
    MediaWikiSession:
      type: apiKey
      in: cookie
      name: wikidataSession