Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.brightdata.com/llms.txt

Use this file to discover all available pages before exploring further.

Use these copy-pasteable prompts to drive a Bright Data Scraper Studio build, run, heal, approve, re-run loop entirely through Claude Code, Cursor or Codex. The pattern is deliberate: build a minimal scraper first, then heal it to extend the schema, so the heal envelope’s preview_result is easier to verify against a known-good baseline.

Prerequisites

  • A Bright Data account (sign up free, no card required).
  • Node.js 18 or later. The first prompt has the agent install the Bright Data CLI for you if it is missing.
  • A coding agent with terminal access: Claude Code, Cursor or Codex.

Run the whole flow in one prompt

If you just want to see the build, run, heal, approve, re-run loop in action, paste this single prompt and let the agent work through every step. The agent installs the Bright Data CLI first if it is not already present.
Prompt
Build, run, heal and verify a Bright Data scraper end to end. Do every step in order and stop if a step fails:

1. Check whether the Bright Data CLI is installed by running `bdata --version`. If the command is not found, install it with `npm install -g @brightdata/cli`, then run `bdata login` to authenticate.
2. Create a Bright Data scraper for https://shopalto.xyz/product/aurora-wireless-headphones that extracts two fields: product name and price. Report the Collector ID.
3. Run that scraper on the same URL and pretty-print the result. Expect one row with name and price.
4. Heal the scraper in place to also capture description, image url and rating alongside the existing name and price. Keep the same Collector ID, anchor the heal on the same URL and show the approval envelope.
5. When the preview shows all five fields, approve the fix anchored on the same URL.
6. Run the scraper on the same URL again and confirm all five fields come back: name, price, description, image_url and rating.
Expected result: the agent ends with a JSON row containing name, price, description, image_url and rating, and the Collector ID is unchanged from step 2.

Run the flow step by step

Work through the prompts below one at a time when you want to inspect each Collector ID, run result and heal envelope before moving on.
1

Prompt the agent to check the CLI is installed

Prompt
Check whether the Bright Data CLI is installed by running `bdata --version`. If the command is not found, install it with `npm install -g @brightdata/cli`, then run `bdata login` to authenticate. Confirm the version before continuing.
Expected result: the agent prints a bdata version and confirms it is authenticated. If the CLI was missing, the agent installs it first.
2

Prompt the agent to build a minimal scraper

Prompt
Create a Bright Data scraper for https://shopalto.xyz/product/aurora-wireless-headphones that extracts just two fields: product name and price. Show me the Collector ID when it is done.
Expected result: the agent reports a Collector ID like c_mpohus372o5tmid1jk. Hold onto it; the rest of the prompts reuse the same ID.
3

Prompt the agent to run it

Prompt
Run that scraper on https://shopalto.xyz/product/aurora-wireless-headphones and pretty-print the result.
Expected result: a JSON array with one row, populated with name and price only.
4

Prompt the agent to heal and add more fields

Prompt
Extend the scraper in place. Heal it to also capture description, image url and rating alongside the existing name and price. Keep the same Collector ID. Anchor the heal on https://shopalto.xyz/product/aurora-wireless-headphones and show me the approval envelope when it is ready.
Expected result: the agent reports status: "awaiting_approval" with a preview_result row that now shows five fields.
5

Prompt the agent to approve the fix

Prompt
The preview looks good. Approve the fix, anchored on https://shopalto.xyz/product/aurora-wireless-headphones.
Expected result: status advances to done. The Collector ID is unchanged.
6

Prompt the agent to verify the expanded schema

Prompt
Run the scraper on https://shopalto.xyz/product/aurora-wireless-headphones again and confirm all five fields now come back: name, price, description, image_url and rating.
Expected result: the same JSON shape as the earlier run, now with three additional fields per row.
For an unattended variant, ask the agent to add --auto-approve to the heal call. The agent skips the approval gate and polls through to done in one step. Use it only when you trust the heal without a manual review.

Build with the Bright Data CLI

The canonical CLI tutorial: install, log in, create, run, heal

Self-Healing tool

Fix a scraper from the Bright Data control panel

Scraper Studio API quickstart

Trigger an existing scraper from cURL, Python or Node.js

Bright Data CLI commands

Flag reference for scraper create, heal and approve