Project intelligence
Apollo Lead Scraper
Lead sourcing adapter / CLI MVP
Local, CLI-first Apollo lead and company extraction engine with normalization, deduplication, resumable runs, and an optional controlled handoff to OpportunityOS.
Latest signal
Aug 26, 2026
Synced Sep 1, 2026
7
Commits · 365 days
3
Pull requests · 365 days
0
Issues · 365 days
0
Code reviews · 365 days
Public summary
Public summary
What it is
Apollo Lead Scraper is a local, CLI-first MVP for extracting people or company records from an Apollo search that an authenticated user is permitted to access. It is intentionally the sourcing layer: it captures records, turns them into stable business data, and prepares them for spreadsheet use or a controlled downstream handoff.
The problem and business value
Lead lists are useful only when they are consistent, recoverable, and easy to move into the next business workflow. This project separates Apollo-specific browser and payload handling from provider-agnostic normalization, deduplication, checkpointing, export, and delivery concerns. That makes a search run easier to repeat, recover after interruption, and integrate without treating Apollo’s changing private browser payloads as a stable public API.
The business value is operational rather than a claimed growth result: less manual list preparation, cleaner records, and a safer path from permitted research to a usable lead batch. The repository does not contain verified adoption, revenue, or customer outcome data.
What it does today
- Opens a supplied Apollo people or company search through Playwright using a locally saved authenticated session.
- Captures relevant XHR/fetch responses, parses permissive person/company shapes with Zod-backed schemas, and falls back to visible table rows when structured records are unavailable.
- Handles pagination, configurable pacing, rate-limit detection, exponential backoff, progress reporting, and graceful interruption.
- Normalizes names, email addresses, domains, LinkedIn URLs, locations, company fields, and source metadata before deduplicating leads or companies.
- Writes spreadsheet-compatible CSV and optional JSON output, with page-level checkpoints that can be resumed by job ID.
- Supports multiple Apollo accounts through explicit account selection; it does not rotate accounts automatically.
Integrations and data flow
The main flow is:
authenticated Apollo session → Playwright browser → sanitized network interception → defensive response parser / DOM fallback → normalization → deduplication → local checkpoint and ingestion ledger → CSV/JSON export
The local ingestion ledger canonicalizes equivalent search URLs, caches completed queries, deduplicates lead identities across batches and separate searches, and stages page-level batches before delivery. An optional HTTP client can send normalized lead batches to an OpportunityOS ingestion endpoint with an idempotency key and an optional bearer credential. Pending batches can be retried with deliver-pending without opening Apollo or consuming Apollo quota.
The OpportunityOS connector and its request behavior are implemented and covered with a fake transport in the test suite. A real endpoint, provider account authorization, acknowledgement contract, and production delivery path have not been verified in this repository.
AI or automation workflow
There is no AI model or AI-generated content in this repository. The automation is deterministic browser and data-processing work: a human logs into Apollo, chooses the search and limit, and starts the run; the system then captures, parses, normalizes, deduplicates, checkpoints, exports, and optionally delivers the resulting batches. It is not an autonomous outreach workflow and does not send email or social messages.
Lead, email, notification, or collaboration flow
Lead records may include email and email-status fields when Apollo exposes them, and those fields are included in normalized exports. The optional lead flow stages normalized batches locally and sends them only when an OpportunityOS endpoint is configured; a batch is marked delivered only after the downstream sink acknowledges it. There is no email sender, notification service, owner-replied chat, or collaboration UI in this project.
Security/privacy boundaries
- Apollo authentication is manual. The CLI does not ask for or persist an Apollo username or password; Playwright session state is stored locally and ignored by Git.
- Lead data, checkpoints, ingestion state, exports, logs, and browser session state are local by default. Treat those runtime directories as sensitive operational data.
- Debug network logging records sanitized request/response metadata rather than credentials or full request payloads. Common authorization, cookie, token, password, and secret fields are redacted in logs.
- The scraper does not bypass authentication, credits, access controls, CAPTCHA, payment mechanisms, or rate limits, and it does not rotate proxies.
- No telemetry or external analytics are implemented. Data leaves the machine only through the explicitly configured downstream sink.
- The public portfolio brief describes behavior and boundaries only; it contains no session state, environment values, raw logs, private URLs, or lead data.
What is coming next
The next step is controlled live validation against an authenticated Apollo account: confirm the current response shapes, pagination controls, rate-limit behavior, and field availability without recording sensitive search values. The optional OpportunityOS path then needs a real endpoint, authorization, acknowledgement behavior, and production failure/retry testing.
Longer-term direction is to expose the reusable ScraperService through a REST API or worker, add another source through the existing registry boundary, and evaluate richer enrichment or scoring. A database-backed ingestion store would be needed for multi-worker deployment. Enrichment, intelligence, outreach, queues, and a web dashboard are intentionally outside the current MVP until extraction reliability and maintenance cost are validated.
Current activity or evidence from the project
The repository currently contains one initial Git commit dated 2026-08-26. Local verification on that revision passes the strict TypeScript build, 19 automated tests across 8 test files, ESLint, and the Prettier format check. The tests cover URL validation, defensive response parsing, account/session-path bookkeeping, normalization, deduplication, CSV generation, service orchestration, query caching, staged delivery retry, and idempotency-key handling.
The offline suite uses fixtures, temporary directories, and fake sources or transports. It does not claim a successful live Apollo scrape or production OpportunityOS delivery; the research notes explicitly leave live request/response observations and rate-limit observations pending.
Contribution graph
The work behind the work.
Commits, PRs, issues and reviews
All available activity
Recent activity
What is moving now.
- Merge documentation context into mainCommit · Aug 26, 2026↗
- docs: add public and developer project contextPull request - merged · Aug 26, 2026↗
- docs: add public and developer project contextCommit · Aug 26, 2026↗
- chore: upgrade stack to Node 24 LTS (#2)Commit · Aug 26, 2026↗
- chore: upgrade stack to Node 24 LTSPull request - merged · Aug 26, 2026↗
- chore: upgrade stack to Node 24 LTSCommit · Aug 26, 2026↗
- docs: add public portfolio brief (#1)Commit · Aug 26, 2026↗
- docs: add public portfolio briefPull request - merged · Aug 26, 2026↗
- docs: add public portfolio briefCommit · Aug 26, 2026↗
- Initial commit: Apollo lead scraperCommit · Aug 26, 2026↗
Published roadmap
What is shipped and what comes next
This roadmap is intentionally public. It describes the product direction without exposing source code, secrets, session state, private search URLs, lead data, raw logs, or unverified outcomes.
Delivered
- [done] CLI commands for manual Apollo login, people/company scraping, and retrying pending deliveries.
- [done] Playwright-based browser session loading with explicit account selection and a local session boundary.
- [done] Apollo URL validation, XHR/fetch observation, permissive Zod-backed response parsing, pagination, and a best-effort DOM fallback.
- [done] Configurable pacing, exponential backoff, rate-limit detection, graceful interruption, progress metrics, and page-level checkpoint/resume support.
- [done] Provider-agnostic normalization for lead and company fields, stable identity handling, duplicate merging, and CSV/JSON export.
- [done] Local ingestion ledger with canonical query fingerprints, completed-query caching, cross-batch lead deduplication, and atomic state writes.
- [done] Page-level lead staging and a delivery service that marks batches delivered only after downstream acknowledgement.
- [done] Optional OpportunityOS HTTP connector with an idempotency key, optional bearer authentication, timeout handling, and retryable pending batches.
- [done] Automated tests, strict TypeScript compilation, linting, and formatting checks for the implemented offline behavior.
Operationally pending
- [in-progress] Run a controlled live Apollo scrape with an authenticated user session and verify the current response shapes, fields, pagination controls, and rate-limit behavior.
- [in-progress] Maintain the Apollo-specific parser and selectors as the private browser application changes; the research notes currently contain no live request/response observations.
- [in-progress] Configure and verify a real OpportunityOS endpoint, provider authorization, accepted/duplicate acknowledgement counts, and production failure/retry behavior.
- [in-progress] Validate the intended runtime environment, including the macOS normal-Chrome login bridge and the locally installed Chromium runtime.
- [in-progress] Define a production deployment boundary for the local JSON ingestion store; the current implementation is appropriate for a single-worker MVP, not concurrent workers.
Coming soon
- [planned] Expose the reusable scraper service through a REST API or worker boundary for downstream products.
- [planned] Add another lead source through the existing registry without coupling it to the Apollo-specific browser and payload code.
- [planned] Evaluate enrichment, scoring, and intelligence workflows after extraction reliability and maintenance cost are better understood.
- [planned] Consider database-backed ingestion, queues, and a web dashboard if the MVP moves beyond local, single-worker operation.
- [planned] Add production-oriented live integration checks while preserving the current privacy, authentication, rate-limit, and retry boundaries.
Product rule
The project should remain permission-aware, local by default, recoverable after interruption, explicit about downstream delivery, and honest about the difference between an implemented connector and a production-verified integration.