{% extends "layout.html" %}

{% block title %}API{% endblock %}

{% block breadcrumb %}
  <li><a href="/api">API</a>
{% endblock %}

{% block hamburger %}
  {{ macros.singlePageLinks() }}
{% endblock %}

{% block body %}
  <h2>Overview of the <abbr title="Application Programming Interface">API</abbr></h2>
  <p>It is possible to query the Stacks project yourself through an <abbr>API</abbr>. This way you don"t have to scrape the information from the <abbr title="HyperText Markup Language">HTML</abbr> pages and it is consistent with our goal that the content of the Stacks project be as open as possible.
  <p>We can think of several applications:
  <ul>
    <li>developing smartphone apps / mobile versions of the Stacks website;
    <li>extracting meta-information about the Stacks project;
    <!--<li>creating your own graphs;-->
    <li>... (please make suggestions!)
  </ul>
  <p>If you intend to use this <abbr>API</abbr>, please contact us at <a href="mailto:stacks.project@gmail.com">stacks.project@gmail.com</a>. <strong>This interface is not stable, please get in touch to discuss this with us</strong>.
  <p>The current <abbr>API</abbr> has less features than the previous one. If this causes problems, please get in touch. We intend to improve it over time.

  <h2>Structure</h2>
  <p>To get the structure of the Stacks project, one can ask for a <abbr title="JavaScript Object Notation">JSON</abbr> file at
  <pre><code>https://stacks.math.columbia.edu/data/tag/&lsaquo;<em>tag</em>&rsaquo;/structure</code></pre>
  <p>example: <a href="https://stacks.math.columbia.edu/data/tag/0ELT/structure"> <span class="tag">0ELT</span></a>
  <p>For now you need to treat the 9 different parts in the Stacks project separately.

  <h2>Statements</h2>
  <p>There are two different possibilities to get the statement of a tag:
  <ol>
    <li><abbr title="HyperText Markup Language">HTML</abbr>, <em>without</em> proof:
      <pre><code>https://stacks.math.columbia.edu/data/tag/&lsaquo;<em>tag</em>&rsaquo;/content/statement</code></pre>
      <p>example: <a href="https://stacks.math.columbia.edu/data/tag/015I/content/statement"><abbr>HTML</abbr> statement for tag <span class="tag">015I</span></a>

    <li><abbr title="HyperText Markup Language">HTML</abbr>, <em>with</em> proof:
      <pre><code>https://stacks.math.columbia.edu/data/tag/&lsaquo;<em>tag</em>&rsaquo;/content/full</code></pre>
      <p>example: <a href="https://stacks.math.columbia.edu/data/tag/015I/content/full"><abbr>HTML</abbr> statement (with proof) for tag <span class="tag">015I</span></a>
  </ol>
  <p>Because the mathematics is parsed by MathJax, the <abbr>HTML</abbr> output contains raw LaTeX math. It is up to the user to handle this (e.g. either use MathJax, or some image generation tool).
  <p>Previously it was also possible to get the TeX code of a tag. This is not possible at the moment, but if necessary we can implement this again.
{% endblock %}

{% block sidebar %}
  {{ macros.singlePageLinks() }}
{% endblock %}

