API Key Format
Valendata API keys follow a fixed prefix pattern so you can identify them at a glance:vd_sk_. Pass the key exactly as shown when it was created — never shorten or modify it.
Adding the Authorization Header
Include theAuthorization header on every request:
Authentication Errors
The API returns one of two HTTP error codes when authentication fails:
Error responses use a
detail field:
Code Examples
- curl
- Python
- Node.js
Getting Your API Key
1
Open Settings
Go to app.valendata.com, sign in, and navigate to Settings → API Keys (
/settings/api-keys).2
Create a new key
Click Create key, give it a descriptive name (for example,
production-scraper or ci-pipeline), then click Create secret key.3
Copy and store the key
The full key value is shown once immediately after creation. Copy it now and store it securely. After closing the dialog only the short prefix (e.g.
vd_sk_xxxxxxx...) is visible in the table.Revoking a Key
To revoke a key, click the trash icon next to it in the Settings → API Keys table and confirm. Revocation is instant — all requests using that key will return401 immediately.
Security Best Practices
Store keys in environment variables
Store keys in environment variables
Never hard-code an API key in your source files. Read it from an environment variable at runtime:Access it as
process.env.VALENDATA_API_KEY (Node.js) or os.environ["VALENDATA_API_KEY"] (Python).Never commit keys to source control
Never commit keys to source control
Add your
.env file to .gitignore before your first commit. If you suspect a key was ever committed, treat it as compromised, revoke it and generate a new one immediately.Rotate keys regularly
Rotate keys regularly
Create a replacement key in the dashboard, update your environment, then revoke the old key. The transition takes under a minute and causes no downtime if done in that order.
Use separate keys per environment
Use separate keys per environment
Issue one key for local development, one for staging, and one for production. This limits exposure if a key leaks and lets you revoke a single environment without affecting others.