Introduction

The Lateral API

Pre-populated datasets

Tools

Sign-up for an API Key

arXiv Recommender

The arXiv recommender contains 1M+ academic papers in Physics, Mathematics and Computer Science, it is updated daily.

Key

To get a key, click the Get API Key button at the top right of this page. Fill in your details and you will receive a read-only key for this corpus. It will be under the heading Public corpora API keys.

ID migration note

If you were using the previous API endpoint (arxiv-api.lateral.io) then the format of IDs has changed. It is now an MD5 hash of the URL. So if for example, the previous API ID was http://arxiv.org/abs/1108.3298 then the new ID would be md5('http://arxiv.org/abs/1108.3298') or 159b610ae28bbc86267a03537ab69490.

JSON spec

The recommender responds with an array of objects in the following format:

[
  {
    "id": "00000372672010380c6ba628a298e7de",
    "meta": {
      "id": "00000372672010380c6ba628a298e7de",
      "url": "http://arxiv.org/abs/1102.5675",
      "date": "2011-02-28",
      "title": "Rotational spectroscopy, dipole moment and $^{14}$N nuclear hyperfine   structure of $iso$-propyl cyanide",
      "authors": [
        "Müller, Holger S. P.",
        "Coutens, Audrey",
        ...
      ],
      "summary": "Rotational transitions of $iso$-propyl cyanide, (CH$_3$)$_2$CHCN, also known as $iso$-butyronitrile, were recorded using long-path absorption spectroscopy in selected regions between 37 and 600 GHz. Further measurements were carried out between 6 and 20 GHz employing Fourier transform microwave (FTMW) spectroscopy on a pulsed molecular supersonic jet. The observed transitions reach $J$ and $K_ ...",
      "subjects": [
        "Astrophysics - Instrumentation and Methods for Astrophysics",
        "Astrophysics - Astrophysics of Galaxies",
        "Physics - Chemical Physics"
      ]
    },
    "similarity": 1
  },
  {
    "id": "aa4be58cb8d41b5f9b6aaad4638f9f52",
    "meta": {
      "id": "aa4be58cb8d41b5f9b6aaad4638f9f52",
      "url": "http://arxiv.org/abs/1611.01952",
      "date": "2016-11-07",
      "title": "The high resolution spectrum of methyltrioxorhenium reinvestigated with   new infrared and millimeter-wave measurements",
      "authors": [
        "Asselin, Pierre",
        "Berger, Yann",
        ...
      ],
      "summary": "Following our first paper about high resolution spectroscopy of methyltrioxorhenium (MTO) [Stoeffler et al. PCCP, 13, 854, (2011)], the present study reports a deeper investigation of the ground state, and Re=O antisymmetric (nu_as) and symmetric (nu_s) stretching excited states of both CH3(187Re)O3 and CH3(185Re)O3 isotopologues, thanks to new devices implemented within our consortium. We car ...",
      "subjects": [
        "Physics - Atomic Physics",
        "Physics - Chemical Physics"
      ]
    },
    "similarity": 0.9115979671
  },
  ...
]

(Note: ... has been used to truncate long fields)

Each field of the document object is described below:

FieldTypeDetails
idStringID of the document to be used in /documents/{id}/similar
similarityFloatThe similarity to the input document or text (higher is closer)
meta->urlStringThe URL to the paper on arxiv.org
meta->dateStringThe date it was published in YYYY-MM-DD format
meta->titleStringThe title of the paper
meta->authorsArrayAn array of strings containing the names of the authors
meta->summaryStringA summary of the abstract, first 400 characters
meta->subjectsStringThe categories that the paper is listed in

Usage

Let’s say that you have some text and you want to get arXiv papers that are conceptually similar to the text. This is possible with /documents/similar-to-text. The first thing that you will need to do is get an API key. Once you have that, you can get recommendations in the terminal using the following cURL command:

curl --request POST \
  --url 'https://api-v6.lateral.io/documents/similar-to-text?fields=meta' \
  --header 'content-type: application/json' \
  --header 'subscription-key: YOUR_ARXIV_KEY' \
  --data '{"text":"Machine learning is a subfield of computer science that evolved from the study of pattern recognition and computational learning theory in artificial intelligence. Machine learning explores the construction and study of algorithms that can learn from and make predictions on data."}'

This will return a JSON object as specified above. If you want to pretty print it for testing (and have Python 2.6+) you can pipe the output of the above command to | python -m json.tool.

Now you’ve got some results back from the API you might want to get similar papers for one of the results. To do this you can query using /documents/{id}/similar. Given the ID 26bf36d918affd656d502bd46153adbc which is the ID for this paper we can query the API for similar papers to an ID:

curl --request GET \
  --url 'https://api-v6.lateral.io/documents/26bf36d918affd656d502bd46153adbc/similar?fields=meta' \
  --header 'content-type: application/json' \
  --header 'subscription-key: YOUR_ARXIV_KEY'

To call the API in your programming language of choice, check out the API specification where there are code samples available.

Next section: arXiv API Reference