ဝဳကဳဒေတာ - အခေါင်လုပ်ဗှ် တင်နင်
| ဝဳကဳဒေတာ သွက်ညးဇၞော်မောဝ်တအ်: အခေါင်အရာ တင်နင် |
ပ္ဍဲအခိင်လၟုဟ် ဝဳကဳဒေတာ (Wikidata) ဂှ် နွံကဵု အာဲတမ် (Items) ၁၀၀ သန်း ပြင် ကေုာံ Lexemes ၆၅၀,၀၀၀ ပြင် ပါလုပ်ဒၟံင်တုဲ၊ လၟိဟ်ဂၞန်တအ်ဏအ်ဂှ် ဆက်တုဲ ဂၠိုင်တိုန်ဒၟံင် ဏီရောင်။ သွက်ဂွံ လုပ်ကေတ်စကာ (access) တင်နင် ဒေတာ သီုဖအိုတ်ဏအ်ဂှ် နဲကဲ နွံဒၟံင် ဗွဲမဂၠိုင်ရ— လိက်စံင်ဏအ် ထ္ၜးပျးကဵုလဝ် နဲကဲတအ်ဂှ်တုဲ၊ သွက် ညးမစကာတအ် ညံင်ဂွံ ရုဲစှ်ကေတ် နဲကဲ ခိုဟ်အိုတ် မကိတ်ညဳ ကု ပၟိက်အာတ်မိက် ညးတအ်ဂှ် ရီုဗင် ဖန်ဇန်ကဵုလဝ် ရ။
ပွမရုဲစှ် နဲကဲ လုပ်ကေတ် တင်နင် (access method) ညံင်ဂွံ ကလိဂွံ ဒေတာ မနွံပၟိက် နကဵု နဲကဲ မပြဟ်အိုတ် ကေုာံ ခိုဟ်စိုပ်တရဴအိုတ်၊ သီုဟွံပ္ဍိုက်ကဵု လျိုင် (load) မဟွံမဲကဵုပၟိက် လ္တူ ဝဳကဳဒေတာ ဂှ် ဒှ်အရာ ကိစ္စဇၞော် ဗွဲမလောန်ရ။ မုက်လိက်ဏအ်ဂှ် ရန်တၟအ်လဝ် သွက်ဂွံ ရီုဗင်ကဵု ညံင်ဂွံ ရုဲစှ် ဗီုဏအ် မာန်ရ။
စမစခင်
ကိုပ်ကၠာ ပိုယ် ဟွံဂွံ စ

ဝဳကဳဒေတာ (Wikidata) ဂှ် ကဵုလဝ် တင်နင်နာနာသာ် မဆေင်ကဵု အရာအိုတ်သီု ပ္ဍဲလတူလိုက်ဏအ်ရ။ တင်နင်သီုဖအိုတ်ဂှ် ပတိတ်လဝ် နကဵု လာင်ဇြေန် CC0၊ "အခေါင်အရာ သီုဖအိုတ် ဟွံစွံလဝ်" (No rights reserved) တုဲ၊ သွက်မၞိဟ်အလုံလိုက် ဂွံစကာ (public domain) မဒှ်ရ။
ပြံင်လှာဲ မကတဵုဒှ် လ္တူ API ကေုာံ နဲကဲတၞဟ်တအ် သွက်ဂွံ လုပ်ကေတ် တင်နင် ဝဳကဳဒေတာတအ်ဂှ် ဒးပ္ဍဲကဵု သၞောဝ် အင်တာဖေသ် မခိုင်ကၠိုက် (Stable Interface Policy) ရ။ တင်နင် (Data sources) မနွံ ပ္ဍဲ မုက်လိက်ဏအ်ဂှ် ဟွံဒှ် အရာ မကဵုလဝ် အာမခံ (not guaranteed) ဒဒှ်ရ ဒှ် အင်တာဖေသ် မခိုင်ကၠိုက် ရ။
ဝဳကဳမဳဒဳယာ ပရဝ်ဂျေတ်ဂမၠိုင်
လိက်စံင်ဏအ်ဂှ် ဒှ် ပရူ ပွမလုပ်ကေတ် တင်နင် (accessing data) နူ ပ္ဍဲမ္ၚး ဝဳကဳမဳဒဳယာ ပရဝ်ဂျေတ်ဂမၠိုင် ရ။ ယဝ်ရ မိတ်သဟာဲ နွံပၟိက် မိက်ဂွံ ထ္ၜးပျး တင်နင် နူ ဝဳကဳဒေတာ ပ္ဍဲ ဝဳကဳမဳဒဳယာ ပရဝ်ဂျေတ် မွဲမွဲ - ဒၞာဲ မစကာမာန် parser functions, Lua ကေုာံ/ဟွံသေင်မ္ဂး နဲကဲ သွက် ပ္ဍဲအပ္ဍဲ (internal-only methods) တအ်ဂှ်မ္ဂး - သ္ဒး ဗှ်လ္ၚတ် How to use data on Wikimedia projects ဏအ် ညိ။
နဲကဲစကာ ဒေတာ မခိုဟ်အိုတ်

ပိုဲ ကဵုလဝ် အခေါင် စကာ တင်နင် (Data) ပ္ဍဲ ဝဳကဳဒေတာ နကဵု သၠးသၠးပွးပွး တုဲ ဟွံဒး စုတ်ယၟု အတိုင် သၞောဝ် CC-0 ရ။ ဆဂး ပ္ဍဲ ပရဝ်ဂျေတ် မိတ်သဟာဲဂှ် ယဝ်ရ မိတ်သဟာဲ ချူဗ္ဒိုက် ထ္ၜးလဝ် ဒဒှ်ရ တင်နင်တအ်ဂှ် ကၠုင်နူ ဝဳကဳဒေတာ မ္ဂး ပိုဲ သ္ဍိုက်မၠိုက် ဗွဲမလောန်ရ။ ပွမကၠောန် ဗီုဏအ်ဂှ် ဍေဟ် ရီုဗင် ပကဵု ညံင် ဝဳကဳဒေတာ ဂွံဆက်တန်တဴအာ လံလံတုဲ ပွမကဵုဒေတာ မကြက်ကြက် ကေုာံ မနွံကဵု အရည်အသွဟ် သၠုင်င်ဂှ် ဒှ် အရာ မကဵု အာမခံ မာန် ရ။ တုဲပၠန် ပိုဲလေဝ် ပတိုန်ဂုန် ကေုာံ ပရးဗ္ဒာဲကဵု ပရဝ်ဂျေတ် မစကာ တင်နင် ဝဳကဳဒေတာ မခိုဟ်အိုတ်တအ်ဂှ် ကီုရ။
နဲကဲ မချူဗ္ဒိုက် ထ္ၜး တင်နင် ဝဳကဳဒေတာ (Attributing Wikidata) ဂှ် နွံ အရာ ဗွဲသၟဝ်ဏအ် ဗီုပြင် - "Powered by Wikidata", "Powered by Wikidata data", "Powered by the magic of Wikidata", "Using Wikidata data", "With data from Wikidata", "Data from Wikidata", "Source: Wikidata", "Including data from Wikidata" တအ် ဒှ်တမ်ရ။ တုဲပၠန် မိတ်သဟာဲတအ် စကာ အရာ မဖန်ဇန်လဝ် နကဵု ပိုဲ ready-made files တအ်ဂှ်လေဝ် စကာမာန် ရအဴ။
မိတ်သဟာဲ စကာမာန် လိုဂို ဝဳကဳဒေတာ မထ္ၜးလဝ် လ္တူတေအ်ဂှ်၊ ဆဂး ပ္ဍဲအခိင် မစကာဂှ် လ္ပပ္တိုန်ထ္ၜး လညာတ် ညံင်ရဴ ဝဳကဳဒေတာ ဟွံသေင်မ္ဂး ဝဳကဳမဳဒဳယာ ဖောင်ဒေရှေန် ဇူဒုင်တဲ ဟွံသေင်မ္ဂး ထံက်ဂလာန် ကု ကမၠောန် မိတ်သဟာဲညိအဴ။
မိတ်သဟာဲ ဖန်ဇန်ကဵု ညးစကာ မိတ်သဟာဲ ညံင်ဂွံ တိုန်သ္ပစရိုင် ပရူ တင်နင် မဗၠေတ်ဒၟံင်တအ်ညိ၊ တုဲပၠန် ဖန်ဇန်ကေတ် နဲကဲ သွက်ဂွံ ကလေင်ပလံင် ဗ္ဒိုက် ကု ဂကောံမၞိဟ် မပလေဝ်ဒေတာ ဝဳကဳဒေတာ (Wikidata's editor community) ညိ၊ ဥပမာ - နကဵု Mismatch Finder ရ။ တုဲပၠန် ဒၞာဲ မိတ်သဟာဲ မစုတ် လိက်သ္ပစရိုင် တင်နင် မဗၠေတ်တအ်ဂှ် ပ္ဍဲ Project chat ဂှ် ကလေင်ပရိုင် လဴစဗ္ဒိုက်ကဵုညိအဴ။
နဲကဲစကာ တင်နင် (Data access) မခိုဟ်အိုတ်
ပ္ဍဲအခိင် မလုပ်ကေတ် တင်နင် (Data) ဝဳကဳဒေတာမ္ဂး စွံသတိ အတိုင် နဲကဲစကာ မခိုဟ်အိုတ် ဗွဲသၟဝ်ဏအ်ညိ:
- အတိုင် User-Agent သၞောဝ် ဂှ် ဗက်ညိ – User-Agent header မခိုဟ်မွဲ ပလံင်ကဵုညိ။
- သၞောဝ် ရောဘောတ် (Robot policy) ဂှ် ဗက်ညိ -
Accept-Encoding: gzip,deflateပလံင်ကဵု တုဲပၠန် အခိင်မွဲခဏ လ္ပကဵု အာတ်မိက် (requests) ဂၠိုင်လောန်အာညိ။ - ယဝ်ရ မိတ်သဟာဲ ကလိဂွံလဝ် လိက်သႇေန် (response) '429 Too Many Requests' မ္ဂး၊ သ္ဒး ဒေါအ်ထောအ် ပွမပလံင် အာတ်မိက် (requests) မွဲခဏညိ (Retry-After response header ဂှ် ရံင်ရံင်ညိ)။ တုဲပၠန် သ္ဒး ဗက်ရံင် global rate limits မစွံလဝ် သွက် ဝဳကဳမဳဒဳယာ API သီုဖအိုတ်ဂှ်လေဝ် ရံင်ကေတ် ညိအဴ။
- အခိင်ကာလ နွံအခေါင် (ဥပမာ- ဝဳကဳဒေတာ စၟတ်သမ္တီ အာတ်မိက် (Wikidata Query Service) ကဵု ပၟိက်မ္ဂး)၊ သွက်ဒေတာမိတ်သဟာဲ သ္ဒးဂွံဂှ် ပံက်လဝ် အခိင် (timeout) မအောန်အိုတ် နကဵု လညာတ်မကိတ်ညဳဂှ် စွံကဵုညိ။
- ပ္ဍဲအခိင် မစကာ MediaWiki Action API မ္ဂး၊ parameter
maxlagဂှ် စကာ ကဵု ဂၠိုင်ဂၠိုင်ညိ တုဲ အတိုင် ပရေင်ဒ္ဂေတ် API မချူစွံလဝ် ပ္ဍဲ API:Etiquette ဂှ်လေဝ် ဗက်ရံင်ညိအဴ။
ဂၠာဲ
ဍေဟ်ဂှ် ဒှ် မူရော?
ဝဳကဳဒေတာ ဂှ် ကဵုလဝ် Elasticsearch အိန်ဒေက် (index) မွဲ သွက်ဂွံ ဂၠာဲ တင်နင် သၞောတ်တြေံ (traditional searches) ပ္ဍဲ ဒေတာညးတအ်: Special:Search
ဍေဟ်ဂှ် အခိင်လဵု ဒးစကာရော?
ပ္ဍဲအခိင် မဒးဂၠာဲ တင်နင် (text string) ဟွံသေင်မ္ဂး ပ္ဍဲအခိင် မိတ်သဟာဲ မတီလဝ် ယၟု အရာမဂၠာဲဒၟံင်တအ် ဆဂး ဟွံတီ ဒဒှ်ရ ဒှ် အရာဂှ် ချိုတ်ချိုတ်ပၠိုတ်ပၠိုတ်မ္ဂး စကာ ရံင် (search) ညိ။ ဍေဟ်ဂှ်လေဝ် ကိတ်ညဳ ကု အကာဲအရာ မိတ်သဟာဲ မစၟတ်သမ္တီလဝ် လပါ် ဂၠာဲ (search) နကဵု ဆက်စပ် (relations) မသလအ်သလအ် ပ္ဍဲ ဒေတာတအ်ဂှ် နွံရ။
ပ္ဍဲအခိင် ဆက်စပ် (relations) ပ္ဍဲ ဒေတာမိတ်သဟာဲဂှ် ဒှ် အရာ မကယျာန်ခါန်ဂၠိုင် (complex) မ္ဂး လ္ပစကာ 'ဂၠာဲ' (search) ညိ။
တင်နင်သောဲသောဲဗၠောဲဗၠောဲ
မိတ်သဟာဲ စကာမာန် ဗီုပြင် မဇၞော်မောဝ် တင်နင်ဂၠာဲ (search) နကဵု ဝေါဟာရမဆက်စပ် (keywords) မဆေင်ကဵု ဝဳကဳဒေတာ တအ်ဏအ်ရ: haswbstatement, inlabel, wbstatementquantity, hasdescription, haslabel။ နဲကဲဂၠာဲဏအ်ဂှ် စုတ်စွံလဝ် ပ္ဍဲ CirrusSearch extension page ရ။ ဍေဟ်ဂှ်လေဝ် နွံကဵု API action ဇကုညးကဵုညး မဒှ်ရ။
လိက်ဗွိုက် တင်နင်မဆက်စပ် (Linked Data Interface - URI)
ဍေဟ်ဂှ် ဒှ် မူရော?
အင်တာဖေသ် တင်နင်မဆက်စပ် (Linked Data Interface) ဂှ် ကဵုအခေါင် လုပ်ကေတ် အရာပူဂိုလ် (individual entities) နကဵု URI: http://www.wikidata.org/entity/Q??? ရ။ URI ဗီုဏအ်ဂှ် ညးကော်စ "concept URIs" ရ။ တင်စၟတ်ညိ - concept URIs တအ်ဂှ် စကာ HTTP၊ ဟွံစကာ HTTPS ရ။
ဍေဟ်ဂှ် အခိင်လဵု ဒးစကာရော?
ပ္ဍဲအခိင် မိတ်သဟာဲ မဒးဂွံကေတ် အရာပူဂိုလ် (individual entities) မပေင်စပ်တုဲ မိတ်သဟာဲ မတီလဝ်တုဲဒှ်တအ်ဂှ်မ္ဂး စကာ Linked Data Interface ညိ။
ပ္ဍဲအခိင် မိတ်သဟာဲ ဟွံတီကၠးဒၟံင် ဒဒှ်ရ ဒးစကာ အရာ (entities) မွဲမွဲ - တုဲပၠန် ဂၠာဲ (search) ဟွံသေင်မ္ဂး အာတ်မိက် (query) အာ ကၠာညိ။ ဍေဟ်ဂှ်လေဝ် ဟွံကိတ်ညဳ သွက်ဂွံ အာတ်မိက် တင်နင် အလုံမွဲ တုဲပၠန် ဂၠိုင်လောန်အာမ္ဂး လ္ပစကာညိ။
တင်နင်သောဲသောဲ

"အရာ (Item) ဟွံသေင်မ္ဂး အခိုက် (Property) မွဲမွဲဂှ် နွံကဵု တန်တဴဒၟံင်လၟိုန် URI မဒှ်အရာ မဒက်ပတန်လဝ် နကဵု ဝဳကဳဒေတာ concept namespace ကေုာံ အရာ (Item) ဟွံသေင်မ္ဂး အခိုက် (Property) ID (ဥပမာ - Q42, P31) တုဲပၠန် တင်နင်အဓိက (concrete data) မလုပ်ကေတ်မာန် နကဵု အရာ/အခိုက် ဂှ် တင်နင် URL တအ်ရ။"
"ဒၞာဲ (namespace) သွက် တင်နင် ဝဳကဳဒေတာ မဆေင်ကဵု အရာ (entities) တအ်ဂှ် ဒှ် https://wikidata.org/wiki/Special:EntityData ရ။"
"မိတ်သဟာဲ စုတ် ID အရာမွဲမွဲ ပ္ဍဲ လပါ်ဂတဏအ် (မိတ်သဟာဲ စကာမာန် /entity/ သွက်ဂွံ ချူဗ္ဒိုက်ကဵုဂၠေအ်ဂၠေအ်) ဂှ် ပကဵု ညံင် အရာဂှ် ဂွံဒှ် ဖဵုမသၠးပွး (format-neutral) နကဵု တင်နင် URL ရ။ ပ္ဍဲအခိင် မလုပ်ကေတ် တင်နင် ပ္ဍဲ Special:EntityData namespace ဂှ်၊ ပရဝ်ဂျေတ်မွဲဂှ် စကာ content negotiation သွက်ဂွံ ပဒတုဲ မူလ (output format) ရ။ ယဝ်ရ မိတ်သဟာဲ ပံက်လဝ် တင်နင်ဂှ် ပ္ဍဲ ဗရိုတ်သာ (browser) မ္ဂး၊ မိတ်သဟာဲ ဂွံဆဵုကေတ် လိက် HTML မနွံကဵု တင်နင် ပရူ အရာဂှ်ရ၊ ဟိုတ်နူ ဗရိုတ်သာတအ် စကာ HTML ဂၠိုင်တုဲရ။ ဆဂး၊ လိက်ဒေတာ-မဆက်စပ် (linked-data client) မွဲမ္ဂး ကလိဂွံ တင်နင် အရာဂှ် နကဵု ဗီုပြင် JSON ဟွံသေင်မ္ဂး RDF – မဒှ်အရာ မိတ်သဟာဲ မစၟတ်သမ္တီလဝ် ပ္ဍဲ HTTP Accept: header ဂှ်ရ။"
- ဥပမာ၊ Douglas Adams (ဒေါက်ဂလာသ် အဒါမ်သ်) သွက် concept URIဏအ် ရံင်ညိ - ဍေဟ်ဂှ် ဒှ် အရာမဗဂပ်စၞောန် ကု ပူဂိုလ်မနွံ ပ္ဍဲ လောကဏအ်ဇေတ်တ်၊ ဟွံသေင်ပ္ဍဲ တင်နင် ဝဳကဳဒေတာ မချူထ္ၜးလဝ်ဏီ:
http://www.wikidata.org/entity/Q42
- မိတ်သဟာဲ မဒှ် မၞိဟ်မွဲ မနွံကဵု မတ်ကေုာံ ဗရိုတ်သာမွဲမ္ဂး၊ မိတ်သဟာဲ မိက်ဂွံလုပ်ကေတ် တင်နင်မဆေင်ကဵု Douglas Adams နကဵု လိက်ဗွိုက် concept URI မွဲ နဒဒှ် URL မွဲရ။ ဗီုဂှ် နကဵု HTTP redirect ဂှ် ပကဵု ညံင် client ဂှ် ဂွံဒှ် ဒဒှ်ရ ဒးပလံင်အာ လပါ် တင်နင် URL မနွံကဵု တင်နင် ဝဳကဳဒေတာ မဆေင်ကဵု Douglas Adams ဂှ်ရ: https://www.wikidata.org/wiki/Special:EntityData/Q42။
ပ္ဍဲအခိင် မိတ်သဟာဲ မဒးပၠန်ကဵု content negotiation (ဥပမာ- သွက်ဂွံရံင် တင်နင် မဟွံသေင်ကဵု HTML ပ္ဍဲ ဗရိုတ်သာမွဲ) မ္ဂး၊ မိတ်သဟာဲ စၟတ်သမ္တီကဵု မူလ (format) တင်နင် အရာဂှ် နကဵု မစုတ် တင်ဆက် (extension) မကိတ်ညဳ ကု တင်နင် URL ဂှ်ရ; ဥပမာ - .json, .rdf, .ttl, .nt ဟွံသေင်မ္ဂး .jsonld တအ် ဒှ်တမ်။ ဥပမာ - https://www.wikidata.org/wiki/Special:EntityData/Q42.json ဂှ် ကဵု မိတ်သဟာဲ တင်နင် အရာ (Item) Q42 နကဵု မူလ JSON ရ။
RDF မူလ မဇၞော်ပ္တိတ်လဝ် အောန်ညိ (Less verbose RDF output)
အတိုင်သဘာဝမ္ဂး တင်နင် RDF မကလိဂွံနူ Linked Data interface ဂှ် ဒှ်အရာ မပေင်စပ် ပ္ဍဲဇကုဍေဟ်တုဲ၊ ဍေဟ်တအ်ဂှ် ပၠုပ်စုတ်လဝ် တင်စၟတ်သမ္တီ ပရူ အရာနာနာ မဆက်စပ်ဒၟံင်ကဵု အရာဂှ်လဝ်ရ။ ယဝ်ရ မိတ်သဟာဲ မိက်ဂွံပ္တိတ်ထောအ် တင်နင်တအ်ဂှ်မ္ဂး၊ မိတ်သဟာဲ စုတ်စုတ် query parameter ?flavor=dump ပ္ဍဲ လိက်ဗွိုက် URL မိတ်သဟာဲ မအာတ်မိက်လဝ်တအ်ဂှ် မာန်ရ။
မိတ်သဟာဲ စုတ်စုတ် &flavor= ပ္ဍဲ လိက်ဗွိုက် URL မ္ဂး၊ မိတ်သဟာဲ ထိင်ဒမြော်မာန် ဒဒှ်ရ တင်နင် ဗီုလဵု ဂွံကလေင်ကဵု မဒှ်ရ။
?flavor=dump: ပ္တိတ်ထောအ် တင်စၟတ်သမ္တီ ပရူ အရာနာနာ မဆက်စပ်ဒၟံင် ပ္ဍဲ ဒေတာဂှ်တအ်ရ။?flavor=simple: ကဵုဆ တင်နင် မဍာံစၟတ်တ် (truthy statements) ဟေင် (ဒှ်အရာ မစၟတ်သမ္တီလဝ် ခိုဟ်အိုတ်၊ ဟွံမွဲကဵု qualifiers ဟွံသေင်မ္ဂး references)၊ တုဲပၠန် နွံကဵု တင်ဆက်စပ် ဝဳဗ်သိုက် (sitelinks) ကေုာံ တင်ဂၞင် မူအာဲ (version information) တအ်ရ။?flavor=full(default): "အာဂြူမေန် (argument) 'full' ဂှ် ကလေင်ကဵု တင်နင်သီုဖအိုတ်ရ။ (မိတ်သဟာဲ ဟွံဒးစၟတ်သမ္တီကဵုလေဝ် ဂွံရ၊ မုဟိုတ်ရောဟီုမ္ဂး ဍေဟ်ဂှ် ဒှ်အရာ default မစွံလဝ်တုဲသ္ဇာရ။)"
ယဝ်ရ မိတ်သဟာဲ မိက်ဂွံ တီကၠိုဟ် လှဲလှဲလးလး ဒဒှ်ရ အရာရုဲစှ် (option) မွဲစီဂှ် မုမပါလုပ်ဒၟံင်ရောမ္ဂး၊ မိတ်သဟာဲ လုပ်ရံင် ပ္ဍဲ ကောဒ်တမ် (source code) ဂှ် မာန်ရ။
မူပလေဝ်ဒါန်ဂမၠိုင် ကေုာံ ပွမစွံပကောံ ယာယဳ
"မိတ်သဟာဲ အာတ်မိက်ကေတ် မူပလေဝ်ဒါန် (revisions) မချိုတ်ပၠိုတ် သွက် အရာ (entity) မွဲ နကဵု revision query parameter ဂွံရ: https://www.wikidata.org/wiki/Special:EntityData/Q42.json?revision=112။"
ဗီုပြင် URL ဗွဲသၟဝ်ဏအ်ဂှ် အင်တာဖေသ် ညးလွပ် (user interface) ကေုာံ query service updater တအ် စကာလဝ် အတိုင်လၟေင်င်ရ၊ ဟိုတ်ဂှ်ရ ယဝ်ရ မိတ်သဟာဲ စကာ ဗီုပြင် URL မတုပ်ဒၟံင်ဏအ် မွဲမွဲမ္ဂး၊ မိတ်သဟာဲ ကလိဂွံ သွဟ် မပြဟ်ပြေဟ် (cached) မာန် အခေါင်အရာ နွံဂၠိုင်ရ:
- https://www.wikidata.org/wiki/Special:EntityData/Q42.json?revision=1600533266 (JSON)
- https://www.wikidata.org/wiki/Special:EntityData/Q42.ttl?flavor=dump&revision=1600533266 (RDF၊ မဟွံပါလုပ်ကဵု တင်စၟတ်သမ္တီ ပရူ အရာတၞဟ်တအ်)
သၞောတ် အာတ်မိက် တင်နင် ဝဳကဳဒေတာ
ဍေဟ်ဂှ် ဒှ် မူရော?
"သၞောတ် အာတ်မိက် တင်နင် ဝဳကဳဒေတာ (WDQS) ဂှ် ဒှ် SPARQL endpoint အပိုင် ဝဳကဳဒေတာ ရ။ ဍေဟ်ဂှ် ကလေင်ကဵု သွဟ် သွက် တင်အာတ်မိက် (queries) မခၞံလဝ် နကဵု အရေဝ်ဘာသာ အာတ်မိက် SPARQL (SPARQL query language): https://query.wikidata.org"
ဍေဟ်ဂှ် အခိင်လဵု ဒးစကာရော?
"ပ္ဍဲအခိင် မိတ်သဟာဲ တီလဝ် ဆ လက္ခဏာ တင်နင် မိတ်သဟာဲ မမိက်ဂွံဂွံတအ်ဂှ်ဟေင်မ္ဂး စကာ WDQS ညိ။"
"လ္ပစကာ WDQS သွက်ဂွံဂၠာဲ တင်နင်လိက် (text) ဟွံသေင်မ္ဂး ဂၠာဲနဲကဲဟွံကၠး (fuzzy search) ညိ – FILTER(REGEX(...)) ဂှ် ဒှ် နဲကဲမဟွံဒး (antipattern) မွဲရ။ (ပ္ဍဲ အကာဲအရာ ဗီုဏအ်မ္ဂး စကာ ဂၠာဲ (search) ညိ။)"
ယဝ်ရ တင်နင် မိတ်သဟာဲ မမိက်ဂွံဂွံဂှ် နွံလၟိဟ်ဂၠိုင်လောန် (မဒှ် လၟိဟ်က္ဍိုပ်ကၠံ တၟာဂလိုင် နူကဵု တင်နင် ဝဳကဳဒေတာ သီုဖအိုတ်) မ္ဂး WDQS ဂှ်လေဝ် ဟွံကိတ်ညဳ သွက်ဂွံစကာရ။ (ပ္ဍဲ အကာဲအရာ ဗီုဏအ်မ္ဂး ချပ်စကာ ဒမ် (dump) ညိ။)
တင်နင်သောဲသောဲ
မိတ်သဟာဲ အာတ်မိက် (query) တင်နင် ပ္ဍဲ ဝဳကဳဒေတာ မာန် နကဵု SPARQL endpoint ပိုယ်၊ မဒှ် သၞောတ် အာတ်မိက် တင်နင် ဝဳကဳဒေတာ ရ။ သၞောတ်ရေင်တၠုင်ဏအ်ဂှ် စကာမာန် သီု နဒဒှ် အင်တာဖေသ် ဝဳဗ် (interactive web interface)၊ ဟွံသေင်မ္ဂး စကာ နကဵု ပရဝ်ဂရာမ် (programmatically) နကဵု မပလံင်ဗစိုပ် အာတ်မိက် GET ဟွံသေင်မ္ဂး POST ဇရေင် https://query.wikidata.org/sparql ရ။
သၞောတ် အာတ်မိက် တင်နင် (query service) ဂှ် ခိုဟ်အိုတ် စကာ ပ္ဍဲအခိင် က္ၜင်သွဟ် မိတ်သဟာဲ မရန်တၟအ်လဝ်ဂှ် နွံကဵု ပယျဵုအပိုင်အခြာ ချိုတ်တ်ပၠိုတ်တ် (ဟီုမွဲသာ်ပၠန် - ပ္ဍဲအခိင် မိတ်သဟာဲ နွံကဵု တင်အာတ်မိက် (query) မွဲ မဖျေဟ်လဝ်စိုတ်တုဲ ဒဒှ်ရ ဍေဟ် စၟတ်သမ္တီကဵု တင်နင်သွဟ်ဇကု မတပ်တး) တအ်ဂှ်ရ။ ယဝ်ရ လညာတ်မိတ်သဟာဲ လတူ က္ၜင်သွဟ်ဂှ် ဟွံကၠးဖ္ဍး ကွေဟ်ကွေဟ်မ္ဂး၊ ဗီုပြင် ကမၠောန် မိတ်သဟာဲ မကၠောန် ပ္ဍဲ သၞောတ်အာတ်မိက်ဂှ် တုပ်အာ ကု ပွမဂၠာဲ (search) ဂၠိုင်ရ; မဂၠိုင်ကဵုအလန် မိတ်သဟာဲ ဒးကၠောန် ကမၠောန်မဆက်စပ်ကဵု ပွမဂၠာဲ ဗီုဏအ် ကၠာ သွက်ဂွံ ပခိုဟ်ပတပ်ကဵု တင်အာတ်မိက် (query) မိတ်သဟာဲရ။ ရံင် ပ္ဍဲ ကဏ္ဍ ဂၠာဲ (Search) ညိ။
သၞောတ် အာတ်မိက် တင်နင် ပ္ဍဲ query.wikidata.org ဂှ် ပါလုပ်ဆ ဂရာဖ် အဓိက (main graph) ဝဳကဳဒေတာ ဟေင်ရ။ အရာ (Items) မဆက်စပ် ကု ပရေင်လိက်ပတ် သုတေသန (scholarly articles) တအ်ဂှ် နွံဒၟံင် ပ္ဍဲ သၞောတ် အာတ်မိက် တင်နင် တၞဟ်ခြာမွဲ ပ္ဍဲ query-scholarly.wikidata.org ရ။ သွက်ဂွံ တီ တင်နင် လှဲလှဲလးလးမ္ဂး ရံင် ပ္ဍဲ Wikidata:SPARQL query service/WDQS graph split ညိ။
REST API ဝဳကဳဗေသ်
ဍေဟ်ဂှ် ဒှ် မူရော?
REST API ဝဳကဳဗေသ် (Wikibase REST API) ဂှ် ဒှ် အင်တာဖေသ် မသိုင်ခၞံလဝ် လတူ သဇိုင် OpenAPI မွဲတုဲ၊ ဍေဟ်ဂှ် ကဵုအခေါင် ကုညးလွပ်တအ် သွက်ဂွံ ဆက်စၠောအ်ကၠောန်၊ လုပ်ကေတ် ကေုာံ ပလေဝ်ဒါန် အရာ (items) ကေုာံ တင်စၟတ်သမ္တီ (statements) တအ် ပ္ဍဲ သၞောတ် ဝဳကဳဗေသ် (Wikibase instances) တအ်ရ – စၟတ်သေချာရ၊ ဝဳကဳဒေတာ လေဝ် ပါလုပ်ကီုရ: REST API ဝဳကဳဒေတာ
ဍေဟ်ဂှ် အခိင်လဵု ဒးစကာရော?
REST API ဝဳကဳဗေသ် ဂှ် ၜိုန်ရ နွံဒၟံင် ပ္ဍဲလၟေင်ကမၠောန် မဇၞော်မောဝ်ပတိုန်ဒၟံင် ဏီကီုလေဝ်၊ သွက် ဝဳကဳဒေတာ မ္ဂး ဍေဟ်ဂှ် ရန်တၟအ်လဝ် သွက်ဂွံ သၠာဲစၞး ကမၠောန် Action API ရ၊ မုဟိုတ်ရောဟီုမ္ဂး ဍေဟ်ဂှ် ဒှ် အင်တာဖေသ် မကၠောန်ပတိတ်လဝ် ဗွဲတၟေင် သွက် ဝဳကဳဗေသ်/ဝဳကဳဒေတာ ဟေင်ရ။
အကာဲအရာ မစကာ (use cases) သွက် Action API တအ်ဂှ် ဆက်စပ် စကာဂွံ ပ္ဍဲ REST API ဝဳကဳဗေသ် ကီုရ။ ပ္ဍဲအခိင် ကမၠောန် မိတ်သဟာဲ မပါလုပ် (ဟွံသေင်မ္ဂး ဆက်စပ်) ကု အရာတအ်ဏအ်မ္ဂး စကာဍေဟ်ညိ:
- ပလေဝ်ဒါန် ဝဳကဳဒေတာ
- ကလိဂွံ တင်နင် ဗွဲမတပ်တး မဆေင်ကဵု ဇကုအရာတအ်ဂှ်
ယဝ်ရ က္ၜင်သွဟ် (result set) မိတ်သဟာဲ နွံလၟိဟ်ဂၠိုင်လောန်မ္ဂး လ္ပစကာ REST API ဝဳကဳဗေသ် ညိ။ (ပ္ဍဲ အကာဲအရာ ဗီုဏအ်မ္ဂး ချပ်စကာ ဒမ် (dump) ညိ။)
ယဝ်ရ မိတ်သဟာဲ ဒးဆက်ဖဍန်ဖျေဟ် သွဟ်တင်အာတ်မိက် API မိတ်သဟာဲဏီမ္ဂး၊ REST API ဝဳကဳဗေသ် ဂှ် ဟွံစကာမ္ဂး ခိုဟ်အိုတ်ရ။ ပ္ဍဲ အကာဲအရာ ဗီုဏအ်မ္ဂး၊ ဖျေဟ်ဗီုပြင် ကမၠောန် မိတ်သဟာဲ နဒဒှ် ပွမဂၠာဲ (search) (သွက် Elasticsearch) ဟွံသေင်မ္ဂး ပွမအာတ်မိက် (query) (သွက် WDQS) မ္ဂး ခိုဟ်ဂၠိုင်ရ။
တင်နင်သောဲသောဲ
"REST API ဝဳကဳဗေသ် ဂှ် နွံကဵု လိက်သမ္တီ OpenAPI မစကာလဝ် Swagger ရ။ မိတ်သဟာဲ လ္ၚတ်ရံင် လိက်သမ္တီ ညးဇၞော်မောဝ် (developer documentation) လေဝ် ဂွံကီုရ၊ ဟွံသေင်မ္ဂး စမ်ရံင် endpoints တအ် နကဵု [[၁](https://www.wikidata.org/w/index.php?api=mw-extra&title=Special%3ARestSandbox) REST Sandbox] လေဝ် မာန်ရ။"
Action API မဳဒဳယာဝဳကဳ
ဍေဟ်ဂှ် ဒှ် မူရော?
API ဝဳကဳဒေတာ ဂှ် ဒှ် Action API အပိုင် မဳဒဳယာဝဳကဳ မွဲတုဲ၊ ဍေဟ်ဂှ် ဇၞော်လှဲပတိုန်လဝ် သွက်ဂွံ ပါလုပ် ကမၠောန် (actions) မဆေင်ကဵု ဝဳကဳဗေသ် ဗွဲတၟေင် လ္ၚဵုတအ်ရ: https://wikidata.org/w/api.php
ဍေဟ်ဂှ် အခိင်လဵု ဒးစကာရော?
ပ္ဍဲအခိင် ကမၠောန် မိတ်သဟာဲ မပါလုပ် (ဟွံသေင်မ္ဂး ဆက်စပ်) ကု အရာတအ်ဏအ်မ္ဂး စကာ API ညိ:
- Editing Wikidata
- Getting data about entities themselves such as their revision history
- Getting all of the data of an entity in JSON format, in small groups of entities (up to 50 entities per request).
Don't use the API when your result set is likely to be large. (Consider using a dump in such cases.)
The API is also poorly suited to situations in which you want to request the current state of entities in JSON. (For such cases consider using the Linked Data Interface, which is likelier to provide faster responses.)
Finally, it's probably a bad idea to use the API when you'll need to further narrow the result of your API request. In such cases it's better to frame your work as a search (for Elasticsearch) or a query (for WDQS).
Details
The MediaWiki Action API used for Wikidata is meticulously documented on Wikidata's API page. You can explore and experiment with it using the API Sandbox.
There are multiple Wikibase specific endpoints. Here is an example request:
Bots

You can also access the API by using a bot. For more on bots, see Wikidata:Bots.
Wikibase GraphQL
What is it?
Wikibase GraphQL is a GraphQL API for Wikidata. GraphQL is a flexible data query and manipulation language that enables fetching data declaratively and synthesizing data from multiple sources in a single graph. The Wikibase GraphQL API optimizes for developer experience, discoverability, and efficient data retrieval.
When to use it?
The Wikibase GraphQL API allows more flexible data retrieval in a single request. It aims to reduce load on the Wikidata Query Service by handling common read use cases well:
- Labels of linked entities
- Bulk GET (batch reading Items)
- Search items by statement property and value
Use the Wikibase GraphQL API when you have a well-specified result set in mind, especially when those results involve traversing relationships and requesting labels of linked entities.
Details
You can find the Wikibase GraphQL schema file in the wikibase code repository or generate it from the GraphQL endpoint using tools such as get-graphql-schema.
The easiest way to explore the Wikibase GraphQL API is via interactive GraphQL clients, which provide schema documentation, auto-completion, and immediate feedback. We list two web-based clients below, but any generic GraphQL-conversant client can be used.
- GraphiQL: An interactive GraphiQL client available on doc.wikimedia.org.
- Apollo Sandbox Explorer: A web-based GraphQL explorer provided by Apollo.
Recent Changes stream
What is it?
The Recent Changes stream provides a continuous stream of changes of all Wikimedia wikis, including Wikidata: https://stream.wikimedia.org
When to use it?
Use the Recent Changes stream when your project requires you to react to changes in real time or when you need all the latest changes coming from Wikidata – for example, when running your own query service.
Details
The Recent Changes stream contains all updates from all wikis using the server-sent events protocol. You'll need to filter Wikidata's updates out on the client side.
You can find the web interface at stream.wikimedia.org and read all about it on the EventStreams page.
Wikidata Vector Database
What is it?
The Wikidata Vector Database stores high-dimensional vector representations of Wikidata entities. It enables semantic search based on meaning and context rather than keyword matching, and supports natural-language queries against entities.
When to use it?
Use vector search for exploration purposes, for example, when you want to uncover entities without explicitly knowing their labels, or when you need to narrow a search down to a smaller, more relevant subgraph of Wikidata as a starting point for further research before moving on to more structured tools.
The vector database can also be used in AI/ML pipelines, such as enabling semantic search in RAG workflows or applying vector distances to tasks like classification and other types of analysis.
Details
You can find more information on the Wikidata Vector Database page. The Wikidata Vector Database is available at wd-vectordb.wmcloud.org, and the API documentation can be found at wd-vectordb.wmcloud.org/docs.
Wikidata MCP
What is it?
The Wikidata MCP (Model Context Protocol) provides a set of standardized tools that allow large language models (LLMs) to explore and query Wikidata programmatically. It is designed for agentic AI or AI workflows that need to search, inspect, and query Wikidata, without relying on hardcoded assumptions about its structure or content.
When to use it?
Use the Wikidata MCP when you want to integrate Wikidata directly into a GenAI model or into AI/ML workflows. The MCP provides a set of tools for exploring and accessing Wikidata, but it is limited to read-only use and does not include editing functionality.
Details
The Wikidata MCP is implemented as an HTTP service available at wd-mcp.wmcloud.org. To use it, add https://wd-mcp.wmcloud.org/mcp/ as a connector in your AI client.
Dumps
What are they?
Wikidata dumps are complete exports of all the Entities in Wikidata: https://dumps.wikimedia.org
When to use them?
Use a dump when your result set is likely to be very large. You'll also find a dump important when setting up your own query service.
Don't use a dump if you need current data: the dumps take a very long time to export and even longer to sync to your own query service. Dumps are also unsuitable when you have significant limits on your available bandwidth, storage space and/or computing power.
Details
If the records you need to traverse are many, or if your result set is likely to be very large, it's time to consider working with a database dump: (link to the latest complete dump).
You'll find detailed documentation about all Wikimedia dumps on the "Data dumps" page on Meta and about Wikidata dumps in particular on the database download page.
Local query service
It's no small task to procure a Wikidata dump and implement the above tools for working with it, but you can take a further step. If you have the capacity and resources to do so, you can host your own instance of the Wikidata Query Service and query it as much as you like, out of contention with any others.
To set up your own query service, follow these instructions from the query service team, which include procuring your own local copy of the data. You may also find useful information in Adam Shorland's blog post on the topic.
Tools
- JsonDumpReader is a PHP library for reading dumps.
- A Go library exists for processing Wikipedia and Wikidata dumps.
- You can use wdumper to get partial custom RDF dumps.
Wikidata API (Enterprise)
What is it?
Users of Wikimedia Enterprise can access Wikidata's data through the Enterprise APIs. Community members with mission-aligned use cases may also qualify for exceptional access. Access is read-only; as of May 2026, the endpoints are still in beta.
When to use it?
Use the Enterprise API when your project only needs to read from Wikidata. Enterprise users whose work pulls data from other Wikimedia projects can access direct data about Wikidata entities over the same API. Also, use the Enterprise API when you know your project will read at high volumes, and/or when your project requires or would benefit from having a service-level agreement.
Details
Enterprise users have access to Wikidata endpoints in both the on-demand and realtime APIs.
On-demand endpoints:
Realtime endpoint:
For more information, consult the Wikimedia Enterprise API documentation.