Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Current events
Recent changes
Random page
Help
Categories
LemonWiki共筆
Search
Search
Appearance
Log in
Personal tools
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Troubleshooting of WikiData API
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
Troubleshooting of WikiData API OR Wikipedia API == How to fix the error Unrecognized value for parameter "props": sitelinks/zhwiki == When I request the API url: https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&props=labels|sitelinks/zhwiki&ids=Q21007575&languages=zh , I met the error message: <pre> { "warnings": { "wbgetentities": { "*": "Unrecognized value for parameter \"props\": sitelinks/zhwiki" } }, "entities": { "Q21007575": { "type": "item", "id": "Q21007575", "labels": {} } }, "success": 1 } </pre> Root cause * The page did not have the property sitelinks/zhwiki Solution * You can change the URL parameter {{kbd|key=<nowiki>sitelinks/zhwiki</nowiki>}} to {{kbd|key=<nowiki>sitelinks</nowiki>}} e.g. https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&props=labels|sitelinks&ids=Q21007575&languages=zh == How to fix the error "Our servers are currently under maintenance or experiencing a technical problem." == When using PHP curl the url {{kbd|key=<nowiki>https://zh.wikipedia.org/w/api.php?action=query&prop=extracts&titles=<title>&explaintext=1&formatversion=2&format=json</nowiki>}} met the following error <pre> Error Our servers are currently under maintenance or experiencing a technical problem. Please try again in a few minutes. See the error message at the bottom of this page for more information. </pre> Solution * Try to send the same request later * Change the URL parameter (default) strict-origin-when-cross-origin to {{kbd|key=<nowiki>origin=*</nowiki>}} e.g. {{kbd|key=<nowiki>https://zh.wikipedia.org/w/api.php?action=query&prop=extracts&titles=<title>&explaintext=1&formatversion=2&format=json&origin=*</nowiki>}}<ref>[https://ithelp.ithome.com.tw/articles/10196319 (30apis) Day 19 : Wikipedia (MediaWiki) API - iT 邦幫忙::一起幫忙解決難題,拯救 IT 人的一天]</ref> == Further reading == * [https://stackoverflow.com/questions/tagged/wikidata-api Highest scored 'wikidata-api' questions - Stack Overflow] * [https://en.wikipedia.org/wiki/Wikipedia:Wikimedia_Foundation_error Wikipedia:Wikimedia Foundation error - Wikipedia] == References == <references /> {{Template:Troubleshooting}} [[Category:WikiData]] [[Category:Open data]]
Summary:
Please note that all contributions to LemonWiki共筆 are considered to be released under the Creative Commons Attribution-NonCommercial-ShareAlike (see
LemonWiki共筆:Copyrights
for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource.
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Templates used on this page:
Template:Kbd
(
edit
)
Template:Troubleshooting
(
edit
)