
Wikipedia API: Get Market Overviews for Any Industry in Seconds
Wikipedia's API is one of the most underrated data sources. Free, fast, no auth — and it covers virtually every industry. Search Any Topic curl 'https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch=electric+vehicles&format=json&srlimit=5' Returns: page titles, snippets, word counts, timestamps. Get Page Content curl 'https://en.wikipedia.org/w/api.php?action=query&prop=extracts&exintro&titles=Electric_vehicle&format=json' Node.js Example async function wikiSearch ( query , limit = 5 ) { const url = `https://en.wikipedia.org/w/api.php?action=query&list=search&srsearch= ${ encodeURIComponent ( query )} &format=json&srlimit= ${ limit } &origin=*` ; const res = await fetch ( url ); const data = await res . json (); return data . query . search . map ( r => ({ title : r . title , snippet : r . snippet . replace ( /< [^ > ] +>/g , '' ), wordcount : r . wordcount , url : `https://en.wikipedia.org/wiki/ ${ r . title . replace ( / /g , ' _ ' )} ` })); } const results = await wik
Continue reading on Dev.to Webdev
Opens in a new tab



