# Getting started

> The quickest ways to start using the data of the Spare Cores Navigator, with an example for each.

The Spare Cores Navigator data is open, and you can start using it in a few
minutes -- with or without writing code.

## Pick your path

| I want to… | Use | First result |
| ---------- | --- | ------------ |
| find or compare servers, without code | the [Web UI](#browse-the-web-ui) | in a minute |
| build the data into a tool | the [HTTP API](#query-the-api) | one command |
| analyze the whole dataset | the [SQLite database](#download-the-database) | one download |
| ask an AI assistant | the docs as [plain Markdown](#use-ai-tools) | one prompt |

## Browse the Web UI

Open the [server listing](https://sparecores.com/servers) on sparecores.com,
set your requirements in the filters on the left, e.g. at least 8 vCPUs and
32 GB of memory, and sort the results by price, or by performance and
cost-efficiency. The [Web UI](https://docs.sparecores.com/web-ui.md) guide covers each step:
[finding servers](https://docs.sparecores.com/web-ui/listings.md), [comparing them](https://docs.sparecores.com/web-ui/compare.md),
[the Advisor](https://docs.sparecores.com/web-ui/advisor.md), which recommends servers for a workload
compared to a server you use today, and [prices](https://docs.sparecores.com/web-ui/prices.md).

## Query the API

The API needs no authentication for most of its endpoints. For example, the 3
cheapest server types with at least 8 vCPUs and 32 GB of memory, by their
on-demand price:

```shell
curl -G https://keeper.sparecores.net/servers \
  -d vcpus_min=8 \
  -d memory_min=32 \
  -d best_price_allocation=ONDEMAND_ONLY \
  -d limit=3
```

Each server type comes with its specs, its lowest prices and its benchmark
scores. The [API examples](https://docs.sparecores.com/api/examples.md) go further, e.g. ranking servers by a
benchmark or looking up one server's prices, and the [API](https://docs.sparecores.com/api.md) reference
covers every endpoint and parameter, with a built-in API client to try them
right from your browser.

## Download the database

The Data Wrapper, the `sparecores-data` Python package, downloads the whole
database as a single SQLite file (about 40 MB to download, 1.3 GB once
imported), e.g. to count the active server types of each vendor:

```shell
pip install sparecores-data
sc-data download sc-data.db
sqlite3 sc-data.db "
  SELECT vendor_id, COUNT(*) FROM server
  WHERE status = 'ACTIVE' GROUP BY vendor_id"
```

The [SQLite](https://docs.sparecores.com/sqlite.md) page covers querying it from Python, and more example
queries.

## Use AI tools

AI assistants and coding agents can read the docs as plain Markdown,
following the [llms.txt](https://llmstxt.org/) convention:

- [llms.txt](https://docs.sparecores.com/llms.txt): an index of all pages, plus
  the machine-readable resources, such as the OpenAPI specification of the API,
  the database schema in SQL, and the database dump
- [llms-full.txt](https://docs.sparecores.com/llms-full.txt): the full content
  in a single file

Each page is also available as Markdown by adding `.md` to its URL, e.g.
[overview.md](https://docs.sparecores.com/overview.md) for the Overview.

For example, ask your assistant:

> Read https://docs.sparecores.com/llms.txt, then use the Spare Cores Navigator
> API to find the cheapest server types with at least 8 vCPUs and 32 GB of
> memory in Europe, and compare their benchmark scores.

## Key concepts

- **Vendor, region and zone:** a vendor (cloud provider) offers its server
  types in regions, which consist of availability zones. Prices can differ by
  region and zone.
- **Server type:** a machine size a vendor offers, such as AWS `t4g.2xlarge`,
  identified by its vendor and server ID. `api_reference` is its name in the
  vendor's API.
- **Allocation:** on-demand servers run until you stop them; spot servers are
  cheaper, but the vendor can take them back at any time.
- **Prices:** hourly, in the vendor's currency in the database, and in USD
  by default in the API. See [Understand prices](https://docs.sparecores.com/web-ui/prices.md).
- **Benchmark scores:** the results of the [benchmark workloads](https://docs.sparecores.com/benchmarks.md)
  run on each server type. The [SCore](https://docs.sparecores.com/glossary.md#score) is its CPU speed, and
  the API's `score_per_price` divides it by the hourly price, for comparing
  cost-efficiency.

The [Glossary](https://docs.sparecores.com/glossary.md) explains the other terms, and the
[Schemas](https://docs.sparecores.com/schemas.md) every field.

## Keeping up to date

The data is updated about once or twice an hour:

- The API serves the current version, and says which one in the
  `SC-Data-Hash` and `SC-Data-Published-At` headers of every response, and in
  `GET /healthcheck`. To read several tables of the same version, use its
  snapshots (see [Data versions and snapshots](https://docs.sparecores.com/api.md#data-versions-and-snapshots)).
- The Data Wrapper keeps the database up to date in Python, and
  `sc-data download` gets the current version.
- The [status page](https://status.sparecores.com) shows whether the updates
  ran on time, and the uptime of the API and the website.

## Before you build on it

- **API limits:** the API is free to use under a fair use policy, with
  300 credits per minute per IP address or user (see
  [Rate limiting](https://docs.sparecores.com/api.md#rate-limiting)). Some endpoints, such as the
  snapshots, need a free personal API key, created in your account on
  sparecores.com. For higher limits or commercial use, see
  [Fair use and commercial use](https://docs.sparecores.com/api.md#fair-use--commercial-use).
- **Licenses:** the code is open source under MPL 2.0, the raw data is under
  CC BY-SA 4.0, and the compiled database under BSL 1.1. See
  [Licensing](https://docs.sparecores.com/overview.md#licensing) for the details.

## Common tasks

- **The cheapest server for given specs:** the Web UI's
  [server listing](https://docs.sparecores.com/web-ui/listings.md), or the API's `/servers` sorted by
  `min_price` (its default).
- **The prices of a server in each region:** the server's page on
  sparecores.com, e.g. [AWS t4g.2xlarge](https://sparecores.com/server/aws/t4g.2xlarge),
  or the API's `/server/{vendor}/{server}/prices`.
- **The benchmark scores of a server:** the same page, or the API's
  `/server/{vendor}/{server}/benchmarks`.
- **Servers with the fastest single core:** in the Web UI's listing, pick
  PassMark's
  [CPU Single Threaded Test](https://docs.sparecores.com/benchmarks/passmark.md#passmark-cpu_single_threaded_test)
  with **Select Benchmark** and sort by the **BENCHMARK** column; or see the
  [API](https://docs.sparecores.com/api/examples.md#rank-servers-by-a-benchmark) and
  [SQL](https://docs.sparecores.com/sqlite.md#example-the-fastest-single-core) examples.
- **Similar servers at other vendors:** the API's
  `/server/{vendor}/{server}/similar_servers/{by}/{num}`.
- **Storage and traffic prices:** the API's `/storage_prices` and
  `/traffic_prices`, or the `storage_price` and `traffic_price` tables.

## Getting help

If the API or the website seems down, or the data out of date, check the
[status page](https://status.sparecores.com) first.

Open an issue in the GitHub repository of the part you have a question about:

- the data, e.g. a missing server or a wrong price:
  [`sc-crawler`](https://github.com/SpareCores/sc-crawler/issues)
- the benchmark workloads and their results:
  [`sc-images`](https://github.com/SpareCores/sc-images/issues)
- the API: [`sc-keeper`](https://github.com/SpareCores/sc-keeper/issues)
- the Web UI: [`sc-www`](https://github.com/SpareCores/sc-www/issues)
- the Python package: [`sc-data`](https://github.com/SpareCores/sc-data/issues)

If you're not sure where it belongs, or would rather talk to us directly,
[contact Spare Cores](https://sparecores.com/contact). We're always happy to
hear from you.
