# Line-item picker (QuantSet API)

> Fetch only chosen statement metrics (e.g. revenue, net_income, free_cash_flow, total_debt) across multiple US or global tickers in one compact call.

> ## For AI agents
> The QuantSet API is at https://api.quantset.dev. Send the key in the `X-API-Key` header. The sandbox key `mw_demo` needs no signup and reads the sample listings.
> No key yet? An agent can open an account on its own: https://api.quantset.dev/skill.md
> Connect an MCP client to https://api.quantset.dev/mcp. Client setup is at https://api.quantset.dev/agents.md.
> Start with https://api.quantset.dev/llms.txt or read the full reference at https://api.quantset.dev/llms-full.txt. The OpenAPI file is https://api.quantset.dev/openapi.json. Add `.md` to any docs URL to get that page as Markdown.

`POST https://api.quantset.dev/api/v1/financial-statements/line-items` · `project_financial_line_items`

Send a key in the `X-API-Key` header.
Add `format=csv` to get a UTF-8 table.
Price: 3 credits for every 4 periods returned, counted for each company and statement.

## Research questions

### How can I compare revenue, cash flow and debt for two companies in one call?

```http
POST https://api.quantset.dev/api/v1/financial-statements/line-items
Content-Type: application/json

{
  "line_items": [
    "revenue",
    "net_income",
    "free_cash_flow",
    "total_debt"
  ],
  "period": "annual",
  "limit_per_instrument": 2,
  "tickers": [
    "us:NVDA",
    "us:AAPL"
  ]
}
```

Send the tickers and line_items arrays in the JSON body. Match each result by instrument_id, report_period and currency before reading values.

### How can I compare quarterly cash generation without downloading every statement field?

```http
POST https://api.quantset.dev/api/v1/financial-statements/line-items
Content-Type: application/json

{
  "tickers": [
    "AAPL",
    "MSFT"
  ],
  "line_items": [
    "revenue",
    "free_cash_flow"
  ],
  "period": "quarterly",
  "limit_per_instrument": 4
}
```

Match cash flow and revenue by issuer, report_period and currency. Check the statement period basis before forming a margin from the two figures.

## Reading the results

A debt balance is measured at a date, while revenue and free cash flow cover a period. Use that distinction when calculating ratios.


## Coverage and limits

Only selected metrics are returned. A null requested metric leaves that comparison incomplete even if other metrics exist for the period.


## Parameters

- `snapshot_id` (string, optional): Pin the request to one immutable snapshot so a read across several pages stays consistent.
- `format` (json | csv, optional): Return a JSON page or UTF-8 CSV rows.
- `X-Max-Credits` (integer, 0 to 999,999,999,999, optional, in header): Refuse the request if its maximum charge exceeds this ceiling.
- `X-Workflow-Id` (string, optional, in header): Optional printable identifier for grouping charges in a research workflow.

## Response fields

- `instrument_id` (string): The listing's ID: a market prefix, a colon, then the ticker. For example us:NVDA, global:SHEL.L, crypto:BTCUSDT or index:SPX.
- `report_period` (string)
- `period` (annual | quarterly | ttm): The reporting period: annual or quarterly.
- `currency` (string): The currency the amounts on this row are in.
- `values` (object): The statement's lines, keyed by name. A line that could not be confirmed is null.

## Example

```
curl -X POST 'https://api.quantset.dev/api/v1/financial-statements/line-items' -H 'X-API-Key: YOUR_API_KEY' -H 'Content-Type: application/json' --data '{"line_items":["revenue","net_income","free_cash_flow","total_debt"],"period":"annual","limit_per_instrument":2,"tickers":["us:NVDA","us:AAPL"]}'
```

## Responses

- 200 Successful Response
- 400 Supply one credential.
- 401 Supply a valid API key.
- 402 Reduce the request ceiling or refill your credits.
- 403 Your key does not have the required access.
- 409 Start the read again with the current snapshot.
- 413 Reduce the size of the request body.
- 422 Correct the named parameter and retry.
- 429 Wait for Retry-After seconds.
- 500 The request could not be completed.
- 503 Retry safe reads after a short delay.

## Which statements endpoint to use

- `/api/v1/financial-statements/{kind}` (Financial statements): One statement for up to 100 companies, on one standard set of lines. Use it to compare companies or build a time series.
- `/api/v1/financial-statements/all` (All three financial statements): All three statements for one company in a single call.
- `POST /api/v1/financial-statements/line-items` (Line-item picker): Only the lines you name, across a list of companies. The smallest response.
- `/api/v1/financial-statements/as-reported` (As-reported XBRL statements): The lines exactly as the company filed them, without standardization. Use it when you need the filing's own wording.

## Questions

**What does Line-item picker cost?** 3 credits for every 4 periods returned, counted for each company and statement. A request that fails costs nothing.

**Which plan includes it?** Every account. Free credits, credit packs and subscriptions all read this data.

**Can an AI agent use this?** Yes. An agent calls it over HTTP like any client. Add .md to this page's address for a version written for agents.

**What does null mean in the response?** The value could not be confirmed. It is never a zero, so treat it as missing in your own calculations.

Group: Fundamentals and screening
Docs page: https://quantset.dev/docs/api/financial-statements-line-items-post
Integrations & Ecosystem: https://quantset.dev/integrations (Claude/Cursor MCP, LangGraph, PydanticAI, CrewAI, Agno, Vercel AI SDK, Mastra, Sheets =QUANTSET(), Excel, Notion & x402)
Full API guide: https://api.quantset.dev/llms-full.txt
