Skip to content

API setup

The API base URL is https://spaceindex.io/api/v1. Every data request needs a read key sent as a bearer token.

Set the key in the shell that runs your application:

Terminal window
export SPACE_INDEX_API_KEY='replace-with-your-key'

Then request a small company list:

Terminal window
curl --fail-with-body 'https://spaceindex.io/api/v1/companies?limit=5' \
-H "Authorization: Bearer $SPACE_INDEX_API_KEY" \
-H 'Accept: application/json'

Use returned slugs when requesting a specific company or following relationships between records.

Open the API reference to browse operations, parameters, and response schemas. Client generators can use the OpenAPI document.

The API returns problem details as JSON. A 401 means the key is missing or invalid. A 403 means the key cannot access the requested operation. If a request returns 429, wait for the duration in Retry-After before trying again.

Keep error bodies in application diagnostics, but never include the bearer token.