There are three options available to access large amounts of data from the LMFDB.
Downloads from search result pages
Every search results page in the LMFDB has "Download" buttons located immediately above and below the list of search results. This is the simplest option, and it allows you to control the records to be downloaded (by specifying search options), the columns to be included (via the "columns to display" drop down menu), and the order of the results (via the "Sort order" drop down menu). There are two main limitations:
- Downloads are currently limited to 100MB and 30 seconds.
- Columns typically cover only a subset of the information available on an object's home page.
This is the preferred option and should meet the needs of most users.
The API
The LMFDB offers an Application Programming Interface (API). This provides an HTTP-interface for directly querying the tables of data that are used to render object homepages. You can construct queries programatically and send them to the LMFDB's webserver, so this method is available both interactively and from any programming language that can request URLs. There are two main limitations:
- Each query is limited to 10,000 results, of which at most 100 can be retrieved in a single request.
- The interface is designed for simple queries; not all queries that can be specified using the search page UI can be expressed using the API.
The API also provides information about the structure of the data tables underlying the LMFDB: it contains descriptions of the tables and their columns, as well as an overview of their sizes.
Direct SQL connection
You can open a direct connection to a read-only copy of the LMFDB's PostgreSQL database, using the SQL Mirror access information below. There are three ways to do this:
- You can exploit standard third-party tools or programming language drivers for working with PostgreSQL databases; these require knowledge of SQL.
- You can use the lmfdb-lite library, which provides a pure Python interface to the SQL mirror using dictionaries, equivalent to that used in the LMFDB source code.
- You can install the LMFDB web front-end locally. This provides a SageMath interface to the LMFDB via the mirror similar to lmfdb-lite and provides access to the entire LMFDB code base, which includes methods that can be used to create python objects corresponding to mathematical objects stored in the LMFDB.
SQL Mirror Access
host | devmirror.lmfdb.xyz |
---|---|
port | 5432 |
dbname | lmfdb |
user | lmfdb |
password | lmfdb |