title: How to get Wikipedia content as text by API?
body: <p>I want to get Wikipedia pages as text.</p>
  
  <p>I looked at the Wikipedia API from here <a href="https://en.wikipedia.org/w/api.php" rel="nofollow noreferrer">https://en.wikipedia.org/w/api.php</a> which says that in order to get pages as text I need to append this to a page address:</p>
  
  <pre><code>api.php?action=query&amp;meta=siteinfo&amp;siprop=namespaces&amp;format=txt
  </code></pre>
  
  <p>However, when I try appending this suffix to a normal page's address, the page is not found:</p>
  
  <pre><code>https://en.wikipedia.org/wiki/George_Washington/api.php?action=query&amp;meta=siteinfo&amp;siprop=namespaces&amp;format=txt
  </code></pre>
  
  <p>Following the instructions from <a href="https://stackoverflow.com/questions/1625162/get-text-content-from-mediawiki-page-via-api">Get Text Content from mediawiki page via API</a>, I tried <code>adding /api.php?action=parse&amp;page=test</code> to the end of the query string. Therefore, I obtained this:</p>
  
  <pre><code>https://en.wikipedia.org/wiki/George_Washington/api.php?action=parse&amp;page=test
  </code></pre>
  
  <p>However, this doesn't work either.</p>