Skip to main content
Written by RTILA Team - Senior Automation Engineer

Data extraction is the heart of web automation. In RTILA X, extraction is defined in the datasets object (a JSON map). Each key is the dataset name, and the value identifies a repeating container with item_selector and lists properties that describe what should be pulled from each item.

Dataset Anatomy

{
  "datasets": {
    "review_products": {
      "item_selector": "css=.product-card",
      "properties": [
        {
          "name": "title",
          "type": "text",
          "selector": "css=.product-title"
        },
        {
          "name": "link",
          "type": "attribute",
          "selector": "css=a.product-link",
          "attribute": "href"
        }
      ]
    }
  }
}

The item_selector decides how many rows will be returned. If the page contains 24 matching product cards, the dataset will contain 24 rows.

The Nine Property Types

RTILA X supports nine property types:

  1. text โ€” visible text content
  2. html โ€” inner HTML string
  3. attribute โ€” value of an HTML attribute such as href or src
  4. property โ€” DOM property such as value on an input
  5. count โ€” number of matching elements inside the current item
  6. page_url โ€” current page URL; does not require a selector
  7. selector_path โ€” output the selector path that was used
  8. list โ€” nested list extraction within the item container
  9. index โ€” index of the current item in the extraction result

Examples:

{
  "name": "image",
  "type": "attribute",
  "selector": "css=img.product-image",
  "attribute": "src"
}
{
  "name": "review_count",
  "type": "count",
  "selector": "css=.review-item"
}
{
  "name": "row_number",
  "type": "index"
}

Required Fields and Blank Values

By default, a row is still returned even when some property selectors do not match. You can enforce data quality with required_fields. If any required field is missing, the entire row is skipped. This is useful for filtered grids where promotional cards should be ignored.

{
  "datasets": {
    "listings": {
      "item_selector": "css=.listing-item",
      "required_fields": ["price", "address"],
      "properties": [
        {
          "name": "price",
          "type": "text",
          "selector": "css=.price"
        },
        {
          "name": "address",
          "type": "text",
          "selector": "css=.address"
        }
      ]
    }
  }
}

Deduplication

Web pages often show the same product multiple times, such as a featured carousel and a regular grid. Use deduplicate_by to remove rows where a named property contains the same value. Typical deduplication fields are product URLs, IDs, or SKUs.

{
  "datasets": {
    "unique_products": {
      "item_selector": "css=.product",
      "deduplicate_by": "product_id",
      "properties": [
        {
          "name": "product_id",
          "type": "attribute",
          "selector": "css=.product-link",
          "attribute": "data-product-id"
        }
      ]
    }
  }
}

Parent and Child Datasets

Nested data can be handled with the list property type or with parent datasets. A parent dataset defines the outer item, and a child dataset defines a nested repeating group within that item. This pattern is especially useful for review pages, forum threads, and order histories.

Extraction Flow

The extraction command is always extract_data. It references the dataset by name and runs after the target page is fully loaded. Use output_filename to save rows to a JSON file in the output directory, or output_variable to store extracted data in a runtime variable.

{
  "command": "extract_data",
  "params": {
    "dataset": "products",
    "output_filename": "products.json",
    "append": true,
    "output_variable": "extracted_rows"
  }
}

Try It Yourself

Run the Basic Navigation scenario 1 extraction first to understand stable grid extraction. Then open Data Transformation scenario 4 to see how extracted values can be cleaned with transformations before final output.

Was this helpful?

โ† Back to Learning Hub