> ## Documentation Index
> Fetch the complete documentation index at: https://docs.meter.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Core Concepts

> Understand the fundamental building blocks of Meter

# Core Concepts

Meter is built around a few key abstractions that make web scraping and monitoring simple and cost-effective. Understanding these concepts will help you get the most out of the platform.

## The big picture

<Steps>
  <Step title="Strategy">
    A reusable extraction plan generated by AI that defines **how** to scrape a website. Created once, used many times.
  </Step>

  <Step title="Job">
    A single execution of a scrape using a strategy. Jobs run asynchronously and return extracted data.
  </Step>

  <Step title="Schedule">
    Automated recurring jobs that run at specified intervals or cron times. Perfect for monitoring websites.
  </Step>

  <Step title="Workflow (optional)">
    Chain strategies into DAG-based pipelines where the output of one scraper feeds into the next. For multi-step scraping like index → detail pages.
  </Step>

  <Step title="Change Detection">
    Intelligent diffing that compares jobs to detect meaningful content changes, filtering out noise.
  </Step>
</Steps>

## Key concepts

<CardGroup cols={2}>
  <Card title="Strategies" icon="brain" href="/concepts/strategies">
    Learn how AI-generated extraction strategies work and when to use them
  </Card>

  <Card title="Strategy Groups" icon="layer-group" href="/concepts/strategy-groups">
    Organize strategies for bulk scheduling and shared output schemas
  </Card>

  <Card title="Output Schemas" icon="table" href="/concepts/output-schemas">
    Define the exact JSON structure for extraction results
  </Card>

  <Card title="Filtering" icon="filter" href="/concepts/filtering">
    Filter extraction results with conditions and operators
  </Card>

  <Card title="Jobs" icon="gears" href="/concepts/jobs">
    Understand job execution, status checking, and result retrieval
  </Card>

  <Card title="Schedules" icon="clock" href="/concepts/schedules">
    Set up automated monitoring with intervals or cron expressions
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/concepts/workflows">
    Chain strategies into multi-step scraping pipelines
  </Card>

  <Card title="Change Detection" icon="code-compare" href="/concepts/change-detection">
    Discover how Meter detects meaningful content changes
  </Card>
</CardGroup>

## How it all fits together

```mermaid theme={null}
graph TD
    A[Generate Strategy] --> B{Simple or Pipeline?}
    B -->|Simple| C[Create Schedule]
    B -->|Pipeline| W[Create Workflow]
    W --> C
    C --> D[Jobs Run Automatically]
    D --> E[Compare with Previous Job]
    E --> F{Changes Detected?}
    F -->|Yes| G[Webhook or Pull API]
    F -->|No| H[Skip - No Action]
    G --> I[Update Vector DB]
```

### Example workflow

1. **Generate a strategy** for extracting product data from an e-commerce site
2. **Create a schedule** to scrape the site every hour
3. **Jobs run automatically**, extracting current product data
4. **Changes are detected** by comparing content hashes and structural signatures
5. **You get notified** via webhook or pull from the changes API
6. **Update your database** only with changed content

## Cost model

Understanding Meter's cost structure helps you optimize usage:

| Action                  | Cost          | Frequency             |
| ----------------------- | ------------- | --------------------- |
| **Strategy generation** | \~\$0.02-0.06 | Once per site/pattern |
| **Job execution**       | Included      | Unlimited             |
| **Change detection**    | Included      | Automatic             |
| **API calls**           | Included      | Unlimited             |

### Why strategy-based is cheaper

Traditional LLM scraping costs scale with usage:

* **Traditional**: Pay per scrape (\$0.02-0.10 each)
* **Meter**: Pay once for strategy (\$0.02-0.06), then scrape unlimited times at no extra cost

For a site scraped 100 times:

* Traditional LLM scraping: \$2-10
* Meter: \$0.02-0.06 (97-99% savings)

## Data model

Understanding the data model helps you work with the API:

```
User
  ├── Strategy Groups
  │     └── Strategies (grouped for bulk management)
  ├── Strategies
  │     ├── Preview Data (sample extraction)
  │     ├── Output Schema (optional)
  │     ├── Filter Config (optional)
  │     ├── Jobs
  │     │     ├── Results (extracted data)
  │     │     ├── Content Hash
  │     │     └── Structural Signature
  │     └── Schedules
  │           ├── Interval or Cron
  │           ├── Webhook URL (optional)
  │           └── Associated Jobs
  └── Workflows
        ├── Nodes (strategy + input config)
        ├── Edges (data flow + filters)
        ├── Runs (execution history)
        └── Schedules (interval or cron)
```

## Best practices

<AccordionGroup>
  <Accordion title="Reuse strategies across similar pages">
    If multiple pages have the same structure (e.g., product pages, blog posts), you can reuse the same strategy with different URLs:

    ```python theme={null}
    # Generate once for pattern
    strategy = client.generate_strategy(
        url="https://shop.com/product/123",
        description="Extract name, price, description"
    )

    # Reuse for different products
    job1 = client.create_job(strategy_id, "https://shop.com/product/123")
    job2 = client.create_job(strategy_id, "https://shop.com/product/456")
    ```
  </Accordion>

  <Accordion title="Use pull-based API for batch processing">
    Instead of webhooks for every change, poll the changes API periodically:

    ```python theme={null}
    # Check once per hour for all changes
    changes = client.get_schedule_changes(schedule_id)
    if changes['count'] > 0:
        batch_process(changes['changes'])
    ```

    This reduces webhook traffic and allows batching updates.
  </Accordion>

  <Accordion title="Set appropriate monitoring intervals">
    **Faster intervals** (15-30 min):

    * Stock prices, sports scores, breaking news
    * High-priority monitoring

    **Moderate intervals** (1-6 hours):

    * E-commerce products, job listings
    * Most monitoring use cases

    **Slow intervals** (daily):

    * Documentation, blog posts, policies
    * Low-frequency content
  </Accordion>

  <Accordion title="Handle job failures gracefully">
    Jobs can fail if sites are down or block requests:

    ```python theme={null}
    job = client.get_job(job_id)
    if job['status'] == 'failed':
        print(f"Job failed: {job['error']}")
        # Retry logic, alerts, etc.
    ```
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Strategies Deep Dive" icon="brain" href="/concepts/strategies">
    Learn how AI generates extraction strategies
  </Card>

  <Card title="Jobs Deep Dive" icon="gears" href="/concepts/jobs">
    Master job execution and result handling
  </Card>

  <Card title="Schedules Deep Dive" icon="clock" href="/concepts/schedules">
    Set up automated monitoring
  </Card>

  <Card title="Workflows Deep Dive" icon="diagram-project" href="/concepts/workflows">
    Build multi-step scraping pipelines
  </Card>
</CardGroup>

## Need help?

Email me at [mckinnon@meter.sh](mailto:mckinnon@meter.sh)
