Core

Schemes are reusable extraction Blueprints. Instead of defining your scraping logic with every request, you can save a configuration once and reference it by ID.

Our system also supports AI-assisted schemes, allowing you to automatically generate and fix broken selectors using real page data.

Endpoint Reference

Endpoint Method Action
/schemes POST Create a new scheme
/schemes GET List all saved schemes
/schemes/{id} GET Retrieve specific scheme details
/schemes/{id} PUT Update an existing scheme
/schemes/{id} DELETE Remove a scheme
/schemes/{id}/status GET Check background processing status

Authentication: Include your API key in the x-api-key header for all requests.


Configuration Parameters

When creating or updating a scheme, use the following parameters:

Parameter Type Required Description
name string Yes A unique nickname for your scheme.
config JSON Yes See Config Object Details
test boolean No Required if fix is true; validates the scheme against a URL.
fix boolean No If true, uses AI to repair or generate the scheme.
async boolean No Processes the request in the background.
extract_prompt string Conditional Required if fix is true; guides the AI on what to extract.

Config Details (config)

The config object is a standard scraper api object and is compatible with any scrape parameter, with requirements based on your mode:

  • url: Always Required if test or fix is enabled.
  • extract_scheme: Required if fix is false.
  • Other: View “Test” Tab

Creation Logic

Mode test fix System Behavior
Create false false Saves the scheme config as-is.
Test true false Saves if it extracts data on chosen url.
Fix true true Fix and save scheme config on chosen url.

Credit Usage: Using the fix feature costs the Scraper Api fee for your configuration + 30 credits for each Ai fix; Up 60 credits in total are possible for multiple Ai fixes. If the AI fails to generate a valid scheme, credits are automatically refunded.


Usage Examples

Create a scheme

curl -X POST https://scrape.evomi.com/api/v1/schemes \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Product Details",
    "config": {
      "extract_scheme": [
        {
          "label": "product_data",
          "selector": "body", 
          "type": "nest",
          "fields": [
            {
              "label": "price",
              "selector": ".p-price",
              "type": "content"
            }
          ]
        }
      ]
    }
  }'

List Your schemes

curl -G "https://scrape.evomi.com/api/v1/schemes" \
  -d "page=1" \
  -d "per_page=10" \
  -H "x-api-key: YOUR_API_KEY"

Scrape Using a scheme ID

Once saved, you don’t need to pass the full config anymore—just the ID.

curl -X POST https://scrape.evomi.com/api/v1/scraper/realtime \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://example.com/item-123",
    "scheme_id": "sch_xxxxx"
  }'

Response Codes

  • 200/201: Success / Created
  • 202: Request accepted (Async processing)
  • 400: Validation error (check your JSON syntax)
  • 402: Insufficient credits
  • 404: scheme ID not found
  • 500: Internal server error