/web-crawler

Intelligence L2+ Production medium usage

/web-crawler

Overview

/web-crawler is a production command in the Intelligence category of the Prismatic Platform. It provides automated web crawling and structured data extraction for OSINT investigations, competitive intelligence, and data collection operations. The command manages configurable crawlers that traverse web pages, extract structured data using CSS selectors and XPath expressions, follow links within defined boundaries, respect robots.txt and rate limits, and output normalized data in multiple formats. It is the primary data acquisition tool for the platform's intelligence gathering pipeline.

This command operates under the L2+ authority level and is executed by the web-crawler-agent agent. It is part of the platform's 216-command slash command registry, built on the AIAD (Autonomous Intelligence Agent Design) standard. The web-crawler-agent handles HTTP request management, HTML parsing, data extraction, politeness enforcement, and output formatting. It integrates with the platform's broader OSINT ecosystem for data enrichment and correlation.

Web crawling on the Prismatic Platform follows strict ethical guidelines. All crawlers respect robots.txt directives, implement configurable rate limiting (default: 1 request per second per domain), identify themselves with a proper User-Agent string, and never access authenticated or restricted content without explicit authorization. The crawler is designed for open-source intelligence gathering from publicly accessible sources only.

Architecture

The web crawler operates as a multi-stage pipeline: URL management, HTTP fetching, content parsing, data extraction, and output formatting.

Crawler Architecture

             /web-crawler
                   |
           Crawler Manager
                   |
          +--------+--------+
          |        |        |
       URL       HTTP      Parser
       Queue     Client    Engine
          |        |        |
    +-----+--+ +--+--+ +--+--+
    |    |   | |  |  | |  |  |
   Seed  Disc Rate Retry CSS  XPath
   URLs  Filter Limit Logic Select Parse
    |    |   | |  |  | |  |  |
    +----+---+-+--+--+-+--+--+
                   |
          Data Extractor
                   |
          +--------+--------+
          |        |        |
       Schema   Transform  Normalize
       Match    Pipeline   Engine
          |        |        |
          +--------+--------+
                   |
          Output Formatter
                   |
          +--------+--------+
          |        |        |
       JSON     CSV      Structured
       Export   Export    Storage

Crawler Modes

ModeDescriptionUse CaseDepth
Single PageExtract data from one URLTargeted data extraction0
Shallow CrawlFollow links one level deepLanding page + linked resources1
Deep CrawlMulti-level link followingComprehensive site mapping2-5
Focused CrawlFollow only matching linksTopic-specific data collectionVariable
Sitemap CrawlParse sitemap.xml entriesSystematic site coverageN/A

Politeness Controls

ControlDefaultPurpose
Rate Limit1 req/sec/domainPrevent server overload
Concurrent Requests3Limit parallel connections
robots.txtRespectedHonor server preferences
Crawl DelayFrom robots.txtServer-specified delay
User-AgentPrismaticCrawler/1.0Transparent identification
Max Pages100Prevent runaway crawls
Request Timeout30sHandle slow responses

Usage

# Extract data from single page
/web-crawler --url "https://example.com/page" --extract "title,meta,links"

# Crawl site with depth limit
/web-crawler --url "https://example.com" --depth 2

# Extract specific data using CSS selectors
/web-crawler --url "https://example.com/products" --css ".product-name,.product-price"

# Focused crawl following specific link patterns
/web-crawler --url "https://example.com" --follow "/blog/*" --depth 3

# Export extracted data as JSON
/web-crawler --url "https://example.com" --extract all --format json --export ./data.json

# Crawl with custom rate limiting
/web-crawler --url "https://example.com" --rate-limit 0.5 --depth 2

# Sitemap-based crawl
/web-crawler --sitemap "https://example.com/sitemap.xml" --extract "title,h1,meta-description"

# Dry run showing crawl plan
/web-crawler --url "https://example.com" --depth 2 --dry-run

# Resume interrupted crawl
/web-crawler --resume ./crawl-state.json

Practical Examples

# OSINT investigation: gather public company information
/web-crawler --url "https://or.justice.cz/ias/ui/rejstrik" --css ".company-name,.ico,.address" --format json

# Competitive intelligence: monitor pricing pages
/web-crawler --url "https://competitor.com/pricing" --css ".plan-name,.plan-price,.plan-features" --format csv

# Documentation crawl: index a technical documentation site
/web-crawler --sitemap "https://docs.example.com/sitemap.xml" --extract "title,h1,h2,code" --format json --export ./docs-index.json

# Security research: discover exposed endpoints
/web-crawler --url "https://target.com" --depth 2 --extract "links,forms,scripts" --format json

# Content monitoring: track page changes
/web-crawler --url "https://example.com/status" --extract "body" --diff --schedule "*/30 * * * *"

Options

OptionTypeDefaultDescription
--urlstringnoneStarting URL for the crawl
--sitemapstringnoneSitemap URL for systematic crawling
--depthinteger0Maximum crawl depth (0 = single page)
--followstring*URL pattern filter for link following
--extractstringtitle,meta,linksData fields to extract
--cssstringnoneCSS selectors for data extraction
--xpathstringnoneXPath expressions for data extraction
--formatenumtextOutput format: text, json, csv, markdown
--exportpathnoneExport data to file
--rate-limitfloat1.0Requests per second per domain
--concurrentinteger3Maximum concurrent requests
--max-pagesinteger100Maximum pages to crawl
--timeoutduration30sRequest timeout
--user-agentstringPrismaticCrawler/1.0User-Agent string
--dry-runflagfalseShow crawl plan without executing
--resumepathnoneResume from saved crawl state
--diffflagfalseTrack and report content changes
--verboseflagfalseDetailed crawl progress
--respect-robotsflagtrueRespect robots.txt (disable with caution)

Execution Flow

Phase 1: Crawl Planning

The crawler manager analyzes the target URL, fetches robots.txt, determines allowed paths, parses sitemaps if specified, and builds the initial URL queue. The crawl plan is validated against politeness controls and scope limits.

Phase 2: URL Queue Management

The URL queue manages crawl frontier: seed URLs are prioritized, discovered URLs are filtered against the follow pattern and domain boundary, duplicate URLs are eliminated, and crawled URLs are marked to prevent revisits. Queue ordering can be breadth-first (default) or depth-first.

Phase 3: HTTP Fetching

URLs are fetched respecting rate limits and concurrency constraints. The HTTP client handles redirects (up to 5 hops), retries on transient failures (429, 503 with exponential backoff), and content type verification (only HTML pages are parsed for links). Responses are cached to avoid redundant fetches.

Phase 4: Content Parsing and Extraction

HTML responses are parsed into DOM trees. CSS selectors and XPath expressions extract specified data fields. Link discovery extracts href attributes for queue expansion. The parser handles malformed HTML gracefully, recovering partial data from broken pages.

Phase 5: Data Normalization

Extracted data is normalized: whitespace is trimmed, HTML entities are decoded, URLs are resolved to absolute form, dates are parsed into standard format, and duplicate entries are collapsed. The normalization pipeline ensures consistent output regardless of source page formatting.

Phase 6: Output and Storage

Normalized data is formatted for the requested output format and either displayed or exported to file. Crawl state (queue, visited URLs, extracted data) is periodically checkpointed for resume capability.

Integration Points

ComponentIntegration TypeDescription
/investigateConsumerInvestigation uses crawler for data acquisition
/email-osintPeerEmail OSINT may trigger targeted crawls
/google-hackingPeerGoogle dorking discovers URLs for crawling
/osint-enginesUpstreamOSINT engines coordinate with crawlers
/ghost-reconPeerStealth recon uses targeted page extraction
Prismatic PerimeterConsumerEASM uses crawling for asset discovery
TelemetryMonitoringCrawl performance metrics
Quality GatesEnforcementCrawl configurations validated

Best Practices

Rate Limiting Discipline

Always maintain rate limiting at or below 1 request per second per domain. Increase only when explicitly authorized by the target site's terms of service. Aggressive crawling damages target servers and can result in IP blocking that affects the entire platform.

Scope Boundaries

Use --follow patterns and --max-pages to prevent crawl scope explosion. A depth-3 crawl on a large site can generate millions of URLs. Always start with --dry-run to estimate crawl scope before executing.

Data Validation

Validate extracted data before using it in downstream intelligence operations. Web content can be manipulated, stale, or inconsistent. Cross-reference crawler data with other OSINT sources for accuracy.

Ethical Crawling

Never crawl authenticated content, paywalled resources, or personal data without explicit authorization. The platform's OSINT mandate covers publicly accessible sources only. When in doubt, consult the target site's terms of service and robots.txt.

Error Handling

Error CodeDescriptionResolution
URL_INVALIDMalformed URL providedCheck URL format
ROBOTS_DENIEDrobots.txt disallows crawlingRespect the directive or narrow scope
RATE_LIMITEDTarget server returned 429Reduce rate limit
CONNECTION_REFUSEDCannot connect to targetVerify target is accessible
PARSE_FAILURECannot parse HTML contentCheck for non-HTML content
DEPTH_EXCEEDEDCrawl reached maximum depthIncrease depth or narrow focus
MAX_PAGES_REACHEDCrawled maximum allowed pagesIncrease limit or narrow scope
TIMEOUTRequest exceeded timeoutIncrease timeout or check network

Advanced Usage

Custom Extraction Schemas

Define structured extraction rules:

/web-crawler --url "https://example.com/products" --schema ./schemas/product-extraction.yaml --format json

Scheduled Monitoring

Set up periodic crawls for change detection:

/web-crawler --url "https://example.com/status" --diff --schedule "0 */6 * * *" --notify-on-change

Multi-Site Crawl Campaign

Crawl multiple sites in coordinated campaign:

/web-crawler --campaign ./campaigns/competitors.yaml --format json --export ./intelligence/

Doctrine Compliance

All commands operate under the NO MERCY, NO DOUBTS doctrine:

  • NO MERCY: Zero tolerance for incomplete execution or quality violations. Every URL in scope is crawled, every extraction rule is applied, every politeness control is enforced without exception.
  • NO DOUBTS: Full investigation before action, evidence-based results. Extracted data includes source URLs, extraction timestamps, and confidence indicators. No data is reported without verifiable provenance.
  • /investigate - Launch comprehensive OSINT investigation across 121+ sources
  • /email-osint - Email-based OSINT gathering with breach correlation and social profiling
  • /google-hacking - Google dorking and advanced search intelligence extraction
  • /ghost-recon - Stealth OSINT reconnaissance and passive intelligence gathering
  • /osint-engines - Multi-engine OSINT provider coordination and management
  • /delta-force - Precision OSINT operations with surgical data extraction
  • /navy-seal - Deep-water OSINT operations in restricted information spaces

Connect & Contribute

Created by Tomáš Korcak (korczis) | Open Source under GHL