Skip to main content

Fetch anything.Type everything.

Cache, retries, dedupe, offline and realtime, built in. Every protocol through one typed createRequest().

Get Started
HyperFlow devtools, free for every platform
Companies that use BetterTyped open-source software
What is HyperFetch

One framework, three parts

01

Request

Describe each endpoint once. Fully typed.

getUser
Returns a User
createUser
Takes a typed payload
getPosts
Returns Post[]
02

Engine

Cache, dedupe, retries and offline. Built in.

Cache0 ms
Dedupe1 call
Retryauto
Offlinequeued
03

Fetcher

Swap the protocol. Keep your code.

04

Typed response

Data or error. Never throws.

data User
error Typed
05

Breaks in your editor

Not in production.

Backendname: string
Requestdata.name
Screen<p>{user.name}</p>
Works everywhere

Runs on every platform

Frontend

  • React
  • Next.js
  • Any SPA

Native

  • React Native
  • Electron
  • Hybrid apps

Runtime

  • Node.js
  • Bun
  • Deno
  • Edge

Realtime

  • WebSockets
  • SSE
  • Firebase

Protocols

  • OpenAPI
  • GraphQL
  • tRPC
  • oRPC

AI agents

  • Claude Code
  • Cursor
  • Codex

TypeScript backends

  • NestJS
  • Express
  • Fastify
  • Hono
  • Elysia
  • more

Any backend

  • FastAPI
  • Django
  • Spring
  • .NET
  • Laravel
  • Rails

Tooling

  • Sentry
  • ESLint
  • Oxlint
  • Devtools
SDK from your code

Your backend, as a typed SDK

Generate it from OpenAPI in one command, or read it from your Hono and Elysia types. No hand-written client.

Get your SDK

Generate it or write it. Fully typed.

const user = await sdk

Plug in any protocol

Swap the adapter. Same calls.

file_type_rest/users
Your app
Waiting for data

Ship it

Cache, retries and offline. Built in.

useFetch()
Cache
HIT
Queue
Adapter
Server
Online
cache HIT · instant

End-to-end TypeScript

Params inferred from the URL. Typed payloads, responses and errors.

React hooks built in

useFetch for queries. useSubmit for mutations. States handled.

HyperFlow devtools

Inspect every request, cache entry and queue.

Runs everywhere

Browser, Node, edge, mobile and SSR. Same behavior.

Optimistic updates

Update the UI first. Roll back if the server says no.

Smart deduplication

Five components ask for the same data. One request fires.

Built by BetterTyped

BetterTyped open source, the family HyperFetch comes fromMeet BetterTyped
16.7M+
downloads a month
across every BetterTyped library
3.3k+
GitHub stars
across every BetterTyped repo
10 years
of building open source
and still shipping
Your API layer

One typed client for every API

Every protocol. One .send(). Fully typed.

RESTGET /users/42→ User
OpenAPIsdk.orders.$get→ Order[]
oRPCposts.list→ Post[]
Firebaseusers/42→ User
tRPCuser.byId→ User

Seven protocols. One .send(). Every response typed.

Persistence

Everything is JSON

Requests, cache and queues save as plain JSON. Close the app. Pick up where you left off.

3 queued
App closed
Lost

Offline

Requests wait in memory. Close the app and they are gone.

3 queued
Saved as JSON
Synced

Persisted

Requests wait in storage. They send on the next start.

@hyper-fetch/dbSoonOffline-first apps that sync when you are back online. No database in the browser.
Why this exists

Same bugs, different projects

Every team files these. HyperFetch closes them.

6Open0Closed
  • Profile still shows the old name after save
    #1284bug
  • TypeError: Cannot read properties of undefined (reading 'email')
    #1291bug
  • Chat drops messages after reconnect
    #1302bug
  • Orders lost while the user was offline
    #1317bug
  • Agent called /api/user. The route is /users/:userId
    #1325bug
  • Dashboard fires the same request five times
    #1331bug
Support the development

Partners and sponsors

HyperFetch is MIT licensed and built in the open. These teams and people keep it moving.

Your logo here

Your brand on every docs page, seen by the teams behind 100k+ npm downloads a month.

Partner with us

Backed by

Past sponsors who funded HyperFetch. Be the next one on GitHub Sponsors.

Start building

Fetch anything. Type everything.

Every protocol. Every framework. Ready for your AI agent.

Get Started
Apache 2.0
Open source
1.3k
GitHub stars
100k+
Downloads a month