     [Blog](https://scrapfly.io/blog)   /  [data-parsing](https://scrapfly.io/blog/tag/data-parsing)   /  [9 Best Go (Golang) Web Scraping Libraries and APIs in 2026](https://scrapfly.io/blog/posts/best-go-web-scraping-libraries)   # 9 Best Go (Golang) Web Scraping Libraries and APIs in 2026

 by [Mohab Yousry](https://scrapfly.io/blog/author/mohab-yousry-9396552a) Oct 14, 2026 14 min read [\#data-parsing](https://scrapfly.io/blog/tag/data-parsing) [\#golang](https://scrapfly.io/blog/tag/golang) [\#tools](https://scrapfly.io/blog/tag/tools) 

 [  ](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries "Share on LinkedIn") [  ](https://x.com/intent/tweet?url=https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries&text=9%20Best%20Go%20%28Golang%29%20Web%20Scraping%20Libraries%20and%20APIs%20in%202026 "Share on X") [  ](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries "Share on Facebook")    

 

 

Summarize this article with

 [  ](https://chat.openai.com/?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries) [  ](https://claude.ai/new?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries) [  ](https://x.com/i/grok?text=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries) [  ](https://www.perplexity.ai/search/new?q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries) [  ](https://www.google.com/search?udm=50&aep=11&q=Summarize%20this%20article%20and%20explain%20how%20Scrapfly%20helps%20me%20scrape%20any%20website%20at%20scale%20and%20bypass%20anti-bot%20systems%20for%20my%20use%20case%3A%20https%3A%2F%2Fscrapfly.io%2Fblog%2Fposts%2Fbest-go-web-scraping-libraries) 



         

   **Web Scraping API — Anti-Bot Bypass**Bypass any anti-scraper system and automatically resolve JavaScript and fingerprint challenges.

 

 [ Learn More  ](https://scrapfly.io/products/web-scraping-api#features) [  Docs ](https://scrapfly.io/docs/scrape-api/getting-started#features) 

 

 

Your `Go` scrapers break often, this doesn't mean they were badly built maybe it was just a wrong tool choice. Each tool solves a problem and you have to identify your problems to choose the suitable tools for your scraper.

In this guide, we will showcase 9 tools. One managed API and eight `Go` components you run yourself. Now let's understand each of them, know their output and what was each one built for.



## Key Takeaways

- Choosing your stack should combine simplicity with the solution to the problems facing you
- The only managed choice on the list is Scrapfly API, it overcomes anti-bots and renders JavaScript
- `net/http` makes a request to a static page, then choose your parser depending on what do you want to query the response if it's CSS selectors use `goquery`, XPath then `htmlquery`
- Colly facilitates scraping multiple pages
- Rod and chromedp control Chromium only while Playwright-Go can also control Firefox and webkit

**Get web scraping tips in your inbox**Trusted by 100K+ developers and 30K+ enterprises. Unsubscribe anytime.







## Go Web Scraping Library VS API in 2026

Be smart about your choice. Picking one of them should be all about choosing the simplest layer that returns the required output.



These picks does not go head to head. You usually combine two or more in the same scraper.

| Component | Best for | Stable release | Release date | License |
|---|---|---|---|---|
| Scrapfly Web Scraping API | Blocked + JS pages | Go SDK v1.6.0 | Sep 2026 | BSD 2-Clause License |
| `net/http` | HTTP fetching | Go 1.27.2 | Oct 2026 | BSD-3-Clause |
| goquery | CSS parsing | v1.13.0 | Aug 2026 | BSD-3-Clause |
| htmlquery | XPath parsing | v1.3.7 | Oct 2026 | MIT |
| Colly | Multi-page crawls | v2.3.0 | Dec 2025 | Apache-2.0 |
| Rod | Fluent Chrome flows | v0.116.2 | Jul 2024 | MIT |
| chromedp | CDP task sequences | v0.21.0 | Oct 2026 | MIT |
| Playwright-Go | Cross-browser flows | v0.6201.1 | Aug 2026 | MIT |
| Ferret | Declarative rules | v1.0.0 | May 2026 | Apache-2.0 |

I checked all eight components here in October 2026, they were all maintained recently. Just keep in mind that Rod's latest stable release was 2 years ago, but it showed recent commits in August 2026, so it is still active.

If you picked the components you need, here is our guide to implementation:

[Web Scraping with Go: Colly, goquery, and Browser Tools in 2026Learn web scraping with Golang, from native HTTP requests and HTML parsing to a step-by-step guide to using Colly, the Go web crawling package.](https://scrapfly.io/blog/posts/web-scraping-with-go)



## 1. Scrapfly Web Scraping API

If you are facing challenges like blocking, rate limiting or JavaScript rendering, then [Scrapfly Web Scraping API](https://scrapfly.io/products/web-scraping-api) is your best pick. Let it do the hard work then parse the output with the rest of your pipeline.

Here is the [official module](https://github.com/scrapfly/go-scrapfly), latest release `1.6.0` was in September 2026. It is under the BSD-2-Clause license and maintained directly by Scrapfly. Check [Scrapfly Go SDK documentation](https://scrapfly.io/docs/sdk/golang) and you will find everything you need about it.

Let’s see how to use it:

1. Provide your API through `scrapfly.New`
2. Add all your parameters needed to send the request with `scrapfly.ScrapeConfig`
3. Call `client.Scrape`
4. You will find the HTML document at `result.Result.Content` or as I did in the next example get a goquery document with `result.Selector()`



go

```go
package main

import (
	"fmt"
	"log"
	"net/http"
	"os"
	"strings"
	"time"

	scrapfly "github.com/scrapfly/go-scrapfly"
)

func main() {
	client, err := scrapfly.New(os.Getenv("SCRAPFLY_API_KEY"))
	if err != nil {
		log.Fatal(err)
	}
	// Scrapfly asks clients to allow a 155-second read timeout.
	client.SetHTTPClient(&http.Client{Timeout: 155 * time.Second})

	result, err := client.Scrape(&scrapfly.ScrapeConfig{
		URL:             "https://web-scraping.dev/products",
		Unblocker:       scrapfly.BoolPtr(true),
		RenderJS:        true,
		WaitForSelector: ".product h3 a",
	})
	if err != nil {
		log.Fatal(err)
	}

	doc, err := result.Selector()
	if err != nil {
		log.Fatal(err)
	}
	fmt.Println(strings.TrimSpace(doc.Find(".product h3 a").First().Text()))
}
```



To run it install the SDK with

shell

```shell
go get github.com/scrapfly/go-scrapfly@v1.6.0
```



then set your API key and you are good to go. Here is the output:

text

```text
Box of Chocolate Candy
```



The configurations I used here in the `scrapfly.ScrapeConfig` are:

- `URL` which is the target page
- `Unblocker` for anti-bot protection, previously called ASP
- `RenderJS` uses a real browser
- `WaitForSelector` waits until a certain CSS selector appears

You will find all the parameters here in the [Scrapfly API reference](https://scrapfly.io/docs/scrape-api/getting-started).

As you will find in the previous code example I said that "Scrapfly asks clients to allow a 155-second read timeout." this is stated in the API docs and it needed the highlight as the `Go` client built by `scrapfly.New` only lasts 150 seconds, so `SetHTTPClient` is the solution here.

If you prioritize saving credits, then try using `CostBudget` in the parameters. The `unblocker` can raise the costs and pairing it with `CostBudget` balances that.

If you want to learn more about anti-bot systems, see

[How to Bypass Anti-Bot Protection in 2026: All 8 Major VendorsIdentify and bypass Cloudflare, DataDome, PerimeterX, Kasada, Akamai, Incapsula, F5, and AWS WAF with Python code examples and success rate data.](https://scrapfly.io/blog/posts/how-to-bypass-anti-bot-protection)



## 2. net/http

The second entry is for the basic problem, when you just need to make requests. It ships with `Go`, released in October 2026 under the Go's BSD-3-Clause license.

Let's get to know the workflow better. You build the request then call `client.Do(req)` this sends a request and return 2 things response and error. The response contains `Header`, `Body` and `StatusCode`. Check the status first then pass the body to the parser.

It provides useful controls. Here are some of them you will find helpful in your scraping journey:

- `Context` it cancel or timeout a request
- `Jar` sustains cookies that is useful in cases like logins
- `Proxy` you will need it when you start scraping at volume or need to change the country
- `Header` sets user agent for example
- `CheckRedirect` makes you choose whether to follow or not a certain redirect

To know more about each of these or get introduced to more controls see [Go docs](https://pkg.go.dev/net/http).

There is a point worth noting here, you have to set a timeout for the client created as `http.Client`'s `Timeout` default is `0`. Having no timeout means your scraper can hang forever waiting for a certain response.



## 3. goquery

[goquery](https://github.com/PuerkitoBio/goquery) is an HTML parsing library that implements common jQuery features in Go, allowing for full-featured DOM tree manipulation. Its latest version, `1.13.0`, was released in August 2026 under the BSD-3-Clause license.

CSS selectors are by far the most common way to parse HTML documents and they're available in Go through the `goquery` package. So, it's the natural next step after fetching the page with `net/http`.

A `goquery` document object is created using the response body with `NewDocumentFromReader`. Then, we select elements with `Find()` and a CSS selector, and loop over the matches with `Each()`, reading each element's text with `Text()`.

Note that `Find()` doesn't complain when a selector matches nothing. It simply returns an empty selection, so **we check `Length()`** before trusting the results.

Keep in mind that `goquery` is only a parser, so it doesn't fetch URLs or run JavaScript. For more on CSS selectors, see our [CSS selector guide](https://scrapfly.io/blog/posts/parsing-html-with-css).

XPath is a great replacement for cases where `goquery` and CSS selectors aren't enough, so let's take a look at htmlquery next.



## 4. htmlquery

[htmlquery](https://github.com/antchfx/htmlquery) is an HTML querying package that enables parsing with XPath selectors. Its latest version, `1.3.7`, was released in October 2026 under the MIT license.

XPath provides a friendly syntax for selecting HTML elements through virtual attributes and matches while also being much more powerful than CSS selectors.

For example, we can find a price by the "Price" label next to it, or move up from a matched element to its parent.

We parse the HTML document with `Parse()`. Similar to `goquery`, we use the `Find()` and `FindOne()` methods to select the desired elements, where `FindOne()` only returns the first match.

Then, `InnerText()` is used to select the element's text value and `SelectAttr()` is used to select attributes. Like `goquery`, it doesn't run JavaScript.

[Parsing HTML with XpathIntroduction to xpath in the context of web-scraping. How to extract data from HTML documents using xpath, best practices and available tools.](https://scrapfly.io/blog/posts/parsing-html-with-xpath)

Both parsers work on one page at a time. Crawling is an extremely useful technique in the data scraping context, as it provides the web data scraper with navigation capabilities, so let's take a look at Colly next.



## 5. Colly

[Colly](https://go-colly.org/) is a web scraping framework for building scrapers and crawlers in Go using collectors and callbacks. Unlike the parsers above, it can handle a whole website instead of a single page.

Its latest version, `2.3.0`, was released in December 2025 under the Apache-2.0 license. I checked the repository in October 2026 and found commits from that month, so the project is still active.

A Golang Colly scraper requires at least one collector. A collector is the core component responsible for managing the entire scraping process, and it doesn't return the pages to us.

Instead, the next essential component of Golang Colly is callbacks. These are manually defined functions to handle specific events happening during the HTTP lifecycle:

- `OnRequest` is triggered just before an HTTP request is sent.
- `OnResponse` is triggered once an HTTP response is received.
- `OnHTML` is triggered once a specified CSS selector is found in the HTML.
- `OnError` is triggered when an error occurs while making HTTP requests.
- `OnScraped` is triggered once the response is processed by the other callbacks.

So, it's up to us to turn what the callbacks receive into records, in whatever way suits our pipeline.

Note that the import path has to include the version, `github.com/gocolly/colly/v2`. Without the `/v2` part, Go imports the old `github.com/gocolly/colly` package instead.

A collector can be configured using an options object. For example, `AllowedDomains` is a list of allowed domains to visit, and `MaxDepth` limits the recursion depth of visited URLs when crawling.

Colly also comes with URL queues and many more features, which are all listed in the [Colly docs](https://pkg.go.dev/github.com/gocolly/colly/v2).

However, Colly doesn't execute the page's JavaScript. On a JavaScript-heavy website, it gets an empty HTML skeleton, so the selectors don't match and the `OnHTML` callbacks are never called.

JavaScript pages need a real browser, so let's take a look at Rod next.



Scrapfly

#### Extract structured data automatically?

Scrapfly's Extraction API uses AI to turn any webpage into structured data — no selectors needed.

[Try Free →](https://scrapfly.io/register)## 6. Rod

[rod](https://pkg.go.dev/github.com/go-rod/rod) solves the JavaScript rendering problem and add a couple of options to make the whole process easier. Its latest stable version `0.116.2` released in July 2024 under MIT license. The version is old but the repo has got recent activity, so don't let that affect your decision.

If you worked with `Puppeteer` before you will enjoy using `Rod` as they work the same way. It sends commands over the CDP (Chrome DevTools Protocol) to control the browser and it gives you three objects. The `Browser` which is the whole process where you open pages, `Page` which is one tab where you can navigate, take screenshots or wait for an element to load and finally `element` which is a node in the page that `Rod` wait for to load then you can interact with it.

Rod has a separate [stealth package](https://pkg.go.dev/github.com/go-rod/stealth). Check it out for more detail.

`Rod` works best with `chromium` only flows. Reach for it when you are sure that the flow requires an interaction with the website.



## 7. chromedp

[Chromedp](https://github.com/chromedp/chromedp) is like `rod` but more low level. It also uses CDP to control the browser, so use it when you need full control. Latest version `0.21.0` released in October 2026 under the MIT license.

Here you describe the steps and it will follow like `Navigate`, `Wait` and `Text`

You can use it to do anything on a browser and as an example here is a use case. [web-scraping.dev/testimonials](https://web-scraping.dev/testimonials) returns at first 10 items then after the user scrolls it adds another 10. This kind of uses that needs interaction is where you will find `chromedp` helpful.



## 8. Playwright-Go

Until now we talked about Chromium only. What if you need your flow to run on Firefox and WebKit too? [Playwright-Go](https://github.com/mxschmitt/playwright-go) is built for that its latest version `0.6201.1` released on August 2026 under the MIT license.

If you used playwright before you will be familiar with every concept here. Lets understand how does it actually work in go. Here you have pieces talking to each other. Your go code sends to the Playwright driver that needs to match the Go module version.

That is the perk of Playwright-go to work on multiple browsers not limited to only one. If you want to know more browser automation tools, check our guide here

[Best Browser Automation Tools in 2026Compare managed execution, open-source frameworks, AI agents, and no-code/RPA by protocol, state, protected-site support, and operating burden.](https://scrapfly.io/blog/posts/best-browser-automation-tools)



## 9. Ferret

Last entry is a bit different. Ferret uses a query language (FQL), so if you are familiar with SQL this one will be easy for you and it responds with JSON. Its latest stable version `1.0.0` released in May 2026 under the Apache-2.0 license.

Here we can work with both static and browser pages as we can choose the driver we want to work with either it is HTTP or CDP. The real perk is in the structure. The extraction rules can live in FQL files separate from the go code, so they can be viewed or changed without touching the go code.

Watch out of the failed build error after you add Ferret to your project and import the HTTP driver. It complains about `missing go.sum entry`. If that happens with you, run `go mod tidy`.



## Make Up Your Mind

I summed up all of the entries in this decision diagram, know what you are dealing with and combine the tools that solves your problems.



Start by inspecting access and the raw response, then select the tool that produces the missing output.## FAQ

Is Colly Better Than goquery for Go Web Scraping?Each has its own job, they can not be compared. Colly is used for multipage crawls, and GoQuery is a parser that is used to query for a certain CSS selector.







Should You Use Rod, chromedp, or Playwright-Go?Use Rod for a fluent Chromium API, chromedp for context-driven CDP actions and network events, and Playwright-Go when Firefox or WebKit support matters. Check the raw response first, because none of the three is needed when the data already exists in static HTML.







Is Go Still Good for Web Scraping in 2026?Yes, Go is usually a strong choice for typed, long-running services and concurrent crawl workers.









## Conclusion

In this article, we've covered the 9 best Go packages and APIs for web scraping that cover several steps of the web scraping process, as each of them solves a different problem.

For web scraping connections, we've covered `net/http` which comes with Go's standard library. On the other hand, there's Rod, chromedp and Playwright-Go which use a whole headless web browser.

For data parsing, we've taken a look at `goquery` for CSS selectors and `htmlquery` for XPath. For crawling whole websites there's Colly, and Ferret keeps the extraction logic outside of the Go code.

Finally, for websites that block scrapers or need JavaScript at scale, we've looked at the Scrapfly Web Scraping API and its official Go SDK.



### Web Scraping API

Scrape any website with our powerful API. Anti-bot bypass, JavaScript rendering, and rotating proxies built-in.



[Try Web Scraping API](https://scrapfly.io/docs/scrape-api/getting-started)



 

   [  Add as a preferred source ](https://google.com/preferences/source?q=scrapfly.io) Table of Contents















 

  Table of Contents

- [Key Takeaways](#key-takeaways)
- [Go Web Scraping Library VS API in 2026](#go-web-scraping-library-vs-api-in-2026)
- [1. Scrapfly Web Scraping API](#1-scrapfly-web-scraping-api)
- [2. net/http](#2-net-http)
- [3. goquery](#3-goquery)
- [4. htmlquery](#4-htmlquery)
- [5. Colly](#5-colly)
- [6. Rod](#6-rod)
- [7. chromedp](#7-chromedp)
- [8. Playwright-Go](#8-playwright-go)
- [9. Ferret](#9-ferret)
- [Make Up Your Mind](#make-up-your-mind)
- [FAQ](#faq)
- [Conclusion](#conclusion)
 
    Join the Newsletter  Get monthly web scraping insights 

 

  



Scale Your Web Scraping

Anti-bot bypass, browser rendering, and rotating proxies, all in one API. Start with 1,000 free credits.

  No credit card required  1,000 free API credits  Anti-bot bypass included 

 [Start Free](https://scrapfly.io/register) [View Docs](https://scrapfly.io/docs/onboarding) 

 Not ready? Get our newsletter instead. 

 

 ## Related Articles

 [     

 python hidden-api 

### 3 Best Open-Source Job Scrapers for Multi-Board Data in 2026

Three open-source job scrapers ranked by board coverage, schema, and dated maintenance, plus a source-available Scrapfly...

 

 ](https://scrapfly.io/blog/posts/best-open-source-job-scrapers) [  

 http python 

### Web Scraping with Python

Introduction tutorial to web scraping with Python. How to collect and parse public data. Challenges, best practices and ...

 

 ](https://scrapfly.io/blog/posts/web-scraping-with-python) [  

 http nodejs 

### Web Scraping With NodeJS and Javascript

In this article we'll take a look at scraping using Javascript through NodeJS. We'll cover common web scraping libraries...

 

 ](https://scrapfly.io/blog/posts/web-scraping-with-nodejs) 

  



   



 Extract structured data with AI, **1,000 free credits** [Start Free](https://scrapfly.io/register)