using-crawl4ai-cli

Extract structured data from websites using the crawl4ai CLI with CSS schemas and LLM extraction.

Updated Dec 4, 2025
One-click install
npx skills add https://github.com/dallascrilley/dowser --skill using-crawl4ai-cli-dallascrilley
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: using-crawl4ai-cli
Source: https://github.com/dallascrilley/dowser/tree/main/skills/using-crawl4ai-cli
Command: npx skills add https://github.com/dallascrilley/dowser --skill using-crawl4ai-cli-dallascrilley

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires crawl4ai, playwright, and includes scripts (resource) and references (resource) components.

What problem does it solve? Scraping modern websites requires handling JavaScript rendering, infinite scroll, and fragile CSS selectors, and misconfigured setups produce empty extractions or navigation-contaminated data. This Skill provides tested crawl4ai CLI workflows with automated setup, schema generation, and output validation. ## Core Features & Use Cases - Structured Data Extraction: Generate CSS selector schemas and extract page data as JSON using the crwl command. - Dynamic Content Handling: Configure crawler settings for JavaScript-heavy sites, infinite scroll, and lazy-loaded content. - LLM-Powered Q&A: Ask natural-language questions about page content using OpenAI, Anthropic, or local Ollama models. - Use Case: Monitor a news site daily by extracting article titles and links with a CSS schema, validating the output with the included validation script, and generating an LLM summary of trending topics. ## Quick Start Use the using-crawl4ai-cli skill to run the setup script and then extract article titles and links from a news website into JSON.

Frequently Asked Questions about using-crawl4ai-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract structured data from a website with crawl4ai?▼

Create a CSS extraction config and a JSON schema defining a baseSelector and fields, then run crwl with the -e and -s flags and -o json output. The generate_schema.py script builds schemas interactively if you prefer not to write JSON by hand.

How do I scrape JavaScript-heavy or infinite scroll pages?▼

Use a dynamic crawler config with scan_full_page set to true, wait_until set to networkidle, and a delay_before_return_html of about 2 seconds. The init_crawler.py script generates this preset with the --preset dynamic flag.

Why does crawl4ai fail with Playwright browser not found?▼

Playwright browsers are installed per Python version, so the browser may be missing for the Python that crwl uses. Run the included setup.sh script, which detects the correct Python path and installs Chromium automatically.

Can crawl4ai use LLMs to answer questions about page content?▼

Yes, the -q flag sends a natural-language question about the crawled page to a configured LLM. Supported providers include openai/gpt-4, anthropic/claude-3-sonnet, and local ollama models that need no API key.

Why does my CSS extraction return empty or navigation-contaminated results?▼

Empty results usually mean selectors are wrong or dynamic content has not loaded yet, while contamination means the baseSelector is too broad. Inspect the page with Chrome MCP first, then run validate_extraction.py on the output to detect these issues.

When should I not use crawl4ai CLI for scraping?▼

Avoid it for simple static HTML where plain HTTP requests suffice, and for sites requiring complex authentication flows since the CLI does not directly support login sessions. Dedicated browser automation tools fit those cases better.