Skip to content

chromedp

13,367 6 - MIT
v0.23.1 (14 Nov 2026) Feb 04 2022 58.1 thousand (month)

ChromeDP is an open-source library for driving browsers using the Chrome DevTools Protocol (CDP) in the Go programming language. It is a high-level library that abstracts away the low-level details of interacting with the CDP and provides a simple, intuitive API for performing common browser automation tasks such as clicking elements, filling out forms, and taking screenshots.

ChromeDP also supports parallel execution of browser tasks, making it well-suited for large-scale web scraping and testing applications. It is considered as one of the most popular Go package for automation and scraping tasks.

Example Use


package main

import (
  "context"
  "fmt"

  "github.com/chromedp/chromedp"
)

func main() {
  var title, firstParagraph string

  // create context
  ctx, cancel := chromedp.NewContext(context.Background())
  defer cancel()

  // run task list (a scraping scenario)
  err := chromedp.Run(ctx,
    // go to page
    chromedp.Navigate("https://www.example.com"),
    // wait for element to load
    chromedp.WaitVisible("body"),
    // extract text from an element (css selector)
    chromedp.Text("title", &title),
    // extract first paragraph element
    chromedp.First(chromedp.ByTagName("p"), &firstParagraph),
  )
  if err != nil {
    fmt.Println("error:", err)
    return
  }

  fmt.Printf("Title: %s\n", title)
  fmt.Printf("First paragraph: %s\n", firstParagraph)
}

Alternatives / Similar


rod
7,156 v0.116.2 (2024-07-12 11:52:28 ago) Sep 23 2022 compare

Other Languages

100,187 1.65.1 (2026-11-14 06:11:24 ago) Jan 23 2015 compare
15,108 1.65.2 (2026-11-14 00:28:39 ago) Feb 24 2021 compare
34,589 4.52.0 (2026-10-29 13:09:41 ago) Apr 25 2008 compare
26,052 4.4.0 (2026-11-14 00:29:47 ago) Oct 29 2024 compare
121,035 1.0.4 (2026-11-13 20:56:54 ago) Nov 01 2024 compare
12,907 3.5.5 (2024-02-17 17:18:36 ago) Sep 04 2020 compare
13,281 0.5.9 (2026-11-01 06:22:04 ago) Mar 01 2024 compare
4,939 0.50.99 (2026-10-26 13:47:46 ago) Jan 15 2024 compare
7,142 3.0.1 (2026-11-08 11:38:44 ago) Jun 01 2024 compare
1,834 0.7.1 (2026-11-13 15:27:15 ago) Dec 28 2012 compare
3,072 v2.4.0 (2026-01-08 05:29:21 ago) Jul 17 2018 compare
23,420 1.0.57 (2026-11-06 21:43:49 ago) Feb 01 2024 compare
859 1.9.4 (2024-10-22 01:41:19 ago) Jul 22 2022 compare
4,190 3.5 (2020-06-16 13:27:02 ago) Apr 25 2014 compare
Was this page helpful?