Prerequisites
- A Bright Data account (sign up free, no card required).
- A coding agent with terminal access: Claude Code, Cursor or Codex.
npx, which fetches the latest version on demand, so there is no global dependency to maintain.
Build a scraper in one prompt
If you just want a scraper fast, paste this prompt and replace the two values in angle brackets: the target URL and the fields you want. The agent runs the Bright Data CLI throughnpx, builds the scraper and runs it once. No self-healing.
Prompt
Prompt
Expected result: the agent reports a Collector ID like c_mpohus372o5tmid1jk, then prints a JSON array with one row containing the fields you asked for.
Build, run and self-heal in one prompt
To run the full build, run, heal, approve, re-run loop in action, paste this single prompt and let the agent work through every step. The pattern is deliberate: build a minimal scraper first, then heal it to extend the schema, so the heal envelope’spreview_result is easier to verify against a known-good baseline. The agent runs every Bright Data CLI command through npx, so nothing is installed globally.
Prompt
Expected result: the agent ends with a JSON row containingname,price,description,image_urlandrating, 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 authenticate the CLI
Prompt
Expected result: the agent prints a bdata version and confirms it is authenticated. npx fetches the CLI on demand, so nothing is installed globally.
2
Prompt the agent to build a minimal scraper
Prompt
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
Expected result: a JSON array with one row, populated withnameandpriceonly.
4
Prompt the agent to heal and add more fields
Prompt
Expected result: the agent reportsstatus: "awaiting_approval"with apreview_resultrow that now shows five fields.
5
Prompt the agent to approve the fix
Prompt
Expected result:statusadvances todone. The Collector ID is unchanged.
6
Prompt the agent to verify the expanded schema
Prompt
Expected result: the same JSON shape as the earlier run, now with three additional fields per row.
Related
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