wikipedia-discovery
Wikipedia discovery
Use the current wiki hostname (e.g. en.wikipedia.org) for all API requests unless you intentionally switch language wiki.
Helping someone learn (user-facing)
When the user wants to learn about something, steer them toward concrete articles (and sections by heading when helpful). In natural language:
- Name articles by title and briefly say why each is relevant to their question.
- Do not paste full URLs, do not use markdown links, and do not bullet raw links—readers use
url_changeon their own; your job in chat is titles + relevance only.
Behind the scenes, when it is time to open the mirror, use message_parent with a full Wikipedia url (optional # section / anchor per below); that string is not for display in the user-visible reply.
I have a phrase / topic — find articles
Search the index, return ranked titles/snippets, optionally narrow namespaces. Prefer REST search for simple JSON cards; use Action API list=search when you need Cirrus options, generators, or wikitext-era fields. Paging: Action list= modules return continue — merge those params on the next request until absent. REST search may use limit / offset where supported. Details: wikipedia-discovery/references/topic-search.md.