apify/got-scraping — an open-source project — sits at 768 GitHub stars. HTTP client made for scraping based on got.
Snapshot summary built from the project's own GitHub metadata — there's no written TopGit review yet. The page will update automatically when a full review is published.
WHY NO REVIEW YET
TopGit writes full reviews for the most-starred, most-requested repositories. This page is a snapshot until then — see the READ ME tab for the original README in full.
After many years of development, we decided to deprecate the got-scraping package.
The package will no longer receive updates or support.
For new projects, we recommend using impit. impit is a modern, powerful, and flexible HTTP client with fetch API based on Rust's reqwest library. It provides a similar feature set to got-scraping, including browser-like request headers, proxy support, and more.
Got Scraping
Got Scraping is a small but powerful got extension with the purpose of sending browser-like requests out of the box. This is very essential in the web scraping industry to blend in with the website traffic.
Installation
$ npm install got-scraping
The module is now ESM only
This means you have to import it by using an import expression, or the import() method. You can do so by either migrating your project to ESM, or importing got-scraping in an async context
A non-primitive unique object which describes the current session. By default, it's undefined, so new headers will be generated every time. Headers generated with the same sessionToken never change.
Under the hood
Thanks to the included header-generator package, you can choose various browsers from different operating systems and devices. It generates all the headers automatically so you can focus on the important stuff instead.
Yet another goal is to simplify the usage of proxies. Just pass the proxyUrl option and you are set. Got Scraping automatically detects the HTTP protocol that the proxy server supports. After the connection is established, it does another ALPN negotiation for the end server. Once that is complete, Got Scraping can proceed with HTTP requests.
Using the same HTTP version that browsers do is important as well. Most modern browsers use HTTP/2, so Got Scraping is making a use of it too. Fortunately, this is already supported by Got - it automatically handles ALPN protocol negotiation to select the best available protocol.
HTTP/1.1 headers are always automatically formatted in Pascal-Case. However, there is an exception: x- headers are not modified in any way.
By default, Got Scraping will use an insecure HTTP parser, which allows to access websites with non-spec-compliant web servers.
Last but not least, Got Scraping comes with updated TLS configuration. Some websites make a fingerprint of it and compare it with real browsers. While Node.js doesn't support OpenSSL 3 yet, the current configuration still should work flawlessly.
To get more detailed information about the implementation, please refer to the source code.
Tips
This package can only generate all the standard attributes. You might want to add the referer header if necessary. Please bear in mind that these headers are made for GET requests for HTML documents. If you want to make POST requests or GET requests for any other content type, you should alter these headers according to your needs. You can do so by passing a headers option or writing a custom Got handler.
This package should provide a solid start for your browser request emulation process. All websites are built differently, and some of them might require some additional special care.
For more advanced usage please refer to the Got documentation.
JSON mode
You can parse JSON with this package too, but please bear in mind that the request header generation is done specifically for HTML content type. You might want to alter the generated headers to match the browser ones.
This section covers possible errors that might happen due to different site implementations.
RequestError: Client network socket disconnected before secure TLS connection was established
The error above can be a result of the server not supporting the provided TLS setings. Try changing the ciphers parameter to either undefined or a custom value.
No homepage URL was recorded for apify/got-scraping in TopGit's last sync. The README tab above frequently contains screenshots and demo links, or check the repository description on GitHub.
How many stars does apify/got-scraping have?
apify/got-scraping has 768 GitHub stars — refresh the page for the live number, or check github.com/apify/got-scraping. TopGit mirrors GitHub's count but does not claim minute-by-minute accuracy.
Is apify/got-scraping open source?
TopGit's metadata for apify/got-scraping does not record a license. Most public repositories on GitHub ARE open source, but the exact terms vary — verify by opening the LICENSE file directly.
What is apify/got-scraping?
apify/got-scraping (apify/got-scraping) is a TypeScript project on GitHub. From the project's own README: HTTP client made for scraping based on got.
Where do I read more about apify/got-scraping?
This TopGit page is a snapshot — the READ ME tab shows the project's own README content (links stripped, images preserved). The GitHub repository at github.com/apify/got-scraping is the definitive source.
Read full README in the tab above.
Want a second opinion on got-scraping?
Ask an AI that can read this page — one click and you get its take on got-scraping.