Welcome to Datanab!

The ultimate number database!

Accessing values on the website

The easiest way to find what you want is to use the search bar located in the top right of the webpage. Just enter the name of what you want to find. All values stored on this website have a corresponding "subject". For example, "density of water" and "thermal conductivity of water" would both share the "water" subject. Additionally, all of the subjects are organized into general categories. If you would like to view a litst of all subjects, click on the "categories" link at the top of the page.


Using the API

This site contains a lot of data that can either be viewed directly on the site or be accessed with an API. The API has the following url endpoints.

https://www.datanab.net/api/ # get everything
https://www.datanab.net/api/?search=<name> # search for entries
https://www.datanab.net/api/categories/ # get all categories
https://www.datanab.net/api/subjects/ # get all subjects
https://www.datanab.net/api/value/<id> # get a single entry

In the endpoints, <name> is replaces with the name of value you would like to look up and <id> is the primary key id that is unique to each entry in the database. In order to find the primary key of an entry, visit the number detail page. You can also view the api page directly through the web browser, thanks to Django Rest Framework. Check it out for yourself. Keep in mind that using the search functionality will return a list of json objects even if only a single entry matches the search parameters.

Example Script

Here is an example script (in Python) to show you just how easy it is to use the API.

import requests
request = requests.get("https://www.datanab.net/api/value/c7113c91-da8a-40cd-bbc4-f495c208f84a")
data = request.json()
name = data['name']
value = data['value']
unit = data['unit']
print("{} is {} {}".format(name, value, unit))