Skip to main content

edgar_rs/
lib.rs

1//! # edgar-rs
2//!
3//! A Rust client for the SEC EDGAR API.
4//!
5//! EDGAR (Electronic Data Gathering, Analysis, and Retrieval) is the SEC's
6//! system for receiving, processing, and disseminating company filings.
7//!
8//! This client covers the full public EDGAR API:
9//! - Company tickers: CIK-to-ticker mapping
10//! - Submissions: company metadata and filing history
11//! - Documents: individual filing document content
12//! - Company Concepts: XBRL data for a single concept from a company
13//! - Company Facts: all XBRL facts for a company
14//! - Frames: aggregated XBRL data across all companies for a period
15//! - Full-Text Search: search across all filing text content
16//!
17//! All requests are rate-limited to 10 requests per second by default,
18//! as required by the SEC EDGAR fair access policy.
19//!
20//! # Example
21//!
22//! ```no_run
23//! # async fn example() -> edgar_rs::Result<()> {
24//! let client = edgar_rs::ClientBuilder::new("MyApp/1.0 contact@example.com")
25//!     .build()?;
26//!
27//! let tickers = client.get_tickers().await?;
28//! let submission = client.get_submission(320193_u64.into()).await?;
29//! let concept = client.get_company_concept(
30//!     320193_u64.into(), "us-gaap", "Revenues"
31//! ).await?;
32//! # Ok(())
33//! # }
34//! ```
35
36mod cik;
37mod client;
38mod error;
39mod models;
40
41pub use cik::Cik;
42pub use client::{Client, ClientBuilder};
43pub use error::{Error, Result};
44pub use models::{
45    Address, Addresses, CompanyConcept, CompanyFacts, ConceptFacts, Fact, FilingFile,
46    FilingHistory, FilingSet, FormerName, Frame, FrameData, SearchHit, SearchOptions, SearchResult,
47    Submission, Ticker,
48};
49
50#[doc(hidden)]
51pub use models::{EftsHit, EftsHits, EftsResponse, EftsSource, EftsTotal};