Skip to main content

catalejo: a spyglass drawn in white line art on black

catalejo

tests

catalejo (Spanish): spyglass.

Spain's securities regulator (CNMV) publishes everything listed companies have to disclose, but only through web forms and PDFs. catalejo turns that into clean Python objects, and plugs it into AI agents through an MCP server.

Think of it as a small SEC EDGAR for Spain.

Having had perfect understanding of all things from the very first, to write unto thee in order, that thou mightest know the certainty of those things. (Luke 1:3-4)

catalejo in a terminal: the latest price-sensitive announcements, 176 BBVA filings since 2020, the whole BBVA–Sabadell takeover bid in order, and its outcome read from the CNMV's own PDF. All live data.

>>> import catalejo
>>> for f in catalejo.filings(days=7, kind="IP"):
...     print(f.registered_at, f.issuer, "|", f.title)
2026-11-10 16:20:00+01:00 CONSTRUCCIONES Y AUXILIAR DE FERROCARRILES, S.A | El Consejo de Administración de la Sociedad ha aprobado el Plan Estratégico 2027-2030.
2026-11-09 12:14:00+01:00 ELECNOR, S.A. | Elecnor comunica la propuesta del Consejo de Administración de distribución de un dividendo ...

Install

pip install catalejo            # library + command line
pip install "catalejo[mcp]"     # + MCP server for Claude and other agents
pip install "catalejo[pdf]"     # + text extraction from filed PDFs

Python 3.10+. Or try it without installing anything, with uv:

uvx catalejo filings --days 3 --kind IP

What you can get

Price-sensitive announcements (IP) and other regulatory announcements (OIR), the two channels issuers use to disclose anything that can move the price: results, M&A, takeover bids, guidance, board changes, buybacks...

from datetime import date
import catalejo

catalejo.filings(days=3)                          # everything from the last 3 days, IP + OIR
catalejo.filings(days=30, kind="IP", issuer="cellnex")

# Full history for one company. Filtering by NIF (Spanish tax id) is done
# by the CNMV itself, so years of data come back in a few seconds.
catalejo.filings(since=date(2020, 1, 1), kind="IP", issuer="A64907306")

Each Filing has kind, registered_at (timezone-aware, Madrid), issuer, issuer_nif, category, title, registry_number and document_url.

The text of the filed document:

f = catalejo.filings(days=10, kind="IP", issuer="A64907306")[0]
print(catalejo.document_text(f))     # needs catalejo[pdf]

The securities (ISINs) of an issuer, shares and bonds:

>>> [s for s in catalejo.securities("A64907306") if s.is_share]
[Security(isin='ES0105066007', fisn='CLNX/AC 0.25', cfi='ESVUFB', ...)]

Command line

catalejo filings --days 3 --kind IP                   # latest price-sensitive announcements
catalejo filings --issuer A48265169 --since 2020 --kind IP --format csv > bbva.csv
catalejo securities A64907306 --shares
catalejo text "<document_url of a filing>"            # needs catalejo[pdf]

--format csv or --format json for piping into other tools. catalejo --help for the rest.

Use it from Claude (MCP)

catalejo ships an MCP server with two tools, latest_filings and issuer_filings, so you can ask things like "What price-sensitive news has Cellnex published since 2023? Group it by topic."

Claude Desktop: add this to claude_desktop_config.json (Settings → Developer → Edit Config) and restart the app:

{
  "mcpServers": {
    "catalejo": {
      "command": "uvx",
      "args": ["--from", "catalejo[mcp]", "catalejo", "mcp"]
    }
  }
}

That needs uv. If you'd rather pip install "catalejo[mcp]", use "command": "catalejo", "args": ["mcp"]. If Claude can't find the command, put the full path from which uvx (or which catalejo).

Claude Code: claude mcp add catalejo -- uvx --from "catalejo[mcp]" catalejo mcp

Because the CNMV's search pages are forms that search engines barely index. An agent with web search ends up reading press articles: incomplete, late, and you can't tell what's missing. With catalejo it reads the official register directly: every filing, with its exact time, registry number and a link to the original document. And it can do what web search can't, like going through years of history or across every issuer.

Being a good citizen

catalejo talks only to cnmv.es, sends an identifiable User-Agent, makes at most one request per second and caches responses on disk (~/.cache/catalejo, or set CATALEJO_CACHE_DIR). Filed documents never change, so they are downloaded once. Please keep it that way if you fork it.

Known limitations

  • Price-sensitive announcements (IP) have their own channel since 8 February 2020. Before that, everything was published as hechos relevantes, which catalejo doesn't cover yet.
  • Searching by NIF is fast (the CNMV filters). Searching by name works, but scans every filing in the window, so keep the window short.
  • Times are the CNMV's registration time, to the minute.
  • Filings come in the language the issuer used, which is almost always Spanish.
  • Lists of filings are cached for up to an hour, so a filing registered a few minutes ago may not show up straight away (see Troubleshooting).
  • catalejo reads the CNMV's public web pages. If the CNMV changes them, parsing can break until catalejo is updated. Please open an issue if it does.
  • A few filings (voting rights, annual reports...) link to a CNMV page instead of a PDF. document_text() raises ValueError for those.
  • document_text() extracts the text layer of the PDF. Scanned documents with no text layer come back empty: there's no OCR.
  • No data of its own yet: every call reads the CNMV live (or from the cache). There's no history of when catalejo first saw a filing, only the CNMV's registration time.
  • Early days: the API may still change before 1.0.

Troubleshooting

  • the MCP server needs an extra or document_text() needs pypdf: install the extra, pip install "catalejo[mcp]" or pip install "catalejo[pdf]".
  • A very recent filing is missing: delete the cache folder (~/.cache/catalejo, or whatever CATALEJO_CACHE_DIR points to) and try again.
  • A search by name is slow: it pages through every filing in the window, one request per second. Search by NIF instead, or use a shorter window.
  • HTTP 5xx or timeouts: the CNMV site is having trouble. catalejo already retries a few times; wait a bit and try again.
  • Claude doesn't show the catalejo tools: check that uvx is on your PATH (uvx --version) and restart Claude after editing its config.

Roadmap

  • Price-sensitive and other regulatory announcements, with full history
  • ISINs per issuer, text of filed PDFs
  • MCP server
  • Command line
  • Directors' and managers' share dealings (art. 19 MAR)
  • Net short positions
  • Takeover bids (OPAs): status, price, spread
  • Fund portfolios

Contributing

Fixes and new CNMV sources are welcome. See CONTRIBUTING.md and the issues labelled good first issue.

Data and license

The data comes from the CNMV public registers and remains subject to the CNMV's legal notice: reproduce it faithfully, and if you ever sell it, tell your buyers it's free at cnmv.es. catalejo is not affiliated with or endorsed by the CNMV.

Code: MIT. See LICENSE.

Metadata

Release files for catalejo 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for catalejo 0.1.2
File Size Uploaded Provenance Actions
catalejo-0.1.2.tar.gz 28.8 kB With provenance Details for catalejo-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for catalejo 0.1.2
File Interpreter ABI Platform Actions
catalejo-0.1.2-py3-none-any.whl Python 3 none any Details for catalejo-0.1.2-py3-none-any.whl

Total release size: 49.1 kB

Release files / catalejo-0.1.2.tar.gz

Download URL catalejo-0.1.2.tar.gz
Size 28.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e70746e35649d6167b9a5fe905b1797ba5b91dd9fc19afb3706bb979d698eae6
BLAKE2b-256 checksum
How to use checksums
e92251a0fb54c7e34ff8451d41333f974fbba3709e8dfbb2e0f2316441013a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Release files / catalejo-0.1.2-py3-none-any.whl

Download URL catalejo-0.1.2-py3-none-any.whl
Size 20.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcf4f97bb8bcc8a5a4e9b2c3da02673acbba394620ea03316cb114b4a5d9830a
BLAKE2b-256 checksum
How to use checksums
32ed2649fed38392f236c7c1304151a04e914494c40bb52f436e96819767aa29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

Security for catalejo 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for catalejo-0.1.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page