API Console
Getting Started
Make a request
Use the console above or any HTTP client.
Authentication
All API requests require an API key sent as a Bearer token in the Authorization header:
Authorization: Bearer sk_live_your_api_key
• Keys are generated from the dashboard
• Store your key securely — it's shown only once at creation
• You can create multiple labeled keys for different apps
• Revoke keys from the dashboard at any time
Endpoints
Base URL: https://api.belmontbnb.com
Weather Data
Real-time weather alerts, current conditions, and forecasts from NOAA/NWS.
/v1/weather/alerts
Active weather alerts. Optionally filter by state.
| Param | Type | Description |
|---|---|---|
| state | string | Two-letter state code (e.g. CA, TX) |
| limit | integer | Max results (1-1000, default 50) |
View code samples
curl -s -H "Authorization: Bearer sk_live_YOUR_KEY" \
"https://api.belmontbnb.com/v1/weather/alerts?state=CA&limit=5"
/v1/weather/current
Current weather conditions.
View code samples
curl -s -H "Authorization: Bearer sk_live_YOUR_KEY" \ "https://api.belmontbnb.com/v1/weather/current?state=CA&limit=5"
/v1/weather/forecast
Weather forecast data.
View code samples
curl -s -H "Authorization: Bearer sk_live_YOUR_KEY" \ "https://api.belmontbnb.com/v1/weather/forecast?state=CA&limit=5"
SEC EDGAR
Search SEC-registered companies and access filings data.
/v1/edgar/companies
Search companies by ticker or name.
| Param | Type | Description |
|---|---|---|
| query | string | Search by ticker (NVDA) or company name |
| limit | integer | Max results (1-1000, default 50) |
View code samples
curl -s -H "Authorization: Bearer sk_live_YOUR_KEY" \ "https://api.belmontbnb.com/v1/edgar/companies?query=AAPL&limit=5"
/v1/edgar/filings
Look up company filings by ticker and form type.
| Param | Type | Description |
|---|---|---|
| ticker | string | Stock ticker (required) |
| form_type | string | 10-K, 10-Q, 8-K, etc. |
| limit | integer | Max results (1-200, default 20) |
View code samples
curl -s -H "Authorization: Bearer sk_live_YOUR_KEY" \ "https://api.belmontbnb.com/v1/edgar/filings?ticker=AAPL&form_type=10-K"
SQL Query Engine
Pro & EnterpriseWrite custom SQL queries against any dataset. Powered by DuckDB.
/v1/sql
Execute a read-only SQL query.
| Field | Type | Description |
|---|---|---|
| query | string | SELECT statement (required) |
Available tables: weather, edgar
View code samples
curl -s -H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"query":"SELECT * FROM weather LIMIT 5"}' \
"https://api.belmontbnb.com/v1/sql"
Dataset Schemas
Weather
properties.event string Event type (e.g. "Severe Thunderstorm") properties.severity string Severity (Severe, Moderate, Minor) properties.areaDesc string Affected area description properties.headline string Full headline properties.senderName string Issuing NWS office properties.sent datetime Issue time properties.expires datetime Expiration time
SEC EDGAR
cik_str integer SEC CIK number ticker string Stock ticker symbol title string Company legal name
Error Codes
| Status | Code | Meaning | Fix |
|---|---|---|---|
| 401 | missing_auth | No Authorization header | Add Authorization: Bearer sk_live_... |
| 401 | invalid_key | API key not found or revoked | Generate a new key from the dashboard |
| 402 | no_plan | No active plan tied to account | Select a plan from the billing page |
| 429 | rate_limited | Rate limit exceeded | Wait for the window to reset or upgrade your plan |
| 500 | internal_error | Server error | Retry later or contact support |
Rate Limits
Rate limits are enforced per API key on a sliding 1-hour window. Responses include these headers:
X-RateLimit-Limit: 10000 X-RateLimit-Remaining: 9842 X-RateLimit-Reset: 1620
| Header | Description |
|---|---|
| X-RateLimit-Limit | Max requests allowed per hour |
| X-RateLimit-Remaining | Requests remaining in current window |
| X-RateLimit-Reset | Seconds until the window resets |
FAQ
How do I get an API key?
Sign up for an account, then create a key from your dashboard.
What if I lose my API key?
You can't retrieve it — generate a new one from the dashboard and revoke the old one.
How fresh is the data?
Weather data is ingested hourly from the NWS API. EDGAR company data is refreshed on the same schedule. Check the response timestamps for exact freshness.
Can I use the SQL endpoint on the Free plan?
The SQL endpoint requires Pro or Enterprise. The Free plan includes REST endpoints with 100 req/hr.
What happens if I exceed my rate limit?
Requests return HTTP 429. The limit resets on a sliding 1-hour window. Upgrade to a higher tier for more capacity.