Six runnable workflows — each queries multiple datasets in one agent loop and costs fractions of a cent. Copy client.py below, set your token, and run.
All examples share a minimal API client — client.py. Save it in the same directory as the example script, set your token, and run.
export MICROQUERY_TOKEN=your_token
Get a token at microquery.dev/docs.
Cross-references four independent datasets to build a complete picture of a public company. SEC EDGAR provides audited financials — revenue trend, net income, debt, cash. FEC campaign finance exposes political donation patterns from employees and PACs. Sanctions screening checks the U.S. Consolidated Screening List for counterparty risk. FRED macro data gives the interest rate and GDP context for the reporting period.
Sample run: python3 company_diligence.py --company "Apple" --ticker AAPL
Pulls ~20 FRED series in parallel to produce a five-section snapshot of the U.S. economy.
Monetary Policy tracks the Fed Funds Rate, IORB, SOFR, and the Fed balance sheet.
Yield Curve shows 2Y/5Y/10Y/30Y Treasuries with inversion flags on the 10Y-2Y and 10Y-3M spreads.
Inflation covers CPI, Core CPI, PCE, Core PCE, PPI, and 10-year breakeven inflation.
Labour Market and Housing & Growth round out the picture.
Use --search to query the 539,000-series FRED catalog by keyword.
python3 macro_economy.py
or
python3 macro_economy.py --since 2020
or
python3 macro_economy.py --search "housing starts"
Builds a pharmacovigilance profile from five datasets. FDA FAERS surfaces real-world adverse event reports post-approval, ranked by frequency and severity. Orange Book confirms FDA approval status and generic availability. ClinicalTrials shows what is actively being studied. ClinVar identifies genetic variants linked to the target condition — the patient subpopulations most relevant to the drug. PubMed provides the recent literature trajectory.
python3 drug_safety_report.py --drug metformin --condition diabetes
Audits a software dependency for known vulnerabilities and runtime end-of-life status. NVD provides the official CVSS-scored CVE record — severity, attack vector, and scope. OSV maps vulnerabilities directly to package ecosystem version strings (PyPI, npm, Go, Maven) answering “is this exact version affected?” EOL.date flags runtimes that no longer receive security patches regardless of CVE status.
python3 security_audit.py --package requests --ecosystem PyPI --version 2.28.0
or
python3 security_audit.py --runtime python --cycle 3.8
Traces a research topic from preprint frontier to clinical application. arXiv captures the cutting edge — preprints appear months before journals, showing where ideas first surface. PubMed measures how established an area is and whether publication volume is growing or plateauing. ClinicalTrials reveals whether basic research has crossed into human testing — the gap between papers and trial starts quantifies translation lag. ClinVar anchors the condition to specific genetic variants and patient subpopulations.
python3 research_pipeline.py --topic "GLP-1 obesity"
or
python3 research_pipeline.py --topic "Alzheimer tau"
Screens any Ethereum address for AML red flags across five datasets. eth.transfers measures counterparty concentration — high unique-sender or recipient counts flag layering and structuring patterns. eth.dex_swaps detects cross-protocol layering — swapping through multiple DEX protocols fragments the transaction trail; high swap-to-block ratios indicate automated behaviour. eth.lending flags leverage and liquidation risk — liquidation_call events are a financial-stress signal; repeated borrow/repay cycles may indicate wash activity. eth.lp_events detects wash-trading — high mint/burn churn in the same pool inflates apparent volume without economic purpose. eth.mev identifies automated or sophisticated actors — addresses consistently appearing in MEV-extracted blocks are likely bots or persistent targets.
python3 blockchain_aml.py --address 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045
or
python3 blockchain_aml.py --address 0x... --days 30