show
View scraped items from the database.Syntax
Arguments
Spider name.
Options
Project name.
Number of items to display.
Filter by URL pattern (case-insensitive substring match).
Search in titles only (case-insensitive).
Search in both title and content (case-insensitive).
Examples
Output
Article Items (Generic Extractors)
Callback Items (Custom Extractors)
export
Export scraped items to file formats.Syntax
Arguments
Spider name.
Options
Project name.
Export format:
csv, json, jsonl, parquet.Custom output file path. If not specified, uses timestamped filename in
data/<project>/<spider>/exports/.Limit number of items to export.
Filter by URL pattern.
Filter by title.
Filter by title or content.
Examples
Output
Export Formats
CSV
JSON
Pretty-printed JSON array:JSONL (JSON Lines)
Parquet
Requirespandas and pyarrow:
Default Export Location
Database Storage
scraped_items Table
Items are stored in this table during test crawls:
Standard vs. Custom Fields
Standard fields (from newspaper/trafilatura extractors):- Stored in dedicated columns:
title,content,author,published_date
- Stored in
metadata_jsoncolumn as JSON - Includes
_callbackkey to identify which callback was used
Data Retention
Test Crawls: Data stored in database until spider is deleted (cascading delete). Production Crawls: Data exported to JSONL files indata/<project>/<spider>/crawls/ (not stored in database).
Troubleshooting
Spider Not Found: Verify project and spider name with./scrapai spiders list --project <name>
No Items Found: Run a test crawl first - production crawls save to JSONL files, not database
Parquet Export Error: Install dependencies: .venv/bin/pip install pandas pyarrow
Next Steps
Database Commands
Advanced queries and database management
Inspection
Analyze websites before scraping