Hi,
The API mentioned below does not indicate if a link is red (there is no page with that title yet).
Is there any way to get this information via the API’s? If not, can this be taken as a feature request?
cheers,
senthil
Hi,
The API mentioned below does not indicate if a link is red (there is no page with that title yet).
Is there any way to get this information via the API’s? If not, can this be taken as a feature request?
cheers,
senthil
It seems what you get via this API is the raw, unparsed wikitext. You probably want to try the parse API out (see https://www.mediawiki.org/wiki/API:Parsing_wikitext), or query the titles you are interested in directly.
Are you looking for generator=links
?
Thanks @Tgr , generator=links does give the data on which linked titles are missing for a given title.
Is there a way to get the content for the given title and the link information in one single API call?
The below call gives the content for all the titles linked from the “west” title but does not include the content for the “west” title itself.
https://simple.wiktionary.org/w/api.php?format=json&action=query&prop=revisions&rvslots=*&rvprop=content&titles=west&generator=links&gpllimit=max
I don’t think that’s possible.
Example of fetching missing links with sample code recently got added here: https://www.mediawiki.org/wiki/API:Links#Example_2:_Fetch_missing_links.