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.

Editor
Caught
Production
Works everywhere

Runs on every platform

Frontend

  • React
  • Next.js
  • Any SPA

Runtime

  • Node.js
  • Bun
  • Edge

Realtime

  • WebSockets
  • SSE
  • Firebase

Mobile

  • React Native
  • Hybrid apps

AI agents

  • Claude Code
  • Cursor
  • Codex

Backend

  • OpenAPI
  • GraphQL
  • tRPC
  • oRPC
  • Hono
  • more
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.

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

Our wonderful sponsors

Thank you to everyone keeping HyperFetch going. Join them through GitHub Sponsors.

HyperFetch sponsors
Start building

Fetch anything. Type everything.

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

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