Skip to content

Install and set your token

After this page you will have scixplorer installed, an API token in a place the client reads, and one search that works.

Install

scixplorer needs Python 3.10 or later. Its only dependency is httpx. We recommend installing it with uv. To add it to a project managed with uv:

uv add scixplorer

To try it without setting up a project, start Python with scixplorer available:

uv run --with scixplorer python

If you use pip instead:

pip install scixplorer

Installing also gives you the command scix, which searches from the terminal: see Command line.

Set your API token

Every request to SciX needs a personal API token. If you have a NASA/ADS token, you already have one: SciX accepts it as it is.

No token yet? Sign in at scixplorer.org and create one at https://scixplorer.org/user/settings/token.

If you have used the ads package, there is nothing to do. scixplorer reads the token from the places ads did: the environment variables ADS_API_TOKEN and ADS_DEV_KEY, and the files ~/.ads/token and ~/.ads/dev_key.

Otherwise, put the token on the first line of the file ~/.scix/token:

mkdir -p ~/.scix
echo "your-token" > ~/.scix/token
chmod 600 ~/.scix/token

or in the environment variable SCIX_API_TOKEN.

Treat the token like a password. scixplorer never puts it in the repr of a configuration or a client, or in an exception message.

Token management lists every place the client looks and the order it checks them in, and shows how to set a token in code.

Your first search

With the token in place, search:

from scixplorer import Document

paper = Document.get(bibcode="2006MNRAS.372..961K")
paper.title
# -> The host galaxies and classification of active galactic nuclei

Other settings

config holds the other settings too. They are read each time a query runs or a request is sent, so a change applies from then on.

SettingDefaultMeaning
api_url"https://api.scixplorer.org/v1"The API’s base URL.
timeout30.0Seconds allowed for each HTTP request.
max_retries3How many times a failed request is retried (see Errors and limits).
retry_backoff1.0Seconds before the first retry; each later retry waits twice as long.
page_size200Documents requested per search request (at most 2000 are used).
max_inline_bibcodes50Larger bibcode sets are sent to /search/bigquery (see Errors and limits).
library_membership"docs"How “document is in a library” is searched (see Libraries).
collectionNoneLimit open searches to a SciX collection (see Collections).

Next: your first search, step by step.