{
 "kind": "tool",
 "slug": "axios",
 "path": "tools/axios/",
 "name": "Axios",
 "maker": null,
 "density": "full",
 "crumbs": [
  [
   "Tools",
   "tools/"
  ],
  [
   "HTTP clients and networking",
   "tools/http-clients/"
  ]
 ],
 "lead": "Send web requests from browser or Node.js.",
 "chips": [
  {
   "label": "HTTP clients and networking",
   "path": "tools/http-clients/"
  },
  {
   "label": "NPM"
  }
 ],
 "primary": {
  "label": "Copy install command",
  "copy": "npm install axios"
 },
 "links": [
  {
   "label": "GitHub",
   "href": "https://github.com/axios/axios"
  },
  {
   "label": "Website",
   "href": "https://axios-http.com"
  }
 ],
 "track": "New versions, deprecation and license changes on your dashboard",
 "verdicts": [
  {
   "key": "license",
   "label": "License",
   "value": "MIT",
   "status": "yes",
   "sub": "Use it in paid apps",
   "quote": "Permission is hereby granted, free of charge, to any person obtaining a copy of this software",
   "note": "MIT allows use in paid and closed-source apps.",
   "src": "https://github.com/axios/axios/blob/v1.x/LICENSE"
  },
  {
   "key": "maint",
   "label": "Maintained",
   "value": "Maintained",
   "status": "yes",
   "sub": "Last change Nov 23, 2026",
   "note": "Latest GitHub release Nov 9, 2026. ",
   "src": "https://github.com/axios/axios"
  },
  {
   "key": "pop",
   "label": "Used by agents' projects",
   "value": "470 projects",
   "status": "info",
   "sub": "#1 of 126 in its category",
   "note": "Dependency in 470 public GitHub projects set up for AI coding agents that we scanned (7.5%).",
   "src": null
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Docs for agents",
   "status": "yes",
   "sub": "llms.txt",
   "note": "Agent skills for this library in the skills catalog; community skills are written by others, read them before you install.",
   "src": "https://nodejs.org/llms.txt"
  }
 ],
 "vfoot": "From the package registry and GitHub, checked daily; card checked Nov 11, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Axios does",
   "parts": [
    {
     "t": "prose",
     "text": "Axios is a free JavaScript library your app uses to talk to other servers, from the browser or from Node.js. You set the server address, sign-in header and time limit once, and every request reuses them. Failed requests come back as clear errors you can show to users."
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "One client for your backend",
       "text": "Your frontend calls your own server from many screens; one shared client adds the address, the sign-in token and a time limit to every call.",
       "idea": false
      },
      {
       "title": "Friendly messages when calls fail",
       "text": "When an order is not found or the server is too slow, show a clear message instead of a blank page.",
       "idea": false
      },
      {
       "title": "Stop an old search request",
       "text": "A search box sends a request on each key; cancel the previous one so an old answer never replaces a newer one.",
       "idea": false
      },
      {
       "title": "Upload with a progress bar",
       "text": "A file upload form fills a progress bar while a photo or document goes up to your server.",
       "idea": false
      },
      {
       "title": "Retry when the server hiccups",
       "text": "When your server briefly fails, try the same request again a few times, waiting a bit longer each time.",
       "idea": false
      },
      {
       "title": "Safe calls to unknown servers",
       "text": "A server-side job fetches pages or files from addresses users give; set a size cap so one bad reply cannot fill the memory.",
       "idea": false
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Axios popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "91",
       "of": "/ 100",
       "l": "Gid Score, #9 overall"
      },
      {
       "n": "15M",
       "l": "downloads a week, npm"
      },
      {
       "n": "109K",
       "l": "GitHub stars"
      },
      {
       "n": "470",
       "l": "agent projects use it"
      }
     ]
    },
    {
     "t": "small",
     "text": "Gid Score measures public popularity and activity, not quality.",
     "link": "How the Gid Score is calculated",
     "path": "tools/top/"
    }
   ]
  },
  {
   "id": "usage",
   "nav": "How it is used",
   "h2": "How Axios is used",
   "parts": [
    {
     "t": "list",
     "items": [
      "Axios is a dependency in 470 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (9.7% of the 4,867 JavaScript/TypeScript ones), #1 of 126 in http clients and networking.",
      "Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 2,127; those are left out of every share on this page.",
      "The most used alternative in our scan is undici (107 projects).",
      "Projects that use it most often also use Tailwind CSS (61.1%), concurrently (27.9%), Vite (43.8%).",
      "It is more common in projects set up for Junie (32.4%) than for Claude Code (6.9%)."
     ]
    },
    {
     "t": "h3",
     "text": "By coding agent"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "245 projects, 10.0%",
       "v": "Cursor",
       "path": "agents/cursor/"
      },
      {
       "l": "227 projects, 6.9%",
       "v": "Claude Code",
       "path": "agents/claude-code/"
      },
      {
       "l": "221 projects, 7.3%",
       "v": "GitHub Copilot",
       "path": "agents/github-copilot/"
      },
      {
       "l": "58 projects, 12.2%",
       "v": "Gemini CLI",
       "path": "agents/gemini-cli/"
      },
      {
       "l": "44 projects, 9.4%",
       "v": "OpenAI Codex",
       "path": "agents/openai-codex/"
      },
      {
       "l": "39 projects, 11.4%",
       "v": "OpenCode",
       "path": "agents/opencode/"
      },
      {
       "l": "26 projects, 9.3%",
       "v": "Devin Desktop",
       "path": "agents/devin-desktop/"
      },
      {
       "l": "24 projects, 32.4%",
       "v": "Junie",
       "path": "agents/junie/"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Often used with"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In 61.1% of its projects",
       "v": "Tailwind CSS",
       "path": "tools/tailwindcss/"
      },
      {
       "l": "In 27.9% of its projects",
       "v": "concurrently",
       "path": "tools/concurrently/"
      },
      {
       "l": "In 43.8% of its projects",
       "v": "Vite",
       "path": "tools/vite/"
      },
      {
       "l": "In 69.6% of its projects",
       "v": "TypeScript",
       "path": "tools/typescript/"
      },
      {
       "l": "In 53.8% of its projects",
       "v": "ESLint",
       "path": "tools/eslint/"
      },
      {
       "l": "In 19.8% of its projects",
       "v": "Laravel Vite Plugin",
       "path": "tools/laravel-vite-plugin/"
      },
      {
       "l": "In 34.0% of its projects",
       "v": "dotenv",
       "path": "tools/dotenv/"
      },
      {
       "l": "In 47.9% of its projects",
       "v": "React",
       "path": "tools/react/"
      }
     ]
    }
   ]
  },
  {
   "id": "profile",
   "nav": "Profile",
   "h2": "Axios in practice",
   "parts": [
    {
     "t": "h3",
     "text": "Strengths"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "One hook point for requests, responses and errors",
       "v": "The site says the interceptor system lets you \"control the request and response lifecycle\". It also says you can modify requests, responses and errors there."
      },
      {
       "l": "Types come in the package",
       "v": "The site says \"axios declares types and has full support for TypeScript.\""
      },
      {
       "l": "Config reads hardened against prototype pollution",
       "v": "v1.20.0 hardened how Axios reads behavioral configuration against \"shared and foreign prototype pollution\". It also normalized unsafe interceptor replacement objects."
      },
      {
       "l": "Keep-alive sockets no longer pin response data",
       "v": "In Node.js, v1.20.0 stopped per-socket error listeners from holding on to request context. Before the fix, completed response data could stay in memory for the lifetime of pooled keep-alive sockets."
      }
     ]
    },
    {
     "t": "h3",
     "text": "Watch out for"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "CancelToken is on the way out",
       "v": "The README's table of contents lists two cancellation sections. The <code>AbortController</code> section has no tag. The <code>CancelToken</code> section is tagged deprecated in its anchor."
      },
      {
       "l": "A v0 security callout points to a sponsor",
       "v": "Both the website and the README carry a callout, \"Get Security Updates for Axios v0\", that links to herodevs.com. HeroDevs appears in the sponsor list. The sources do not explain how v0 is maintained."
      },
      {
       "l": "413 and 422 have new names",
       "v": "v1.20.0 adds <code>ContentTooLarge</code> and <code>UnprocessableContent</code>. It keeps <code>PayloadTooLarge</code> and <code>UnprocessableEntity</code> as \"backward-compatible deprecated aliases\". The notes list this under \"Breaking Changes &amp;amp; Deprecations\"."
      }
     ]
    }
   ]
  },
  {
   "id": "more",
   "nav": null,
   "spy_as": "profile",
   "h2": "More about Axios",
   "parts": [
    {
     "t": "more",
     "items": [
      {
       "title": "Funding",
       "path": "tools/funding/",
       "items": [
        "GitHub Sponsors: https://github.com/axios",
        "Open Collective: https://opencollective.com/axios",
        "19 GitHub sponsors"
       ]
      },
      {
       "title": "Head to head",
       "items": [
        {
         "text": "Axios vs undici",
         "note": "used together in 21 projects",
         "path": "tools/compare/axios-vs-undici/"
        },
        {
         "text": "Axios vs node-fetch",
         "note": "used together in 36 projects",
         "path": "tools/compare/axios-vs-node-fetch/"
        }
       ]
      },
      {
       "title": "Packages around it",
       "items": [
        "dotenv: Loads .env files",
        "@solana/web3.js: Solana JavaScript SDK",
        "tailwindcss: Utility-first CSS",
        "ts-node: Run TypeScript in Node",
        "@solana/spl-token: Solana token client"
       ]
      },
      {
       "title": "More in HTTP clients and networking",
       "path": "tools/http-clients/",
       "items": [
        {
         "text": "Requests",
         "path": "tools/requests-py/"
        },
        {
         "text": "httpx",
         "path": "tools/httpx/"
        },
        {
         "text": "ws",
         "path": "tools/ws/"
        },
        {
         "text": "postgres",
         "path": "tools/postgres/"
        },
        {
         "text": "aiohttp",
         "path": "tools/aiohttp/"
        },
        {
         "text": "websockets",
         "path": "tools/websockets/"
        },
        {
         "text": "redis (Python)",
         "path": "tools/redis-pypi/"
        },
        {
         "text": "ioredis",
         "path": "tools/ioredis/"
        }
       ]
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Axios",
       "me": true,
       "facts": [
        "MIT",
        "Gid 91",
        "15M/wk"
       ]
      },
      {
       "name": "Ky",
       "why": "Pick ky when you want a tiny client built on the browser's own fetch and do not need upload progress or Node's older http module.",
       "path": "tools/ky/",
       "facts": []
      },
      {
       "name": "Got",
       "why": "Pick got when the code runs only in Node.js and you want built-in retries, hooks and streams.",
       "path": "tools/got/",
       "facts": []
      },
      {
       "name": "undici",
       "why": "Pick undici when the code runs only on a Node.js server and request speed matters most.",
       "path": "tools/undici/",
       "facts": [
        "MIT",
        "Gid 76",
        "355M/wk"
       ]
      },
      {
       "name": "node-fetch",
       "why": "Bring the Fetch API to Node.js for making HTTP requests.",
       "path": "tools/node-fetch/",
       "facts": [
        "MIT",
        "Gid 75",
        "301M/wk"
       ]
      }
     ],
     "more": "Compare Axios with another tool",
     "more_path": "tools/compare/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Use axios (pin axios@1.21.1 with a lockfile) and make one axios.create() client with our baseURL and a timeout, add the auth header in a request interceptor, cancel stale requests with AbortController, and handle errors by e.code and e.response.status."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install it into your project.",
       "code": "npm install axios",
       "src": "https://github.com/axios/axios/blob/v1.x/README.md"
      },
      {
       "text": "Import it. With require, only the default export is there.",
       "code": "import axios, { isCancel, AxiosError } from 'axios';\n// const axios = require('axios');\n",
       "src": "https://github.com/axios/axios/blob/v1.x/README.md"
      },
      {
       "text": "Make one instance with your server address and a time limit, and use it everywhere.",
       "code": "const instance = axios.create({\n  baseURL: 'https://some-domain.com/api/',\n  timeout: 1000,\n  headers: { 'X-Custom-Header': 'foobar' },\n});\n",
       "src": "https://github.com/axios/axios/blob/v1.x/README.md"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Rules for your agent"
    },
    {
     "t": "rules",
     "label": "Paste into AGENTS.md or CLAUDE.md",
     "text": "## Axios\n- The README's table of contents tags the `CancelToken` and \"Concurrency\" sections as deprecated. For cancellation, it lists an `AbortController` section; do not add new code that uses the deprecated APIs.\n- When global defaults, instance defaults and per-request config overlap, check the README's \"Config order of precedence\" section rather than guessing which one wins.\n- For HTTP 413 and 422, use `ContentTooLarge` and `UnprocessableContent`. Since v1.20.0, `PayloadTooLarge` and `UnprocessableEntity` are deprecated aliases.\n- In browser code on v1.20.0+, expect navigation-canceled XHR requests to reject with `ECONNABORTED`, not to resolve with status 0.\n- On v1.20.0+, invalid DNS lookup and `httpVersion` failures surface as `AxiosError.ERR_BAD_OPTION_VALUE`.\n- Before upgrading to v1.20.0, read PR #11141 for its documented compatibility effects on Fetch redirects, HTTP/2 DNS and proxy handling, `NO_PROXY` matching and data URIs.\n"
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "axios.get(url) with no timeout in production code",
       "fix": "Set timeout on the instance (axios.create({ timeout: 5000 })) and handle ECONNABORTED and ETIMEDOUT",
       "why": "Without a timeout a stalled request never ends; in our run with the fetch adapter the timeout came back as ETIMEDOUT, while the docs name ECONNABORTED as the usual code, so check both."
      },
      {
       "dont": "new axios.CancelToken(...) / source.cancel() in new code",
       "fix": "Pass { signal: controller.signal } from an AbortController and test with axios.isCancel(e)",
       "why": "CancelToken is deprecated; AbortController is the supported way since 0.22.0, and our demo cancel ended with ERR_CANCELED."
      },
      {
       "dont": "axios.all([...]) and axios.spread(...)",
       "fix": "Promise.all([...]) with array destructuring",
       "why": "The concurrency helpers are deprecated."
      },
      {
       "dont": "const { isCancel } = require('axios')",
       "fix": "const axios = require('axios'); axios.isCancel(e) — or use import { isCancel } from 'axios'",
       "why": "With require only the default export is available."
      },
      {
       "dont": "\"axios\": \"^1.x\" with no lockfile, or a CDN script without a version",
       "fix": "Pin the exact version in a lockfile and run npm audit signatures in CI",
       "why": "The axios docs tell users to check release provenance with npm audit signatures and to treat a missing attestation on an attested version as a possible supply-chain incident."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Does it work in both the browser and Node.js?",
       "a": "Yes. It uses XMLHttpRequest in the browser, the http module in Node.js, and can switch to fetch.",
       "evidence": {
        "url": "https://github.com/axios/axios/blob/v1.x/README.md",
        "quote": "Make XMLHttpRequests from the browser."
       }
      },
      {
       "q": "Why does a 404 or 500 land in catch?",
       "a": "Axios treats any status outside 200-299 as an error. Change that with validateStatus.",
       "evidence": {
        "url": "https://github.com/axios/axios/blob/v1.x/README.md",
        "quote": "By default, Axios rejects responses with status codes outside the 2xx range."
       }
      },
      {
       "q": "How do I cancel a request?",
       "a": "Pass an AbortController signal and call abort(). The older CancelToken is deprecated.",
       "evidence": {
        "url": "https://github.com/axios/axios/blob/v1.x/README.md",
        "quote": "Since v0.22.0, Axios supports AbortController"
       }
      },
      {
       "q": "Does it retry failed requests by itself?",
       "a": "No. The docs show how to add retries with a response interceptor.",
       "evidence": {
        "url": "https://axios.rest/pages/advanced/retry",
        "quote": "Implementing a retry strategy in an interceptor lets you handle these failures transparently, without cluttering your application code."
       }
      },
      {
       "q": "Can I use it in a paid product?",
       "a": "Yes, it is MIT licensed; keep its license notice in copies you ship.",
       "evidence": {
        "url": "https://github.com/axios/axios/blob/v1.x/LICENSE",
        "quote": "The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software."
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Package",
   "npm axios"
  ],
  [
   "Category",
   "HTTP clients and networking"
  ],
  [
   "License",
   "MIT"
  ],
  [
   "Latest version",
   "v1.20.0, August 24, 2026"
  ],
  [
   "On GitHub since",
   "August 2014"
  ],
  [
   "Gid Score",
   "91.0"
  ],
  [
   "Rank in category",
   "#1 of 126"
  ],
  [
   "GitHub",
   "axios/axios"
  ],
  [
   "Last change",
   "Nov 23, 2026"
  ]
 ],
 "good": [
  "Without a time limit, a stalled request can wait forever. Always set timeout in real apps.",
  "By default there is no size limit on replies. On a server that calls unknown sites, set one, or a tiny packed reply can use up the memory.",
  "In the browser, the default way of sending requests ignores that size limit; switch to the fetch mode if you need it there."
 ],
 "checked_line": "Read by AgentGid from 14 official pages, card checked Nov 11, 2026; numbers update daily.",
 "logo": "https://agentgid.com/media/avatars/axios.png"
}