Skip to main content

ecommerce Scenario 1 — Amazon Search — Extract 20 Products

Written by RTILA X Engineering Team

Beginner ~4 min

What You'll Learn

Scrape product listings from a store

Real-World Use Case

Monitoring competitor pricing

LIVE DEMO

Wireless Noise-Cancelling Headphones

$249.99 4.5 out of 5 stars Wireless Noise-Cancelling Headphones

4K Ultra HD Monitor

$499.99 4.5 out of 5 stars 4K Ultra HD Monitor

Mechanical Gaming Keyboard

$129.99 4.5 out of 5 stars Mechanical Gaming Keyboard

USB-C Docking Station

$159.99 4.5 out of 5 stars USB-C Docking Station

Portable SSD 1TB

$99.99 4.5 out of 5 stars Portable SSD 1TB

Smart Home Hub

$79.99 4.5 out of 5 stars Smart Home Hub

Wireless Charging Pad

$29.99 4.5 out of 5 stars Wireless Charging Pad

Bluetooth Speaker

$59.99 4.5 out of 5 stars Bluetooth Speaker

Classic Cotton T-Shirt

$19.99 4.5 out of 5 stars Classic Cotton T-Shirt

Slim Fit Jeans

$69.99 4.5 out of 5 stars Slim Fit Jeans

Waterproof Rain Jacket

$119.99 4.5 out of 5 stars Waterproof Rain Jacket

Running Sneakers

$129.99 4.5 out of 5 stars Running Sneakers

Wool Blend Sweater

$89.99 4.5 out of 5 stars Wool Blend Sweater

Leather Belt

$39.99 4.5 out of 5 stars Leather Belt

Sun Hat

$24.99 4.5 out of 5 stars Sun Hat

Sport Socks Pack

$9.99 4.5 out of 5 stars Sport Socks Pack

JavaScript: The Good Parts

$16.95 4.5 out of 5 stars JavaScript: The Good Parts

Design Patterns Explained

$28.99 4.5 out of 5 stars Design Patterns Explained

Data Structures in Python

$49.99 4.5 out of 5 stars Data Structures in Python

Machine Learning Basics

$39.99 4.5 out of 5 stars Machine Learning Basics
EXPECTED OUTPUT

RTILA X PROJECT JSON

    {
  "name": "Amazon_Search_Extract_20",
  "settings": {
    "urls": [
      "https://learn.rtila.com/scenarios/ecommerce/1"
    ]
  },
  "datasets": {
    "amazon_results": {
      "item_selector": "css=.amazon-result",
      "properties": [
        {
          "name": "title",
          "type": "text",
          "selector": "css=.amazon-title"
        },
        {
          "name": "price",
          "type": "text",
          "selector": "css=.amazon-price"
        },
        {
          "name": "rating",
          "type": "text",
          "selector": "css=.amazon-rating"
        },
        {
          "name": "image_url",
          "type": "attribute",
          "selector": "css=img.amazon-image",
          "attribute": "src"
        }
      ]
    }
  },
  "commands": [
    {
      "command": "wait_for_selector",
      "params": {
        "selector": "css=.amazon-result"
      }
    },
    {
      "command": "extract_data",
      "params": {
        "dataset": "amazon_results"
      }
    }
  ]
}
  

Product lists can be extracted with a single dataset definition. Every field uses a stable inner selector, while the image URL is read from an attribute.

Did you complete this scenario?

Ready to run this automation?

Copy the project JSON above, open RTILA X, create a new project, and paste it.

This scenario covers 2 RTILA X commands and is referenced in 2 learning articles.

Continue Learning

Was this helpful?