PACKAGE · HTTP CLIENT

got

Human-friendly and powerful HTTP request library for Node.js

WEEKLY DOWNLOADS 40.7M
STARS 14.9K
FORKS 1.0K
OPEN ISSUES 1
GZIP SIZE 49.1 kB
UNPACKED SIZE 449.0 kB
DEPENDENCIES 18
LAST UPDATED 9mo ago
DOWNLOAD TRENDS

got downloads · last 12 months

Download trends for got1 download series from Oct 2025 to Sep 2026. Use left and right arrow keys to inspect monthly values.042.4M84.9M127.3M169.7MOct 2025JanAprJulSep 2026
got
ABOUT GOT

Got is a powerful and user-friendly HTTP request library for Node.js, designed to simplify the process of making outbound HTTP requests. It abstracts away the complexities of network communication, providing a clean and intuitive API for developers to interact with web services and APIs. This library aims to offer a more pleasant developer experience compared to Node.js's built-in `http` and `https` modules, while still delivering high performance and extensive features.

The core philosophy behind Got is to provide a modern, promise-based interface that is easy to learn and use, catering to both beginners and experienced Node.js developers. It prioritizes developer ergonomics without sacrificing essential functionality, making it a go-to choice for applications requiring reliable network interactions.

Got's API is built around a fluent, chainable interface that allows for the construction of complex requests with minimal boilerplate. Key features include automatic JSON parsing, comprehensive error handling, support for various HTTP methods, request retries with backoff strategies, and streaming capabilities for both requests and responses. The use of AbortController for request cancellation is also a prominent pattern.

This library integrates seamlessly into various Node.js workflows and frameworks. It is well-suited for building backend services, APIs, microservices, and command-line tools that need to communicate with external resources. Its promise-based nature makes it a natural fit for modern asynchronous JavaScript development patterns, including `async/await`.

With 41.2 million weekly downloads and 14.9K GitHub stars, Got is a mature and widely adopted library in the Node.js ecosystem. Its unpacked size is 449.0 kB, with a gzipped bundle size of 49.1 kB, indicating a reasonable footprint for its feature set. The library has maintained a low number of open issues, reflecting its stability and active maintenance.

While Got is highly capable, developers should be aware that its extensive feature set might introduce a learning curve for those accustomed to simpler HTTP clients. For extremely simple, one-off requests with minimal error handling needs, the overhead of importing and configuring Got might be more than necessary, though its ease of use often mitigates this concern.

WHEN TO USE
  • When making complex HTTP requests with features like automatic JSON parsing, response type handling, and retry logic.
  • For integrating with RESTful APIs where detailed control over request options, headers, and body is required.
  • When building server-side applications in Node.js that need to communicate with external services or third-party APIs.
  • For implementing streaming uploads or downloads using `stream.Readable` and `stream.Writable` interfaces.
  • When leveraging `AbortController` for graceful request cancellation and timeout management.
  • For implementing advanced networking patterns such as request queuing or custom retry strategies.
  • When a promise-based, asynchronous approach to HTTP requests is preferred over callbacks.
WHEN NOT TO USE
  • If your application only requires very basic GET requests and does not need advanced error handling or features like retries; Node.js's built-in `http` module might suffice.
  • When targeting environments with extremely strict module size limitations and only basic HTTP capabilities are needed; a more minimal alternative might be considered.
  • If you are building a simple, static client-side application that interacts with a single API; a browser's native `fetch` API is often adequate and avoids server-side dependencies.
  • When you need to intercept and modify requests or responses globally across an application; consider a dedicated proxy or middleware solution.
  • If the project's sole network requirement is downloading small files without complex authentication or error handling; a dedicated file download utility could be simpler.

CORRECTIONS

Spot wrong data here?

A short note helps us fix it.

Anonymous · No account · No email back

COMPARISONS 6
got vs ky ★ 17.1K · 6.9M/wk got vs node-fetch ★ 8.9K · 202.4M/wk got vs ofetch ★ 5.4K · 28.2M/wk got vs axios ★ 109.2K · 113.9M/wk got vs superagent ★ 16.6K · 22.9M/wk got vs undici ★ 7.7K · 197.6M/wk