Authentication and API keys
One key works for all four access methods. This page shows how to send it, store it safely and replace it without downtime.
Key in the header
#Every request for a dataset carries the key in the Authorization header, using the Bearer scheme. A key consists of the prefix qk_live_ and 40 further characters. The API only accepts it in the header, not as a parameter in the address. That way it never ends up in server logs or browser history.
The SDK and CLI set the header themselves. They read the key from QK_KEY if you do not pass one.
What works without a key
#A few addresses are open so you can explore the API before you have an account. They do not count against any quota.
| Address | Content |
|---|---|
https://api.quellenkontor.dev/v1/datensaetze | Catalog of all datasets with parameters and endpoints |
https://api.quellenkontor.dev/v1/aenderungen | Changelog |
https://api.quellenkontor.dev/v1/openapi.json | OpenAPI description |
| MCP: initialize, tools/list | Establish the connection and list the tools |
Every other request for a dataset needs a key, even on the Free plan. One exception is the sandbox: three datasets respond without an account too, tightly limited in return.
Sandbox: three datasets without an account
Minimum wage, Public holidays, Contribution ceilings answer a request without the Authorization header, limited to 50 requests a day per IP address (a rolling window, not a fixed calendar day). Useful for a first try in the console or a public widget without a backend of your own. As soon as you send an Authorization header, valid or not, the sandbox no longer applies, and the normal path with a key takes over.
The response is the same as with a key, plus a note in the field hinweise and the header X-Kostenloser-Schluessel. For every dataset and a monthly instead of a daily quota, a free key is worth it, see Quickstart.
Store it safely
#- The key belongs on the server: in an environment variable, or a secret store such as Environment Variables on Vercel or Secrets in GitHub Actions.
- Never in frontend code, mobile apps or public repositories. Anything that runs in the browser can be read by any visitor.
- Files such as
.envbelong in.gitignore. - We only store a hash of the key. That means we cannot show you a lost key again, only let you generate a new one.
Multiple keys
#Create a separate key for every environment and every application, for example "Production", "Staging" and "Development". Your account shows, for each key, when it was last used. The quota applies to the whole account, not per key.
| Plan | Active keys |
|---|---|
| Free | 3 |
| Starter | 5 |
| Pro | 10 |
| Enterprise | 25 |
Rotate keys without downtime
#When an employee leaves, or you rotate keys on a schedule, swap them in four steps without a single request failing:
- Generate a new key in your account. The old one stays active.
- Put the new key in your configuration and redeploy your application.
- Check in your account that the old key is no longer used: the "Last used" column stops advancing.
- Revoke the old key.
Revoke a key
#A revoked key stops working immediately: the next request made with it gets status 401 and the code schluessel_ungueltig. A revocation cannot be undone. Generate a new key afterward.
Authentication errors
#| Status | Code | Meaning |
|---|---|---|
| 401 | schluessel_fehlt | No Authorization header, or no Bearer key in it |
| 401 | schluessel_ungueltig | Key unknown, copied incorrectly or revoked |
Responses with status 401 also carry the header WWW-Authenticate. The MCP server likewise responds with 401 when a key is missing, so clients can recognize that one is needed. All other codes are listed under Errors.
Account and sign-in in the browser
#The account on the website does not use passwords. You sign in with a link sent by email that is valid for 20 minutes and works only once. After that you stay signed in for 30 days. "Sign out" ends the session on every device. Your API keys are unaffected by this: they remain valid until you revoke them.
Something missing or unclear? Write to us and we will extend the docs.