Skip to main content

REST API Overview

The Meter REST API provides direct HTTP access to all Meter features. Use it when the Python SDK isn’t available or when you need language-agnostic integration.

Base URL

https://api.meter.sh
All API requests should be made to this base URL.

Authentication

Include your API key in the Authorization header using the Bearer scheme:
curl https://api.meter.sh/api/strategies \
  -H "Authorization: Bearer sk_live_your_key_here" \
  -H "Content-Type: application/json"
See Authentication for details.

Request format

All POST and PATCH requests must include Content-Type: application/json and send JSON-encoded request bodies. Example:
curl -X POST https://api.meter.sh/api/strategies/generate \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com",
    "description": "Extract product names and prices",
    "name": "Product Scraper"
  }'

Response format

All responses are JSON-encoded with appropriate HTTP status codes:
  • 200 OK: Successful request
  • 201 Created: Resource created successfully
  • 400 Bad Request: Invalid request parameters
  • 401 Unauthorized: Invalid or missing API key
  • 404 Not Found: Resource not found
  • 500 Internal Server Error: Server error
Success response:
{
  "strategy_id": "550e8400-e29b-41d4-a716-446655440000",
  "strategy": {...},
  "preview_data": [...]
}
Error response:
{
  "detail": "Error message describing what went wrong"
}

API endpoints

Strategies

MethodEndpointDescription
POST/api/strategies/generateGenerate a new strategy
POST/api/strategies/{id}/refineRefine an existing strategy
GET/api/strategiesList all strategies
GET/api/strategies/{id}Get strategy details
DELETE/api/strategies/{id}Delete a strategy

Jobs

MethodEndpointDescription
POST/api/jobsCreate a new job (async)
POST/api/jobs/executeExecute job (synchronous)
GET/api/jobs/{id}Get job status and results
GET/api/jobsList jobs (with filtering)
POST/api/jobs/compareCompare two jobs
GET/api/strategies/{id}/historyGet strategy job history

Schedules

MethodEndpointDescription
POST/api/schedulesCreate a schedule
GET/api/schedulesList all schedules
PATCH/api/schedules/{id}Update a schedule
DELETE/api/schedules/{id}Delete a schedule
GET/api/schedules/{id}/changesGet unseen changes

Watch (Simplified)

MethodEndpointDescription
POST/api/watchCreate a watch (strategy + schedule in one call)

Discovery

MethodEndpointDescription
POST/discoverStart URL discovery
GET/discover/{id}Get discovery status
GET/discover/{id}/urlsGet discovered URLs
POST/discover/{id}/executeExecute batch scrape
POST/discover/{id}/scheduleCreate recurring schedule
GET/discoveriesList all discoveries
DELETE/discover/{id}Delete a discovery

Strategy Groups

MethodEndpointDescription
POST/api/strategy-groupsCreate a strategy group
GET/api/strategy-groupsList strategy groups
GET/api/strategy-groups/{id}Get group details with strategies
PATCH/api/strategy-groups/{id}Update group name/description
DELETE/api/strategy-groups/{id}Delete a group
POST/api/strategy-groups/{id}/strategiesAdd strategies to group
DELETE/api/strategy-groups/{id}/strategies/{sid}Remove strategy from group
POST/api/strategy-groups/{id}/scheduleApply schedule to all group members
DELETE/api/strategy-groups/{id}/scheduleDelete all group schedules
PATCH/api/strategy-groups/{id}/schedule/toggleEnable/disable group schedules
PATCH/api/strategy-groups/{id}/schemaApply output schema to group
GET/api/strategy-groups/{id}/schema/progressPoll schema regeneration progress
POST/api/strategy-groups/{id}/webhook/testTest group webhook

Workflows

MethodEndpointDescription
POST/api/workflowsCreate a workflow
GET/api/workflowsList workflows
GET/api/workflows/{id}Get workflow details
PUT/api/workflows/{id}Update workflow metadata
DELETE/api/workflows/{id}Delete a workflow
POST/api/workflows/{id}/nodesAdd a node
PUT/api/workflows/{id}/nodes/{nid}Update a node
DELETE/api/workflows/{id}/nodes/{nid}Delete a node
POST/api/workflows/{id}/edgesAdd an edge
DELETE/api/workflows/{id}/edges/{eid}Delete an edge
POST/api/workflows/{id}/runRun a workflow
GET/api/workflows/{id}/runs/{rid}Get run details
GET/api/workflows/{id}/runsList runs
GET/api/workflows/{id}/runs/latest/outputGet latest output
POST/api/workflows/{id}/runs/{rid}/cancelCancel a run
POST/api/workflows/{id}/schedulesCreate workflow schedule
GET/api/workflows/{id}/schedulesList workflow schedules
PATCH/api/workflows/{id}/schedules/{sid}Update workflow schedule
DELETE/api/workflows/{id}/schedules/{sid}Delete workflow schedule

Webhooks

MethodEndpointDescription
POST/api/webhooks/testTest webhook delivery
See detailed endpoint documentation:

Rate limiting

Rate limit headers are included in responses:
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 999
X-RateLimit-Reset: 1640995200

Pagination

List endpoints support pagination with limit and offset query parameters:
# Get first 20 results
curl "https://api.meter.sh/api/strategies?limit=20&offset=0" \
  -H "Authorization: Bearer sk_live_..."

# Get next 20 results
curl "https://api.meter.sh/api/strategies?limit=20&offset=20" \
  -H "Authorization: Bearer sk_live_..."

Idempotency

POST requests are not idempotent—calling the same endpoint twice will create two resources. For idempotent operations, use the Python SDK or implement your own idempotency logic.

CORS

The API does not currently support CORS. For browser-based applications, proxy requests through your backend.

Webhooks

Configure webhooks when creating schedules to receive real-time notifications:
curl -X POST https://api.meter.sh/api/schedules \
  -H "Authorization: Bearer sk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "strategy_id": "550e8400-e29b-41d4-a716-446655440000",
    "url": "https://example.com/products",
    "interval_seconds": 3600,
    "webhook_url": "https://your-app.com/webhooks/meter"
  }'
See the Webhooks Guide for implementation details.

Next steps

Authentication

Learn about API key authentication

Strategy Endpoints

Explore strategy API endpoints

Job Endpoints

Explore job API endpoints

Schedule Endpoints

Explore schedule API endpoints

Watch Endpoint

One-step URL monitoring setup

Discovery Endpoints

Site crawling and URL discovery

Strategy Groups

Manage strategy groups

Webhooks

Test webhook delivery

Need help?

Email me at mckinnon@meter.sh