Skip to content

About

OpenCode plugin for web search, scraping, and structured data from 1,200+ sites via Bright Data. Bot bypass, CAPTCHA solving, 5,000 free requests a month.

Resources

Stars

20 stars

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

opencode-brightdata

OpenCode plugin for Bright Data — gives your AI agent reliable web scraping, search, and structured data from 1,200+ sites via the Bright Data CLI.

Free tier: 5,000 requests/month across all commands - search, scrape, pipelines, and more. No credit card required.

Installation

The plugin works with OpenCode 2 and with OpenCode 1.4 or later.

OpenCode 2

opencode plugin add @brightdata/opencode-brightdata@latest

The @latest tag keeps the plugin up to date: OpenCode checks for a new version on startup and every 24 hours and installs it. Without a tag, OpenCode stays on the version you first installed.

Or add it to your opencode.json (or global ~/.config/opencode/opencode.json):

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["@brightdata/opencode-brightdata@latest"]
}

OpenCode 1.x

# Adds the plugin to this project; add -g to install it for every project
opencode plugin @brightdata/opencode-brightdata

Or add it to your opencode.json. OpenCode 1 uses the plugin key instead of plugins:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["@brightdata/opencode-brightdata"]
}

Then install the Bright Data CLI:

# macOS / Linux
curl -fsSL https://cli.brightdata.com/install.sh | bash

# Or via npm (any platform, requires Node.js 20+)
npm install -g @brightdata/cli

Authentication

On first use, the agent will prompt you to authenticate. You can also set up in advance:

# Browser login (recommended)
bdata login

# SSH or headless machine: sign in with a device code instead
bdata login --device

# Or set an API key
export BRIGHTDATA_API_KEY=your-api-key

Get an API key in your Bright Data account settings.

If any of these variables are set in your environment, the plugin passes them to shell commands, so the CLI and skill scripts can use them:

Variable Purpose
BRIGHTDATA_API_KEY API key (skips bdata login)
BRIGHTDATA_UNLOCKER_ZONE Web Unlocker zone for scraping
BRIGHTDATA_SERP_ZONE SERP API zone for search
BRIGHTDATA_POLLING_TIMEOUT How long to wait for async jobs, in seconds (default 600)

What it does

This plugin registers Bright Data skills with OpenCode. Once installed, the agent can:

  • Search Google, Bing, and Yandex with structured JSON results
  • Scrape any webpage to clean markdown, HTML, JSON, or screenshots — with automatic bot bypass and CAPTCHA solving
  • Pipelines — run any of 1,300+ pre-built scrapers for 1,200+ sites, including Amazon, LinkedIn, Instagram, TikTok, YouTube, and Reddit
  • Build scrapers — guided 6-phase workflow for creating production-ready scrapers
  • MCP integration — guidance for the Bright Data MCP server's 30 tools: search, page fetching, pre-built scrapers, company and people search, and browser automation
  • Design mirroring — replicate any website's visual design system
  • Best practices — auto-loaded API reference when writing Bright Data code
  • Python SDK — guidance for the brightdata-sdk package

Links

License

MIT

About

OpenCode plugin for web search, scraping, and structured data from 1,200+ sites via Bright Data. Bot bypass, CAPTCHA solving, 5,000 free requests a month.

Resources

Stars

20 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages