MediaWiki API help

This is an auto-generated MediaWiki API documentation page.

Documentation and examples: https://www.mediawiki.org/wiki/Special:MyLanguage/API:Main_page

action=wbsetlabel

(main | wbsetlabel)
  • This module requires read rights.
  • This module requires write rights.
  • This module only accepts POST requests.
  • Source: WikibaseClient
  • License: GPL-2.0-or-later

Sets a label for a single Wikibase entity.

Specific parameters:
Other general parameters are available.
id

The identifier for the entity, including the prefix. Use either id or site and title together.

new

If set, a new entity will be created. Set this to the type of the entity you want to create.

One of the following values: item, property
site

An identifier for the site on which the page resides. Use together with title to make a complete sitelink.

One of the following values: aawiki, aawikibooks, aawiktionary, abwiki, abwiktionary, acewiki, adywiki, afwiki, afwikibooks, afwikiquote, afwiktionary, akwiki, akwikibooks, akwiktionary, alswiki, alswikibooks, alswikiquote, alswiktionary, altwiki, amiwiki, amwiki, amwikiquote, amwiktionary, angwiki, angwikibooks, angwikiquote, angwikisource, angwiktionary, annwiki, anpwiki, anwiki, anwiktionary, arcwiki, arwiki, arwikibooks, arwikinews, arwikiquote, arwikisource, arwikiversity, arwiktionary, arywiki, arzwiki, astwiki, astwikibooks, astwikiquote, astwiktionary, aswiki, aswikibooks, aswikiquote, aswikisource, aswiktionary, atjwiki, avkwiki, avwiki, avwiktionary, awawiki, aywiki, aywikibooks, aywiktionary, azbwiki, azwiki, azwikibooks, azwikiquote, azwikisource, azwiktionary, banwiki, banwikisource, barwiki, bat_smgwiki, bawiki, bawikibooks, bbcwiki, bclwiki, bclwikiquote, bclwikisource, bclwiktionary, bdrwiki, be_x_oldwiki, bewiki, bewikibooks, bewikiquote, bewikisource, bewiktionary, bewwiki, bgwiki, bgwikibooks, bgwikinews, bgwikiquote, bgwikisource, bgwiktionary, bhwiki, bhwiktionary, biwiki, biwikibooks, biwiktionary, bjnwiki, bjnwikiquote, bjnwiktionary, blkwiki, blkwiktionary, bmwiki, bmwikibooks, bmwikiquote, bmwiktionary, bnwiki, bnwikibooks, bnwikiquote, bnwikisource, bnwikivoyage, bnwiktionary, bowiki, bowikibooks, bowiktionary, bpywiki, brwiki, brwikiquote, brwikisource, brwiktionary, bswiki, bswikibooks, bswikinews, bswikiquote, bswikisource, bswiktionary, btmwiki, btmwiktionary, bugwiki, bxrwiki, cawiki, cawikibooks, cawikinews, cawikiquote, cawikisource, cawiktionary, cbk_zamwiki, cdowiki, cebwiki, cewiki, chowiki, chrwiki, chrwiktionary, chwiki, chwikibooks, chwiktionary, chywiki, ckbwiki, ckbwiktionary, commonswiki, cowiki, cowikibooks, cowikiquote, cowiktionary, crhwiki, crwiki, crwikiquote, crwiktionary, csbwiki, csbwiktionary, cswiki, cswikibooks, cswikinews, cswikiquote, cswikisource, cswikiversity, cswikivoyage, cswiktionary, cuwiki, cvwiki, cvwikibooks, cywiki, cywikibooks, cywikiquote, cywikisource, cywiktionary, dagwiki, dawiki, dawikibooks, dawikiquote, dawikisource, dawiktionary, dewiki, dewikibooks, dewikinews, dewikiquote, dewikisource, dewikiversity, dewikivoyage, dewiktionary, dgawiki, dinwiki, diqwiki, diqwiktionary, dsbwiki, dtpwiki, dtywiki, dvwiki, dvwiktionary, dzwiki, dzwiktionary, eewiki, elwiki, elwikibooks, elwikinews, elwikiquote, elwikisource, elwikiversity, elwikivoyage, elwiktionary, emlwiki, enwiki, enwikibooks, enwikinews, enwikiquote, enwikisource, enwikiversity, enwikivoyage, enwiktionary, eowiki, eowikibooks, eowikinews, eowikiquote, eowikisource, eowikivoyage, eowiktionary, eswiki, eswikibooks, eswikinews, eswikiquote, eswikisource, eswikiversity, eswikivoyage, eswiktionary, etwiki, etwikibooks, etwikiquote, etwikisource, etwiktionary, euwiki, euwikibooks, euwikiquote, euwikisource, euwiktionary, extwiki, fatwiki, fawiki, fawikibooks, fawikinews, fawikiquote, fawikisource, fawikivoyage, fawiktionary, ffwiki, fiu_vrowiki, fiwiki, fiwikibooks, fiwikinews, fiwikiquote, fiwikisource, fiwikiversity, fiwikivoyage, fiwiktionary, fjwiki, fjwiktionary, fonwiki, foundationwiki, fowiki, fowikisource, fowiktionary, frpwiki, frrwiki, frwiki, frwikibooks, frwikinews, frwikiquote, frwikisource, frwikiversity, frwikivoyage, frwiktionary, furwiki, fywiki, fywikibooks, fywiktionary, gagwiki, ganwiki, gawiki, gawikibooks, gawikiquote, gawiktionary, gcrwiki, gdwiki, gdwiktionary, glkwiki, glwiki, glwikibooks, glwikiquote, glwikisource, glwiktionary, gnwiki, gnwikibooks, gnwiktionary, gomwiki, gomwiktionary, gorwiki, gorwikiquote, gorwiktionary, gotwiki, gotwikibooks, gpewiki, gucwiki, gurwiki, guwiki, guwikibooks, guwikiquote, guwikisource, guwiktionary, guwwiki, guwwikinews, guwwikiquote, guwwiktionary, gvwiki, gvwiktionary, hakwiki, hawiki, hawiktionary, hawwiki, hewiki, hewikibooks, hewikinews, hewikiquote, hewikisource, hewikivoyage, hewiktionary, hifwiki, hifwiktionary, hiwiki, hiwikibooks, hiwikiquote, hiwikisource, hiwikiversity, hiwikivoyage, hiwiktionary, howiki, hrwiki, hrwikibooks, hrwikiquote, hrwikisource, hrwiktionary, hsbwiki, hsbwiktionary, htwiki, htwikisource, huwiki, huwikibooks, huwikinews, huwikiquote, huwikisource, huwiktionary, hywiki, hywikibooks, hywikiquote, hywikisource, hywiktionary, hywwiki, hzwiki, iawiki, iawikibooks, iawiktionary, ibawiki, idwiki, idwikibooks, idwikiquote, idwikisource, idwiktionary, iewiki, iewikibooks, iewiktionary, iglwiki, igwiki, igwikiquote, igwiktionary, iiwiki, ikwiki, ikwiktionary, ilowiki, inhwiki, iowiki, iowiktionary, iswiki, iswikibooks, iswikiquote, iswikisource, iswiktionary, itwiki, itwikibooks, itwikinews, itwikiquote, itwikisource, itwikiversity, itwikivoyage, itwiktionary, iuwiki, iuwiktionary, jamwiki, jawiki, jawikibooks, jawikinews, jawikiquote, jawikisource, jawikiversity, jawikivoyage, jawiktionary, jbowiki, jbowiktionary, jvwiki, jvwikisource, jvwiktionary, kaawiki, kaawiktionary, kabwiki, kawiki, kawikibooks, kawikiquote, kawikisource, kawiktionary, kbdwiki, kbdwiktionary, kbpwiki, kcgwiki, kcgwiktionary, kgewiki, kgwiki, kiwiki, kjwiki, kkwiki, kkwikibooks, kkwikiquote, kkwiktionary, klwiki, klwiktionary, kmwiki, kmwikibooks, kmwiktionary, knwiki, knwikibooks, knwikiquote, knwikisource, knwiktionary, koiwiki, kowiki, kowikibooks, kowikinews, kowikiquote, kowikisource, kowikiversity, kowiktionary, krcwiki, krwiki, krwikiquote, kshwiki, kswiki, kswikibooks, kswikiquote, kswiktionary, kuswiki, kuwiki, kuwikibooks, kuwikiquote, kuwiktionary, kvwiki, kwwiki, kwwikiquote, kwwiktionary, kywiki, kywikibooks, kywikiquote, kywiktionary, ladwiki, lawiki, lawikibooks, lawikiquote, lawikisource, lawiktionary, lbewiki, lbwiki, lbwikibooks, lbwikiquote, lbwiktionary, lezwiki, lfnwiki, lgwiki, lijwiki, lijwikisource, liwiki, liwikibooks, liwikinews, liwikiquote, liwikisource, liwiktionary, lldwiki, lmowiki, lmowiktionary, lnwiki, lnwikibooks, lnwiktionary, lowiki, lowiktionary, lrcwiki, ltgwiki, ltwiki, ltwikibooks, ltwikiquote, ltwikisource, ltwiktionary, lvwiki, lvwikibooks, lvwiktionary, madwiki, madwiktionary, maiwiki, map_bmswiki, mdfwiki, mediawikiwiki, metawiki, mgwiki, mgwikibooks, mgwiktionary, mhrwiki, mhwiki, mhwiktionary, minwiki, minwiktionary, miwiki, miwikibooks, miwiktionary, mkwiki, mkwikibooks, mkwikisource, mkwiktionary, mlwiki, mlwikibooks, mlwikiquote, mlwikisource, mlwiktionary, mniwiki, mniwiktionary, mnwiki, mnwikibooks, mnwiktionary, mnwwiki, mnwwiktionary, moswiki, mowiki, mowiktionary, mrjwiki, mrwiki, mrwikibooks, mrwikiquote, mrwikisource, mrwiktionary, mswiki, mswikibooks, mswikisource, mswiktionary, mtwiki, mtwiktionary, muswiki, mwlwiki, myvwiki, mywiki, mywikibooks, mywikisource, mywiktionary, mznwiki, nahwiki, nahwikibooks, nahwiktionary, napwiki, napwikisource, nawiki, nawikibooks, nawikiquote, nawiktionary, nds_nlwiki, ndswiki, ndswikibooks, ndswikiquote, ndswiktionary, newiki, newikibooks, newiktionary, newwiki, ngwiki, niawiki, niawiktionary, nlwiki, nlwikibooks, nlwikinews, nlwikiquote, nlwikisource, nlwikivoyage, nlwiktionary, nnwiki, nnwikiquote, nnwiktionary, novwiki, nowiki, nowikibooks, nowikinews, nowikiquote, nowikisource, nowiktionary, nqowiki, nrmwiki, nrwiki, nsowiki, nvwiki, nywiki, ocwiki, ocwikibooks, ocwiktionary, olowiki, omwiki, omwiktionary, orwiki, orwikisource, orwiktionary, oswiki, outreachwiki, pagwiki, pamwiki, papwiki, pawiki, pawikibooks, pawikisource, pawiktionary, pcdwiki, pcmwiki, pdcwiki, pflwiki, pihwiki, piwiki, piwiktionary, plwiki, plwikibooks, plwikinews, plwikiquote, plwikisource, plwikivoyage, plwiktionary, pmswiki, pmswikisource, pnbwiki, pnbwiktionary, pntwiki, pswiki, pswikibooks, pswikivoyage, pswiktionary, ptwiki, ptwikibooks, ptwikinews, ptwikiquote, ptwikisource, ptwikiversity, ptwikivoyage, ptwiktionary, pwnwiki, quwiki, quwikibooks, quwikiquote, quwiktionary, rmwiki, rmwikibooks, rmwiktionary, rmywiki, rnwiki, rnwiktionary, roa_rupwiki, roa_rupwiktionary, roa_tarawiki, rowiki, rowikibooks, rowikinews, rowikiquote, rowikisource, rowikivoyage, rowiktionary, rskwiki, ruewiki, ruwiki, ruwikibooks, ruwikinews, ruwikiquote, ruwikisource, ruwikiversity, ruwikivoyage, ruwiktionary, rwwiki, rwwiktionary, sahwiki, sahwikiquote, sahwikisource, satwiki, sawiki, sawikibooks, sawikiquote, sawikisource, sawiktionary, scnwiki, scnwiktionary, scowiki, scwiki, scwiktionary, sdwiki, sdwikinews, sdwiktionary, sewiki, sewikibooks, sgwiki, sgwiktionary, shiwiki, shnwiki, shnwikibooks, shnwikinews, shnwikivoyage, shnwiktionary, shwiki, shwiktionary, shywiktionary, simplewiki, simplewikibooks, simplewikiquote, simplewiktionary, siwiki, siwikibooks, siwiktionary, skrwiki, skrwiktionary, skwiki, skwikibooks, skwikiquote, skwikisource, skwiktionary, slwiki, slwikibooks, slwikiquote, slwikisource, slwikiversity, slwiktionary, smnwiki, smwiki, smwiktionary, snwiki, snwiktionary, sourceswiki, sowiki, sowiktionary, specieswiki, sqwiki, sqwikibooks, sqwikinews, sqwikiquote, sqwiktionary, srnwiki, srwiki, srwikibooks, srwikinews, srwikiquote, srwikisource, srwiktionary, sswiki, sswiktionary, stqwiki, stwiki, stwiktionary, suwiki, suwikibooks, suwikiquote, suwikisource, suwiktionary, svwiki, svwikibooks, svwikinews, svwikiquote, svwikisource, svwikiversity, svwikivoyage, svwiktionary, swwiki, swwikibooks, swwiktionary, szlwiki, szywiki, tawiki, tawikibooks, tawikinews, tawikiquote, tawikisource, tawiktionary, taywiki, tcywiki, tcywikisource, tcywiktionary, tddwiki, tetwiki, tewiki, tewikibooks, tewikiquote, tewikisource, tewiktionary, tgwiki, tgwikibooks, tgwiktionary, thwiki, thwikibooks, thwikinews, thwikiquote, thwikisource, thwiktionary, tiwiki, tiwiktionary, tkwiki, tkwikibooks, tkwikiquote, tkwiktionary, tlwiki, tlwikibooks, tlwikiquote, tlwiktionary, tlywiki, tnwiki, tnwiktionary, towiki, towiktionary, tpiwiki, tpiwiktionary, trvwiki, trwiki, trwikibooks, trwikinews, trwikiquote, trwikisource, trwikivoyage, trwiktionary, tswiki, tswiktionary, ttwiki, ttwikibooks, ttwikiquote, ttwiktionary, tumwiki, twwiki, twwiktionary, tyvwiki, tywiki, udmwiki, ugwiki, ugwikibooks, ugwikiquote, ugwiktionary, ukwiki, ukwikibooks, ukwikinews, ukwikiquote, ukwikisource, ukwikivoyage, ukwiktionary, urwiki, urwikibooks, urwikiquote, urwiktionary, uzwiki, uzwikibooks, uzwikiquote, uzwiktionary, vecwiki, vecwikisource, vecwiktionary, vepwiki, vewiki, viwiki, viwikibooks, viwikiquote, viwikisource, viwikivoyage, viwiktionary, vlswiki, vowiki, vowikibooks, vowikiquote, vowiktionary, warwiki, wawiki, wawikibooks, wawikisource, wawiktionary, wikidatawiki, wikifunctionswiki, wikimaniawiki, wowiki, wowikiquote, wowiktionary, wuuwiki, xalwiki, xhwiki, xhwikibooks, xhwiktionary, xmfwiki, yiwiki, yiwikisource, yiwiktionary, yowiki, yowikibooks, yowiktionary, yuewiktionary, zawiki, zawikibooks, zawikiquote, zawiktionary, zeawiki, zghwiki, zh_classicalwiki, zh_min_nanwiki, zh_min_nanwikibooks, zh_min_nanwikiquote, zh_min_nanwikisource, zh_min_nanwiktionary, zh_yuewiki, zhwiki, zhwikibooks, zhwikinews, zhwikiquote, zhwikisource, zhwikiversity, zhwikivoyage, zhwiktionary, zuwiki, zuwikibooks, zuwiktionary
title

Title of the page to associate. Use together with site to make a complete sitelink.

baserevid

The numeric identifier for the revision to base the modification on. This is used for detecting conflicts during save.

Type: integer
summary

Summary for the edit. Will be prepended by an automatically generated comment. The length limit of the autocomment together with the summary is 260 characters. Be aware that everything above that limit will be cut off.

tags

Change tags to apply to the revision.

Values (separate with | or alternative): Automatic update from connected wiki, Connecting-Senses, Czech-Authorities-Sync, InfoboxExport gadget, WE-Framework gadget, WikibaseJS-cli, WikibaseJS-edit, client-automatic-update, client-linkitem-change, contenttranslation, contenttranslation-v2, data-bridge, dataDrainer, distributed-game, gadget-addsenseimage, gadget-draggablesitelinks, gadget-dragndrop, gadget-merge, gadget-move, gadget-moveclaim, gadget-rearrangevalues, openrefine, openrefine-3.4, openrefine-3.5, openrefine-3.6, openrefine-3.7, openrefine-3.8, openrefine-4.0, osm-id-sync, reference-game, sectiontranslation, svwiki-DescriptionGadget, termbox, view-it, wikibase-patcher-v1, wikidata-for-firefox, wikidata-for-web, wikidata-ui, wikimedia-commons-app, wwwyzzerdd
token

A "csrf" token retrieved from action=query&meta=tokens

This parameter is required.
bot

Mark this edit as bot. This URL flag will only be respected if the user belongs to the group "Bots".

Type: boolean (details)
returnto

Page title. If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to the given page, instead of the page that was edited.

Type: page title
Accepts non-existent pages.
returntoquery

URL query parameters (with leading ?). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given query parameters.

Default: (empty)
returntoanchor

URL fragment (with leading #). If saving the edit created a temporary account, the API may respond with an URL that the client should visit to complete logging in. If this parameter is provided, the URL will redirect to a page with the given fragment.

Default: (empty)
language

Language of the label

This parameter is required.
One of the following values: aa, aae, ab, abs, ace, acf, acm, ady, ady-cyrl, aeb, aeb-arab, aeb-latn, af, agq, ak, aln, als, alt, am, ami, an, ang, ann, anp, apc, ar, arc, arn, arq, ary, arz, as, ase, ast, atj, av, avk, awa, ay, az, azb, ba, bag, ban, ban-bali, bar, bas, bat-smg, bax, bbc, bbc-latn, bbj, bcc, bci, bcl, bdr, be, be-tarask, be-x-old, bew, bfd, bg, bgc, bgn, bh, bho, bi, bjn, bkc, bkh, bkm, blk, bm, bn, bo, bpy, bqi, bqz, br, brh, bs, btm, bto, bug, bxr, byv, ca, cak, cal, cbk-zam, ccp, cdo, ce, ceb, ch, chn, cho, chr, chy, ckb, cnh, co, cps, cpx, cpx-hans, cpx-hant, cpx-latn, cr, crh, crh-cyrl, crh-latn, crh-ro, cs, csb, cu, cv, cy, da, dag, de, de-at, de-ch, de-formal, dga, din, diq, dsb, dtp, dty, dua, dv, dz, ee, efi, egl, el, eml, en, en-ca, en-gb, en-us, eo, es, es-419, es-formal, et, eto, etu, eu, ewo, ext, fa, fat, ff, fi, fit, fiu-vro, fj, fkv, fmp, fo, fon, fr, frc, frp, frr, fur, fy, ga, gaa, gag, gan, gan-hans, gan-hant, gcf, gcr, gd, gl, gld, glk, gn, gom, gom-deva, gom-latn, gor, got, gpe, grc, gsw, gu, guc, gur, guw, gv, gya, ha, hak, hak-hans, hak-hant, hak-latn, haw, he, hi, hif, hif-latn, hil, hno, ho, hr, hrx, hsb, hsn, ht, hu, hu-formal, hy, hyw, hz, ia, iba, ibb, id, ie, ig, igl, ii, ik, ike-cans, ike-latn, ilo, inh, io, is, isu, isv-cyrl, isv-latn, it, iu, ja, jam, jbo, jut, jv, ka, kaa, kab, kai, kbd, kbd-cyrl, kbp, kcg, kea, ker, kg, kge, khw, ki, kiu, kj, kjh, kjp, kk, kk-arab, kk-cn, kk-cyrl, kk-kz, kk-latn, kk-tr, kl, km, kn, knc, ko, ko-kp, koi, kr, krc, kri, krj, krl, ks, ks-arab, ks-deva, ksf, ksh, ksw, ku, ku-arab, ku-latn, kum, kus, kv, kw, ky, la, lad, lb, lbe, lem, lez, lfn, lg, li, lij, liv, lki, lld, lmo, ln, lns, lo, loz, lrc, lt, ltg, lua, lus, luz, lv, lzh, lzz, mad, mag, mai, map-bms, mcn, mcp, mdf, mg, mh, mhr, mi, min, mk, ml, mn, mnc, mnc-latn, mnc-mong, mni, mnw, mo, mos, mr, mrh, mrj, ms, ms-arab, mt, mua, mui, mul, mus, mwl, my, myv, mzn, na, nah, nan, nan-hani, nan-hant, nan-latn-pehoeji, nan-latn-tailo, nap, nb, nds, nds-nl, ne, new, ng, nge, nia, nit, niu, nl, nl-informal, nla, nmg, nmz, nn, nnh, nnz, no, nod, nog, nov, nqo, nr, nrm, nso, nup, nv, ny, nyn, nyo, nys, oc, ojb, olo, om, or, os, osa-latn, ota, pa, pag, pam, pap, pap-aw, pcd, pcm, pdc, pdt, pfl, pi, pih, pl, pms, pnb, pnt, prg, ps, pt, pt-br, pwn, qu, quc, qug, rgn, rif, rki, rm, rmc, rmf, rmy, rn, ro, roa-rup, roa-tara, rsk, ru, rue, rup, ruq, ruq-cyrl, ruq-latn, rut, rw, rwr, ryu, sa, sah, sat, sc, scn, sco, sd, sdc, sdh, se, se-fi, se-no, se-se, sei, ses, sg, sgs, sh, sh-cyrl, sh-latn, shi, shi-latn, shi-tfng, shn, shy, shy-latn, si, simple, sjd, sje, sju, sk, skr, skr-arab, sl, sli, sm, sma, smj, smn, sms, sn, so, sq, sr, sr-ec, sr-el, srn, sro, srq, ss, st, stq, sty, su, sv, sw, syl, szl, szy, ta, tay, tcy, tdd, te, tet, tg, tg-cyrl, tg-latn, th, ti, tig, tk, tl, tly, tly-cyrl, tn, to, tok, tpi, tpv, tr, tru, trv, ts, tt, tt-cyrl, tt-latn, ttj, tum, tvu, tw, ty, tyv, tzm, udm, ug, ug-arab, ug-latn, uk, ur, uz, uz-cyrl, uz-latn, ve, vec, vep, vi, vls, vmf, vmw, vo, vot, vro, vut, wa, wal, war, wes, wls, wo, wuu, wuu-hans, wuu-hant, wya, xal, xh, xmf, xsy, yas, yat, yav, ybb, yi, yo, yrl, yue, yue-hans, yue-hant, za, zea, zgh, zgh-latn, zh, zh-classical, zh-cn, zh-hans, zh-hant, zh-hk, zh-min-nan, zh-mo, zh-my, zh-sg, zh-tw, zh-yue, zu
value

The value of the label

Examples:
Set the string "Wikimedia" for page with ID "Q4115189" as a label in English language and report it as pretty printed JSON.
api.php?action=wbsetlabel&id=Q4115189&language=en&value=Wikimedia&format=jsonfm [open in sandbox]
Set the English language label to "Earth" for the item with sitelink enwiki => "Earth".
api.php?action=wbsetlabel&site=enwiki&title=Earth&language=en&value=Earth [open in sandbox]