# Quickstart

> API version: v1

## 1. Get your key

Subscribe to the Premium plan, open your [profile page](https://studyingstocks.com/profile#api-access) and press **Create API key**. Copy the key right away: it is shown only once. Keep it in an environment variable, never in code or in a URL:

```bash
export STUDYING_STOCKS_API_KEY="ss_live_..."
```

## 2. Make a request

Ask for the last five fiscal years of revenue and free cash flow of Cisco:

**curl**

```bash
curl "https://studyingstocks.com/api/v1/companies/CSCO/financials?period=annual&items=revenue,free_cash_flow&limit=5" \
  -H "X-Api-Key: $STUDYING_STOCKS_API_KEY"
```

**Python**

```python
import os
import requests

response = requests.get(
    "https://studyingstocks.com/api/v1/companies/CSCO/financials",
    params={"period": "annual", "items": "revenue,free_cash_flow", "limit": 5},
    headers={"X-Api-Key": os.environ["STUDYING_STOCKS_API_KEY"]},
)
response.raise_for_status()
for row in response.json()["data"]:
    print(row["period"], row["values"])
```

**JavaScript**

```javascript
const response = await fetch(
  "https://studyingstocks.com/api/v1/companies/CSCO/financials?period=annual&items=revenue,free_cash_flow&limit=5",
  { headers: { "X-Api-Key": process.env.STUDYING_STOCKS_API_KEY } },
);
if (!response.ok) throw new Error(await response.text());
const { data } = await response.json();
console.log(data);
```

The response has a `data` array, newest period first, and a `meta` object:

```json
{
  "data": [
    { "period": "FY2026", "period_end": "2026-07-25", "fiscal_year": 2026, "fiscal_quarter": 4,
      "values": { "revenue": 63325000000, "free_cash_flow": 12767000000 } }
  ],
  "meta": { "symbol": "CSCO", "currency": "USD", "period": "annual", "source": "SEC EDGAR",
            "api_version": "v1", "generated_at": "2026-10-16T02:00:00Z" }
}
```

## 3. Explore

- [Companies](https://studyingstocks.com/developers/companies) lists what is covered; [Company profile](https://studyingstocks.com/developers/company-profile) shows a company's coverage.
- [Valuation](https://studyingstocks.com/developers/valuation) returns our fair value per share and the assumptions behind it.
- Watch the [rate limit headers](https://studyingstocks.com/developers/rate-limits) while you build, and handle the [errors](https://studyingstocks.com/developers/errors).
