I have used action=wbsearchentities with type=lexeme in the Ordia Toolforge tool. It has worked but now it no longer works.
Here is a short Python program that reproduces the problem.
import requests HEADERS = { 'User-Agent': 'Ordia', } params = { 'action': 'wbsearchentities', 'format': 'json', 'search': "ankomst", 'language': "da", 'type': 'lexeme', } response = requests.get( 'https://www.wikidata.org/w/api.php', headers=HEADERS, params=params) print(response.ok)
Result: Prints False. And a message with "Our servers are currently under maintenance or experiencing a technical problem." and status code 500.
Expect: Prints True
Disabling "'type': 'lexeme'," yields a non-error result, - but does not search lexemes
I do not recall hearing of any changes in the API, and the documentation at https://www.wikidata.org/w/api.php?action=help&modules=wbsearchentities is still indicating type=lexeme should work.
The below code does not return an error, but does not return a result (it should return L45438).
params = { 'action': 'wbsearchentities', 'format': 'json', 'search': "L:ankomst", 'language': "da", #'type': 'lexeme', }