Skip to content
JS
Comparison

openapi-fetch vs openapi-typescript-codegen

Documentation toolingPackage data 25 Sept 2026
openapi-fetchv0.17.0, 11 Feb 2026

Fast, type-safe fetch client for your OpenAPI schema. Only 6 kb (min). Works with React, Vue, Svelte, or vanilla JS.

$ npm install openapi-fetch
openapi-typescript-codegenv0.31.0, 20 Jun 2026

Library that generates Typescript clients based on the OpenAPI specification.

$ npm install openapi-typescript-codegen
Metricopenapi-fetchopenapi-typescript-codegenDifference
Weekly downloads6,577,083346,049openapi-fetch 19.0x higher
12-month download growth+383%+54%openapi-fetch +329 pts
Gzip size---
Minified size---
Dependencies15openapi-typescript-codegen 4 more
Unpacked size223 kB225 kBopenapi-fetch 1% smaller
Latest release0.17.0, 11 Feb 20260.31.0, 20 Jun 2026openapi-typescript-codegen 4 months more recent
Releases, last 12 months52openapi-fetch 3 more
First published14 Mar 202324 Nov 2019openapi-typescript-codegen 3.3 years earlier
GitHub stars8,3823,369openapi-fetch 2.5x higher
Open issues210169openapi-fetch 41 more
Open pull requests8044openapi-fetch 36 more
Contributors---
Commits, last 52 weeks212423openapi-typescript-codegen 2.0x higher
TypeScript typesBundledBundledSame
Module formatESM + CommonJSCommonJSDiffers
Runtimes---
LicenseMITMITSame

Green marks the smaller size or the more recent release. Bold marks the higher count, with no judgement implied. Sizes are for the whole package per Bundlephobia. Growth compares the average of the last 4 weeks with the first 4 weeks of the 52-week series.

openapi-fetch6.5m latest weekopenapi-typescript-codegen346k latest week
Week of 23 Sept 2025Week of 15 Sept 2026
Weekly npm downloads, 52 weeks. Y axis starts at zero. Values are not smoothed.

openapi-fetch

Major versions
  1. 0.0.014 Mar 2023
Last 5 releases
  1. 0.17.011 Feb 2026
  2. 0.16.08 Feb 2026
  3. 0.15.28 Feb 2026
  4. 0.15.014 Oct 2025
  5. 0.14.12 Oct 2025
77 releases in total, 5 in the last 12 months

openapi-typescript-codegen

Major versions
  1. 0.0.124 Nov 2019
Last 5 releases
  1. 0.31.020 Jun 2026
  2. 0.30.022 Dec 2025
  3. 0.29.07 Apr 2024
  4. 0.28.019 Mar 2024
  5. 0.27.015 Jan 2024
99 releases in total, 2 in the last 12 months
openapi-fetch

-

openapi-typescript-codegen

-

openapi-fetch

-

openapi-typescript-codegen

-

  • Need both ESM and CommonJS entry pointsopenapi-fetch (openapi-fetch: ESM + CommonJS; openapi-typescript-codegen: CommonJS)
  • Need to load it with require()Both
  • Need TypeScript types in the package itselfBoth
  • Need the more recent releaseopenapi-typescript-codegen (0.31.0 on 20 Jun 2026 vs 0.17.0 on 11 Feb 2026)
  • Higher weekly npm downloadsopenapi-fetch (6.6m vs 346k)

Each line is generated from the data above.

Indexability: Indexed.