# unjs/ofetch

😱 A better fetch API. Works everywhere.

Repository: https://github.com/unjs/ofetch
Canonical: https://ross.abutalabs.com/products/ofetch
Language: TypeScript
License: MIT
License Family: permissive
Last push: 2026-08-26T22:55:27+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 54, longevity 100
- inputs: {"age_days": 2093, "days_push": 7, "days_rel": 305, "gap_med": 17, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 5349, forks 189 (observed 2026-08-28T04:09:15.917835+00:00)

## What it is
ofetch is an improved fetch API client library for JavaScript/TypeScript that works across Node, browsers, and workers. It adds smart JSON parsing, automatic error handling, retries, and convenient request options on top of the native fetch API.

## Use cases
- make http requests with automatic  parsing
- fetch api that works in node and browser
- handle fetch errors with parsed response bodies
- retry failed http requests automatically
- send  request bodies without manual stringification
- download binary responses as blobs or streams

## When to choose
- you want a nicer fetch experience with less boilerplate across runtimes
- you need automatic error handling and retries for http calls
- you're building isomorphic JavaScript apps targeting node, browser, and workers

## When to avoid
- you need advanced features like interceptors, caching, or graphql that full clients like axios or ky offer differently
- you're happy with native fetch and don't want a dependency
- you need low-level control over every fetch option without wrapper behavior

## Facets
- artifact type: library
- maturity: active
- function: http-client, serialization, middleware
- domain: web-development, apis, developer-tools
- platform: browser, cross-platform, bun
- tags: fetch-wrapper, typescript, retry, -parsing, isomorphic, nodejs, deno

## Member repositories
- unjs/ofetch (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:15.917835+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:58:48.245757+00:00, confidence not recorded.
  - readme: https://github.com/unjs/ofetch (fetched 2026-08-28T04:09:15.917835+00:00, sha 37227f906fbb)
  - registry_npm: https://registry.npmjs.org/ofetch (fetched 2026-08-29T08:53:26.164411+00:00, sha 49b6d9b1c22e)
- Data as of 2026-08-30T08:39:29.467469+00:00.
