Strategies
A strategy is a reusable extraction plan that tells Meter how to extract data from a webpage. Think of it like a recipe: you create it once by describing what you want, and Meter’s AI figures out the exact selectors and extraction logic.What is a strategy?
A strategy contains:- CSS selectors for finding content on the page
- Field definitions mapping selectors to data fields
- Extraction metadata like item containers and scopes
How strategies are generated
Meter uses AI to analyze your target webpage and generate precise extraction strategies:- You provide: A URL and plain-English description of what to extract
- Meter analyzes: The page structure, HTML patterns, and content layout
- AI generates: CSS selectors and extraction rules optimized for that page
- You get: A reusable strategy plus preview data showing what was extracted
Example
Strategy lifecycle
- Generate: Create strategy with AI
- Preview: Check the
preview_datato verify extraction - Refine (optional): Provide feedback if something’s missing
- Use: Run jobs with the strategy
- Monitor: Check if results are still accurate over time
Refining strategies
If the initial extraction isn’t perfect, refine it with feedback:When to create new strategies
Create a new strategy when:Different Site Structure
Each website layout needs its own strategy
Different Data Fields
Different extraction requirements need different strategies
Major Site Redesign
If a site changes its HTML structure significantly
Different Page Types
Product pages vs. category pages need separate strategies
Reusing strategies
You can reuse the same strategy across:- Multiple URLs on the same site (e.g., different products)
- Pagination (if the structure is consistent)
- Similar pages (if they share HTML structure)
Strategy management
Listing strategies
Getting strategy details
Deleting strategies
Best practices
Use descriptive names
Use descriptive names
Give strategies clear names that describe their purpose:Good:
"HN Front Page - Titles and Scores"
Bad: "Strategy 1"This helps when managing multiple strategies.Test with refinement
Test with refinement
Always check
preview_data before creating jobs:Be specific in descriptions
Be specific in descriptions
Provide clear, specific extraction instructions:Good: “Extract product name, price with currency, main image URL, and stock availability from the product grid”Bad: “Get products”Specific descriptions lead to better strategies on the first try.
Monitor strategy health
Monitor strategy health
Strategies can break if sites change their HTML:
Troubleshooting
Strategy generation fails
Strategy generation fails
Possible causes:
- URL is not accessible
- Page requires authentication
- Description is too vague
- Verify the URL loads in a browser
- For auth-required pages, contact support
- Make your description more specific
Missing fields in preview
Missing fields in preview
Problem: Some expected fields aren’t in
preview_dataSolution: Use refinement:Strategy stops working
Strategy stops working
Problem: Jobs that worked before now fail or return incorrect dataCause: Website HTML structure changedSolutions:
- Generate a new strategy for the updated site
- Update your jobs to use the new strategy
- Delete the old strategy
Next steps
Create Jobs
Learn how to run scrapes using your strategies
Set Up Schedules
Automate scraping with recurring schedules
Python SDK Reference
Explore all strategy methods in the SDK
REST API Reference
View strategy endpoints in the REST API