Skip to content

Add parsed document text, company segments, and OpenFIGI lookups (TJC-2470) - #18

Merged
arcaputo3 merged 4 commits into
mainfrom
tjc-2470-parsed-documents
Sep 10, 2026
Merged

Add parsed document text, company segments, and OpenFIGI lookups (TJC-2470)#18
arcaputo3 merged 4 commits into
mainfrom
tjc-2470-parsed-documents

Conversation

@arcaputo3

Copy link
Copy Markdown
Contributor

Closes TJC-2470.

Quartr confirmed on 2026-09-10 that the parsed slides and reports datasets are enabled for our key. The live OpenAPI spec (https://api.quartr.com/public/v3/openapi.json) also carries two other additions the CLI did not wrap. This PR covers all three.

What's new

  • quartr reports text <id> / quartr slides text <id> fetch Quartr's parsed Markdown (headings and tables preserved). The API returns a CDN textUrl rather than the text, so the command follows it and prints the Markdown on stdout by default. --output PATH writes a file (Saved <path> on stderr, like download), --metadata prints the envelope (documentId, textUrl, updatedAt), --with-api-key is the same opt-in as downloads. download still writes a file by default; both share a new saveURL helper.
  • quartr companies segments <id> lists the /companies/{id}/segments child endpoint. Quartr marks the dataset legacy and it returns 403 on our tier.
  • --openfigis on companies list, and companies resolve recognises an OpenFIGI by shape (BBG000B9XRY4) and queries openfigis instead of tickers.
  • The 403 hint now names companies segments and reports text / slides text (a separately licensed package).
  • Toolchain bumped to Go 1.27.1. The linter on PATH was built with 1.26.2 against a 1.27.1 GOROOT and panicked; CLAUDE.md and the pre-commit config now say to rebuild the linter whenever the toolchain moves.

Verified against the live API

$ quartr reports text 105446 | head -3
# Apple Inc.

## CONDENSED CONSOLIDATED STATEMENTS OF OPERATIONS (Unaudited)

$ quartr slides text 152141 --metadata --format json
{"data":{"documentId":152141,"textUrl":"https://files.quartr.com/document-artifacts/…markdown?ref=VEpD", …}}

$ quartr companies resolve BBG000B9XRY4
id    name       country  matchedTickers
4742  Apple Inc  US       LSE:0R2V,BASE:AAPL,NasdaqGS:AAPL,…

$ quartr companies segments 4742
quartr api error: 403 Forbidden …
hint: 403 means this endpoint is not included in your API tier … `companies segments`, and `reports text` / `slides text` (the parsed documents package).

Docs

README (new Parsed documents and Company segments sections), CLAUDE.md, and the quartr skill: SKILL.md quick card and quirks, commands.md matrix, and a new recipe 3a for reading a filing as Markdown.

Tests

Nine new tests in internal/cli: stdout streaming, --output file write, --metadata without a CDN fetch, text rejected on transcripts, segments child list, openfigis forwarded to companies and dropped elsewhere, FIGI resolve, and the FIGI shape check. go test ./... and golangci-lint run are clean.

🤖 Generated with Claude Code

arcaputo3 and others added 4 commits September 10, 2026 14:24
The linter on PATH was built with Go 1.26.2 while GOROOT is 1.27.1, and
golangci-lint panics type-checking the standard library in that state. Bump
go.mod and the lint target to 1.27, and document that the linter has to be
rebuilt with the same toolchain as the `go` on PATH. CI reads the version from
go.mod so it follows along.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Quartr turned on the parsed slides and reports datasets for our key, and the
live OpenAPI spec carries surface the CLI did not wrap:

- `quartr reports text <id>` / `quartr slides text <id>` fetch the parsed
  Markdown. The endpoint answers with a CDN `textUrl`, so the command follows
  it and prints the Markdown on stdout by default (`--output PATH` to write a
  file, `--metadata` to see the envelope). `download` keeps writing a file by
  default; both share `saveURL`.
- `quartr companies segments <id>` lists the segments child endpoint. Quartr
  marks the dataset legacy and it 403s on our tier, so the hint names it.
- `--openfigis` on `companies list`, and `companies resolve` recognises an
  OpenFIGI by shape and queries `openfigis` instead of `tickers`.
- The 403 hint now lists `companies segments` and `reports text` /
  `slides text`, the latter being a separately licensed package.

Docs: README, CLAUDE.md, the quartr skill (SKILL.md, commands.md, and a new
recipe for reading a filing as Markdown).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The v2.12.0 release binary CI downloads was built with Go 1.26 and refuses a
Go 1.27 target. v2.13.2 is built with go1.27.0 and loads the config unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>

@cbelltjc cbelltjc left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@arcaputo3
arcaputo3 merged commit d12c12e into main Sep 10, 2026
2 checks passed
@arcaputo3
arcaputo3 deleted the tjc-2470-parsed-documents branch September 10, 2026 19:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants