An arXiv reference identifier. See the identifier schema.


Id(y, m, n; version=0, legacy_category="")
Id(t::Date, n; version=0, legacy_category="")
Id(id::Id; version=0)

arXiv"2103.17058"  # the arXiv string macro can also be used


  • y: The publication year as an integer. E.g. 2023 and 23 are equivalent.
  • m: The publication month as an integer.
  • n: The ID number, e.g. this number for 2304.00319 is 2304.0319.
  • version: The version of the paper, 0 to indicate "latest".
  • legacy_category: The category used by the old form arxiv identifiers.
  • id: Another Id can be used to create a similar Id with a different version.

A data structure representing an arxiv paper. This contains all of the metadata on the paper which can be obtained via the arxiv API, and can be used to easily download the paper.


The following can be accessed with getproperty, e.g. p.id.

  • id: The Id of the paper.
  • updated: The timestamp of the most recent update.
  • published: The timestamp of the publication.
  • title: The title of the paper.
  • summary: A summary description of the paper (usually the abstract).
  • authors: A Vector{String} listing the paper's authors
  • doi: The digital object identifier of the publication.
  • comment: Usually this lists the number of pages and lists what was included in version changes.
  • primary_category: A string giving the arxiv.org primary category of the paper.
  • categories: A Vector{String} list of all arxiv.org categories to which the paper belongs.
  • link_doi: The DOI in URL form, as a URI or nothing.
  • link_text: The URL of the arxiv.org website for the paper, as a URI or nothing.
  • link_pdf: The URL of the PDF download for the paper, as a URI or nothing.


All constructors generate an HTTP call to the host specified by api (i.e. arxiv.org).

Paper(api, id)


  • api: The Api for talking to arxiv.org. Will use default if omitted (arxiv.org).
  • id: An Id object with the identifier of the paper.
download(p::Paper, out; kw...)

Downloads the paper p to out (e.g. a string or IO). See the documentation for Downloads.download for all available options.

openwith(p::Paper, cmd; wait=false, detach=true, kw...)

Download the PDF of the paper to a temporary file and open it with the command cmd. cmd can either be a string, array of strings or Cmd. If wait=true execution will block until the process returns. If detach=true the command will run in a new process group. Additional keyword arguments are passed to Downloads.download.


p = Paper(arxiv"2303.17626")
openwith(p, "rifle")
openwith(p, "zathura")

Open the landing site for the paper in a browser.

NOTE: This uses xdg-open and only works on linux.


Get the URL for the arxiv-vanity.com site of the paper.


Open the paper in a browser in arxiv-vanity.com.

NOTE: This uses xdg-open and only works on linux.

printid([io::IO,] id::Id)

Print the identifier without the arXiv: prefix.

printid(arXiv"2103.17058")  # prints "2103.17058"

Returns a string giving the identifier without the arXiv prefix.

query([api::Arxiv.Api]; search="", ids=[], max_results=10, start=0)

Find papers with search string search with identifiers ids. Each of search, ids will only be used if non-empty. The returned value is an array of Paper with maximum length max_results.

ids should be an iterable of either Arxiv.Id or strings.


Checks whether the arxiv identifier is for the latest version. This means that the identifier does not specify the version, so that when API calls are made with this identifier, the arxiv server interprets it as the latest version. This will return false for a specific version that happens to be the latest.


Returns the identifier for the latest version. For example latest(arXiv"2303.17626v3") == arXiv"2303.17626".

info([api::Api], ids)

Get the information dictionaries for papers with ids in the iterable ids.



Data structure representing an arxiv API. The default can be created with Api(). Note that most functions that can take an Api as an argument can omit that argument to use the default.

rawquery(URI, api; search_query="", id_list=[], start=0, max_results=0)
rawquery(HTTP.Response, api; kw...)
rawquery(String, api; kw...)
rawquery(api; kw...)

Performs a raw query of the arXiv search API with search arguments given by search_query, id_list, start and max_results.