title: Downloading Jupyter notebook from external URL using CLI
body: <p>I need to download .ipynb-file in a terminal and than run it (using <code>nbconvert</code> or something like that). </p>
  
  <ol>
  <li><p>I tried use <code>wget</code> and <code>curl</code> for this, but I got web page (with tags and Javascript code) instead of runnable Notebook. </p></li>
  <li><p>Then I used <a href="https://github.com/jupyter/jupyter/wiki/Jupyter-Notebook-Server-API" rel="noreferrer">Jupyter REST API</a>. To get a notebook's content I used <code>/api/contents/&lt;path&gt;/&lt;file&gt;</code> I.e. I simply changed <code>notebooks</code> to <code>api/contents</code> in URL. I got a content of the notebook with some additional text (I'll have to filter it later), and... in a form of one line. So, I have a lot of work to convert this one line into a working notebook.</p></li>
  </ol>
  
  <p>Is it possible to download Jupyter notebook via terminal and to get working .ipynb-file (the same as file can be downloaded by <code>download as .ipynb</code> in Jupyter Web UI).</p>