# Got

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

Source: https://talira.ai/catalog/got-0csab4w7
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [libraries / http clients](https://talira.ai/categories/libraries/http-clients), [languages / javascript](https://talira.ai/categories/languages/javascript)
- Licence: MIT[^2]
- Pricing: Free and open source[^2]
- Free tier: yes[^2]
- Self-hostable: yes[^1]
- API: yes[^1]
- Plugins: yes[^1][^3]
- Creator: Sindre Sorhus

Got is an HTTP request library for Node.js with a promise API and a stream API. It covers what server-side code needs beyond `fetch`: retries on failure (on by default), timeouts for each phase of a request, a pagination API, RFC 7234 response caching, cookies, HTTP/2, proxies, Unix domain sockets, request timings and errors that carry metadata. Hooks, instances and plugins (such as wrappers for the [GitHub](https://talira.ai/catalog/github-ppcgj756.md) and [GitLab](https://talira.ai/catalog/gitlab-y85n5jcy.md) APIs or AWS-signed requests) build on it, and JSON responses can be validated with a Standard Schema validator. Sindre Sorhus and the same maintainers also make [Ky](https://talira.ai/catalog/ky-7jhb33p5.md), and Got's README now points most users to Ky, which is smaller and runs in browsers too; Got has migration guides from [axios](https://talira.ai/catalog/axios-0sg488rd.md) and the old `request` library.

## Links

- GitHub: https://github.com/sindresorhus/got
- Docs: https://github.com/sindresorhus/got/tree/main/documentation

## Problems it solves

- page through a REST API's paginated results in Node.js without writing the loop myself
- cache HTTP responses in Node.js following the Cache-Control headers the server sends
- keep cookies between requests in a Node.js script that logs in to a site
- set separate timeouts for DNS lookup, connect, TLS handshake and the response in Node.js
- measure how long each phase of an outbound HTTP request took
- stream a large download to disk with progress events in Node.js
- send HTTP requests over a Unix domain socket from Node.js
- retry failed requests automatically in a Node.js service, with hooks to refresh tokens
- replace the deprecated request package with something maintained
- make HTTP/2 requests from Node.js code

## Features

- promise API and stream API
- retries on failure, on by default
- advanced timeouts per request phase
- pagination API
- RFC 7234 compliant caching
- cookies
- HTTP/2 support
- proxy support and Unix domain sockets
- request timings
- errors with metadata
- hooks, instances and plugins
- progress events
- JSON mode and response validation with Standard Schema
- Diagnostics Channel integration
- migration guides from request, axios and Node.js http

## Limitations

- Doesn't run in the browser: it's an HTTP library for Node.js only[^1]
- Doesn't provide a CommonJS export: it's native ESM, so CommonJS projects must convert to ESM[^1]

## Capabilities

- Has an API: plan not known
- Takes plugins: plan not known

## Trust

Overall: 0.34 out of 1.
Signals: backing 0.20, extensibility 0.40.

- created by Sindre Sorhus
- has a plugin system

Warnings:

- GitHub activity not fetched yet

## Alternatives

- [SuperAgent](https://talira.ai/catalog/superagent-b9qa7pyb.md): Ajax for Node.js and browsers (JS HTTP client)
- [undici](https://talira.ai/catalog/undici-kmdjat1w.md): An HTTP/1.1 client, written from scratch for Node.js
- [node-fetch](https://talira.ai/catalog/node-fetch-f6wxdep8.md): A light-weight module that brings the Fetch API to Node.js
- [Ky](https://talira.ai/catalog/ky-7jhb33p5.md): Tiny & elegant JavaScript HTTP client based on the Fetch API
- [axios](https://talira.ai/catalog/axios-0sg488rd.md): Promise based HTTP client for the browser and node.js
- [ofetch](https://talira.ai/catalog/ofetch-brxwg7d2.md): A better fetch API. Works on node, browser, and workers.

## Sources

[^1]: https://github.com/sindresorhus/got (checked 20 Nov 2026)
[^2]: https://github.com/sindresorhus/got/blob/main/license (checked 20 Nov 2026)
[^3]: https://github.com/sindresorhus/got/blob/main/documentation/lets-make-a-plugin.md (checked 20 Nov 2026)
