API Keys
All API requests require authentication using an API key. Include your key in theX-API-Key header:
Getting Your API Key
- Sign up at debtstack.ai
- Go to your Dashboard
- Copy your API key from the API Keys section
Key Format
API keys follow the formatds_ followed by 32 hexadecimal characters:
Rate Limits
Rate limits are applied per API key based on your tier:| Tier | Rate Limit | Queries |
|---|---|---|
| Pay-as-You-Go | 60/min | Pay per call |
| Pro | 100/min | Unlimited |
| Business | 500/min | Unlimited |
Rate Limit Headers
Every response includes rate limit information:Handling Rate Limits
When you exceed the rate limit, you’ll receive a429 Too Many Requests response:
Retry-After header for when you can retry.
Credit System (Pay-as-You-Go)
Pay-as-You-Go users pay per API call based on endpoint complexity:| Endpoint Type | Cost | Endpoints |
|---|---|---|
| Simple | $0.05 | /v1/companies, /v1/bonds, /v1/bonds/resolve, /v1/financials, /v1/collateral, /v1/covenants |
| Complex | $0.10 | /v1/companies/{ticker}/changes |
| Advanced | $0.15 | /v1/entities/traverse, /v1/documents/search, /v1/batch |
Credit Packages
Pre-purchase credits for predictable budgeting:| Package | Approximate Queries |
|---|---|
| $10 | ~200 simple queries |
| $25 | ~500 simple queries |
| $50 | ~1,000 simple queries |
| $100 | ~2,000 simple queries |
Checking Credit Balance
Pricing Tiers
Pay-as-You-Go
$0/month + usage
- Pay per API call (0.15)
- 60 requests/minute
- 211 companies
- All basic endpoints
- No monthly commitment
Pro
$199/month
- Unlimited API queries
- 100 requests/minute
- 211 companies
- All basic endpoints
- Email support (48hr)
Business
$499/month
- Everything in Pro, plus:
- 500 requests/minute
- 5 team seats
- Covenant comparison
- Historical bond pricing
- Bulk data export
- Usage analytics
- Priority support (24hr)
- 99.9% uptime SLA
Business-Only Endpoints
These advanced endpoints are exclusively available on the Business tier:| Endpoint | Description |
|---|---|
/v1/covenants/compare | Compare covenants across multiple companies |
/v1/bonds/{cusip}/pricing/history | Historical bond pricing (up to 2 years) |
/v1/export | Bulk data export (up to 50,000 records) |
/v1/usage/analytics | Detailed usage analytics and trends |
Security Best Practices
Use environment variables
Use environment variables
Store your API key in environment variables, not in code:
Rotate keys periodically
Rotate keys periodically
You can regenerate your API key from the dashboard. The old key will be immediately invalidated.
Monitor usage
Monitor usage
Check your usage regularly in the dashboard to detect any unauthorized access.

