JavaScript HTTP and data fetching libraries

Explore Axios, TanStack Query, SWR, and other packages for HTTP requests and asynchronous application data.

8 indexed packages. Inspect package specifications and compare alternatives according to their actual role in your application.

Packages in this category

  • TanStack Query: Powerful asynchronous state management for your applications.
  • SWR: React Hooks for data fetching with a stale-while-revalidate strategy.
  • axios: Promise based HTTP client for the browser and node.js
  • graphql-request: Minimal GraphQL client supporting Node and browsers for scripts or simple apps.
  • @apollo/client: A fully-featured caching GraphQL client.
  • urql: A highly customizable and versatile GraphQL client for React
  • ky: Tiny and elegant HTTP client based on the Fetch API
  • ofetch: A better fetch API. Works on node, browser and workers.

What to compare

  • Separate an HTTP request client from a data-cache and synchronization layer.
  • Check documented cancellation, retries, authentication hooks, and request/response handling.
  • Inspect browser and server requirements and any required framework integration.
  • Treat download counts as adoption signals, not proof that the API fits your network workflow.

Example package specifications

@tanstack/react-query

Latest version5.105.0
Runtime dependencies1
Bundled typesBundled declarations
Gzip measurement12.89 KiB

Evidence and freshness

swr

Latest version2.5.1
Runtime dependencies2
Bundled typesBundled declarations
Gzip measurement5.58 KiB

Evidence and freshness

Category comparisons

Filter this category by your requirements