show
View scraped items from the database.Syntax
Arguments
string
required
Spider name.
Options
string
required
Project name.
integer
default:"5"
Number of items to display.
string
Filter by URL pattern (case-insensitive substring match).
string
Search in titles only (case-insensitive).
string
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
string
required
Spider name.
Options
string
required
Project name.
choice
required
Export format:
csv, json, jsonl, parquet.string
Custom output file path. If not specified, uses timestamped filename in
data/<project>/<spider>/exports/.integer
Limit number of items to export.
string
Filter by URL pattern.
string
Filter by title.
string
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