{
 "kind": "api",
 "slug": "azure-functions",
 "path": "apis/azure-functions/",
 "name": "Azure Functions",
 "logo": "https://agentgid.com/media/avatars/azure.png",
 "maker": "Microsoft",
 "density": "full",
 "crumbs": [
  [
   "APIs",
   "apis/"
  ],
  [
   "Hosting and deployment",
   "apis/hosting/"
  ]
 ],
 "lead": "Run small pieces of code without servers.",
 "chips": [
  {
   "label": "Hosting and deployment",
   "path": "apis/hosting/"
  },
  {
   "label": "Official MCP server"
  }
 ],
 "primary": {
  "label": "Copy prompt for your agent",
  "copy": "Create an Azure Functions app for me with the Node.js v4 programming model (@azure/functions, app.http), test it with func start, and plan it for the Flex Consumption plan; keep function keys and connection strings in app settings, never in browser code."
 },
 "links": [
  {
   "label": "Website",
   "href": "https://azure.microsoft.com/en-us/products/functions"
  },
  {
   "label": "Pricing",
   "href": "https://azure.microsoft.com/en-us/pricing/details/functions/"
  },
  {
   "label": "GitHub",
   "href": "https://github.com/Azure/azure-functions-host"
  }
 ],
 "track": "Outages, price changes and new versions on your dashboard",
 "verdicts": [
  {
   "key": "price",
   "label": "Price",
   "value": "Free every month",
   "status": "yes",
   "sub": "Then pay as you go",
   "quote": "\"tierMinimumUnits\":25000.0,\"retailPrice\":0.000004,\"unitPrice\":0.000004,\"armRegionName\":\"eastus\"",
   "note": "Free tier: Flex Consumption: 250,000 executions and 100,000 GB-s per month (Consumption plan: 1 million executions and 400,000 GB-s). As reported on the official pricing page, checked Oct 10, 2026.",
   "src": "https://azure.microsoft.com/en-us/pricing/details/functions/"
  },
  {
   "key": "commercial",
   "label": "Commercial use",
   "value": "Allowed",
   "status": "yes",
   "sub": null,
   "quote": "MIT License Copyright (c) .NET Foundation. All rights reserved.",
   "note": "A paid cloud service used under your Azure subscription; the runtime and the @azure/functions package are MIT.",
   "src": "https://github.com/Azure/azure-functions-host/blob/dev/LICENSE.txt"
  },
  {
   "key": "key",
   "label": "Key & sign-up",
   "value": "API key, server only",
   "status": "info",
   "sub": "Env var None for function keys; the app reads its storage connection from the AzureWebJobsStorage app setting",
   "quote": null,
   "note": "Calling a function: an access key in the ?code= query string or the x-functions-key header, unless the function is anonymous. Deploying and managing: your Azure account (Microsoft Entra ID) through az login.",
   "src": "https://learn.microsoft.com/en-us/azure/azure-functions/function-keys-how-to"
  },
  {
   "key": "agent",
   "label": "Agent access",
   "value": "Official MCP server",
   "status": "yes",
   "sub": "SDK",
   "quote": "The Azure MCP Server enables you to manage Azure Functions resources by using natural language prompts.",
   "note": " Our agent check: 4 of 6 (Nov 13, 2026).",
   "src": "https://learn.microsoft.com/en-us/azure/developer/azure-mcp-server/tools/azure-functions"
  }
 ],
 "vfoot": "Checked against the maker's official pages, pricing on Oct 10, 2026.",
 "blocks": [
  {
   "id": "overview",
   "nav": "Overview",
   "h2": "What Azure Functions does",
   "parts": [
    {
     "t": "prose",
     "text": "Azure Functions is a Microsoft cloud service that runs small pieces of your code when something happens, such as a web request, a file upload or a set time. You do not rent or manage a server; you pay for the runs and the memory used, with a monthly free allowance. It is a hosting platform for your own code, not a ready-made service with its own features."
    },
    {
     "t": "list",
     "items": [
      "Azure Functions is one of 17 APIs in the Hosting and deployment category on AgentGid.",
      "It is one of 15 that can be started for free.",
      "It ships an official MCP server, like 4 others here.",
      "Its official SDK is the 3rd most downloaded in the category (3.8M a week)."
     ],
     "muted": true
    },
    {
     "t": "h3",
     "text": "What people build with it"
    },
    {
     "t": "uses",
     "items": [
      {
       "title": "A small backend for your site",
       "text": "Give your website or app a few server addresses, such as \"save this form\" or \"get my orders\", without running a server.",
       "idea": false
      },
      {
       "title": "Jobs that run on a schedule",
       "text": "Clean up old records, send a daily report or refresh a cache every few minutes.",
       "idea": false
      },
      {
       "title": "React to uploaded files",
       "text": "When a user uploads a photo or document, make a thumbnail, read the text or move the file.",
       "idea": false
      },
      {
       "title": "Your own tools for AI assistants",
       "text": "Host a small server that gives AI assistants your own tools, such as \"look up an order\", on Azure.",
       "idea": false
      },
      {
       "title": "React to database changes",
       "text": "Run your own logic when a record is created or updated, such as sending a welcome email for a new customer.",
       "idea": false
      },
      {
       "title": "Receive payment notifications",
       "text": "Give a payment or form service an address to call when something happens, and update your records from there.",
       "idea": true
      }
     ]
    }
   ]
  },
  {
   "id": "popularity",
   "nav": "Popularity",
   "h2": "Azure Functions popularity",
   "parts": [
    {
     "t": "stats",
     "items": [
      {
       "n": "3.8M",
       "l": "SDK downloads a week",
       "d": "+34.6% on the 4-week average",
       "up": true
      },
      {
       "n": "41",
       "l": "public agent repos use its SDK"
      },
      {
       "n": "2,026",
       "l": "GitHub stars, Azure/azure-functions-host"
      }
     ]
    },
    {
     "t": "small",
     "text": "SDK downloads from npm and PyPI, weekly. Numbers as of Nov 17, 2026."
    }
   ]
  },
  {
   "id": "pricing",
   "nav": "Pricing and limits",
   "h2": "Pricing",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Free tier",
       "v": "Flex Consumption: 250,000 executions and 100,000 GB-s per month (Consumption plan: 1 million executions and 400,000 GB-s)"
      },
      {
       "l": "Cheapest plan",
       "v": "No monthly plan"
      },
      {
       "l": "Usage price",
       "v": "Flex Consumption on-demand (East US): $0.000026 per GB-s, $0.40 per million executions; Consumption plan: $0.000016 per GB-s, $0.20 per million executions"
      },
      {
       "l": "Plans",
       "v": "Rates from Microsoft's retail prices API (prices.azure.com) for East US, since the pricing page renders prices client-side; prices vary by region."
      }
     ]
    },
    {
     "t": "h3",
     "text": "What one action costs"
    },
    {
     "t": "table",
     "head": [
      "Action",
      "Price"
     ],
     "num": true,
     "rows": [
      [
       "10 on-demand executions on Flex Consumption above the free grant (East US, retail prices API)",
       "$0.000004"
      ],
      [
       "1 GB-second of on-demand execution time on Flex Consumption above the free grant (East US)",
       "$0.000026"
      ],
      [
       "10 executions on the legacy Consumption plan above the free grant (East US)",
       "$0.000002"
      ]
     ]
    },
    {
     "t": "small",
     "text": "As reported on the official pricing page, checked Oct 10, 2026. Prices change: confirm before you buy.",
     "link": "azure.microsoft.com/en-us/pricing/details/functions",
     "href": "https://azure.microsoft.com/en-us/pricing/details/functions/"
    }
   ]
  },
  {
   "id": "limits",
   "nav": null,
   "spy_as": "pricing",
   "h2": "Limits",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Flex Consumption",
       "v": "Function timeout 30 minutes by default, can be unbounded",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale"
      },
      {
       "l": "Consumption (legacy)",
       "v": "Function timeout 5 minutes by default, 10 at most",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale"
      },
      {
       "l": "All plans, web requests",
       "v": "230 seconds to answer an HTTP request",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale"
      },
      {
       "l": "Flex Consumption",
       "v": "Instance memory of 512, 2,048 (default) or 4,096 MB",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-plan"
      },
      {
       "l": "Flex Consumption",
       "v": "App start must finish within 30 seconds",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/flex-consumption-plan"
      }
     ]
    },
    {
     "t": "small",
     "text": "From the official docs.",
     "link": "learn.microsoft.com/en-us/azure/azure-functions/functions-scale",
     "href": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale"
    }
   ]
  },
  {
   "id": "access",
   "nav": "Access and terms",
   "h2": "Key and access",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "How it signs in",
       "v": "Calling a function: an access key in the ?code= query string or the x-functions-key header, unless the function is anonymous. Deploying and managing: your Azure account (Microsoft Entra ID) through az login."
      },
      {
       "l": "Environment variable",
       "v": "None for function keys; the app reads its storage connection from the AzureWebJobsStorage app setting",
       "code": true
      },
      {
       "l": "Safe in browser code",
       "v": "No, keep it on your server",
       "status": "no"
      },
      {
       "l": "Card at sign-up",
       "v": "Not stated on the pages we read"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Steps only a person can do"
    },
    {
     "t": "list",
     "items": [
      "Create an Azure account and a pay-as-you-go subscription (the free grant applies only to paid subscriptions). Run az login, then create the resource group, storage account and function app with the quickstart's az commands.",
      "Choose a region that supports Flex Consumption and, if needed, request a higher regional memory quota. Use that region in az functionapp create --flexconsumption-location.",
      "Set a budget alert in the Azure portal so heavy traffic does not cause a surprise bill. No code change."
     ]
    }
   ]
  },
  {
   "id": "terms",
   "nav": null,
   "spy_as": "access",
   "h2": "Commercial use and your data",
   "parts": [
    {
     "t": "prose",
     "text": "Azure Functions is a paid Microsoft cloud service billed by use, with a monthly free allowance on pay-as-you-go accounts. The engine that runs functions and the Node.js package are open source under the MIT license."
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "In a paid app",
       "v": "Yes",
       "status": "yes",
       "sub": "A paid cloud service used under your Azure subscription; the runtime and the @azure/functions package are MIT.",
       "quote": "MIT License Copyright (c) .NET Foundation. All rights reserved.",
       "src": "https://github.com/Azure/azure-functions-host/blob/dev/LICENSE.txt"
      },
      {
       "l": "inside-app-bundle",
       "v": "Yes",
       "status": "yes",
       "sub": "The @azure/functions package is MIT; keep its license notice.",
       "quote": "\"license\":\"MIT\"",
       "src": "https://registry.npmjs.org/@azure/functions/latest"
      },
      {
       "l": "client-work",
       "v": "Yes",
       "status": "yes",
       "sub": "Build and deploy function apps for clients, ideally in the client's own Azure subscription so they own the bill.",
       "quote": "Free grants apply to paid, consumption subscriptions only.",
       "src": "https://azure.microsoft.com/en-us/pricing/details/functions/"
      },
      {
       "l": "Where data is stored",
       "v": "The region you pick for the function app; Flex Consumption is available in a list of regions you can query with the Azure command line.",
       "quote": "Use the az functionapp list-flexconsumption-locations command to view the list of currently supported regions.",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/how-to-create-function-azure-cli?pivots=programming-language-javascript"
      }
     ]
    }
   ]
  },
  {
   "id": "errors",
   "nav": null,
   "spy_as": "access",
   "h2": "Errors to handle",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "HTTP 502 after 230 seconds",
       "v": "The HTTP function did not answer in time; it keeps running but cannot reply.",
       "sub": "Return early and process the work asynchronously (queue or Durable Functions); retrying will hit the same limit."
      },
      {
       "l": "Azure Functions Runtime is unreachable",
       "v": "The runtime cannot start, most often because the app lost access to its storage account.",
       "sub": "Check that the storage account exists and that AzureWebJobsStorage is set and allowed through the firewall."
      },
      {
       "l": "Function timeout",
       "v": "A run took longer than functionTimeout in host.json; the language worker restarts.",
       "sub": "Raise functionTimeout within the plan's maximum, or split the work into smaller runs."
      },
      {
       "l": "System.TimeoutException at startup (Flex Consumption)",
       "v": "The app took longer than 30 seconds to start.",
       "sub": "Make startup lighter (smaller deployment, fewer startup calls); the timeout cannot be changed."
      },
      {
       "l": "HTTP 404 on /admin or /runtime routes",
       "v": "Those paths are reserved for the Functions host and never reach your code.",
       "sub": "Rename the function or route; do not retry."
      }
     ]
    }
   ]
  },
  {
   "id": "agent",
   "nav": "For agents",
   "h2": "Use it from an agent",
   "parts": [
    {
     "t": "rows",
     "rows": [
      {
       "l": "Our agent check",
       "v": "4 of 6: llms.txt no, OpenAPI no, SDK yes, MCP yes, status page yes, AI assistants allowed yes",
       "sub": "Checked Nov 13, 2026."
      },
      {
       "l": "MCP server",
       "v": "Azure MCP Server (Azure Functions tools)",
       "sub": "In Visual Studio 2022 version 17.14.30 or later, Azure MCP tools are included with the Azure development workload. No separate extension is required."
      },
      {
       "l": "npm",
       "v": "npm install @azure/functions",
       "code": true
      },
      {
       "l": "PyPI",
       "v": "pip install azure-functions",
       "code": true
      }
     ]
    },
    {
     "t": "h3",
     "text": "Instructions in its docs to check first"
    },
    {
     "t": "rows",
     "rows": [
      {
       "l": "The docs say",
       "v": "“This example prompt for Copilot Chat updates the existing function code to retrieve parameters from either the query string or JSON body.”",
       "sub": "The quickstart includes ready prompts for an AI assistant that rewrite the generated code; review the change with the person instead of applying it blindly."
      }
     ]
    }
   ]
  },
  {
   "id": "alternatives",
   "nav": "Alternatives",
   "h2": "Alternatives",
   "parts": [
    {
     "t": "alts",
     "items": [
      {
       "name": "Azure Functions",
       "me": true,
       "facts": [
        "from $0.000016 per GB-s",
        "Free tier",
        "Official MCP"
       ]
      },
      {
       "name": "Cloudflare Workers",
       "why": "Pick Cloudflare Workers when you want small functions running at the edge, close to users, in JavaScript, Rust, C or C++.",
       "path": "apis/cloudflare-workers/",
       "facts": [
        "See its page",
        "No free tier"
       ]
      },
      {
       "name": "Vercel",
       "why": "Pick Vercel when you host a Next.js or other web app and want its serverless functions deployed with the site.",
       "path": "apis/vercel/",
       "facts": [
        "Free plan",
        "Free tier",
        "Official MCP"
       ]
      },
      {
       "name": "OCI Functions",
       "why": "Pick OCI Functions when you already use Oracle Cloud; our catalog lists it at $0.0002 per 1,000 calls on 2026-11-10.",
       "path": "apis/oracle-cloud-functions/",
       "facts": [
        "$0.0002 / 1k requests",
        "Free tier"
       ]
      }
     ],
     "more": "All hosting and deployment APIs",
     "more_path": "apis/hosting/"
    }
   ]
  },
  {
   "id": "start",
   "nav": "Get started",
   "h2": "Get started",
   "parts": [
    {
     "t": "prompt",
     "text": "Create an Azure Functions app for me with the Node.js v4 programming model (@azure/functions, app.http), test it with func start, and plan it for the Flex Consumption plan; keep function keys and connection strings in app settings, never in browser code."
    },
    {
     "t": "steps",
     "items": [
      {
       "text": "Install Azure Functions Core Tools version 4 and Node.js 22 or newer on your computer.",
       "code": "npm i -g azure-functions-core-tools@4 --unsafe-perm true",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/how-to-create-function-azure-cli?pivots=programming-language-javascript"
      },
      {
       "text": "Create a project with one web function and run it locally.",
       "code": "func init --worker-runtime node --language javascript\nfunc new --name HttpExample --template \"HTTP trigger\" --authlevel \"function\"\nfunc start",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/how-to-create-function-azure-cli?pivots=programming-language-javascript"
      },
      {
       "text": "Sign in to Azure, create a function app on the Flex Consumption plan, and deploy (the quickstart lists the az commands).",
       "code": "az login",
       "src": "https://learn.microsoft.com/en-us/azure/azure-functions/how-to-create-function-azure-cli?pivots=programming-language-javascript"
      }
     ]
    },
    {
     "t": "h3",
     "text": "First request"
    },
    {
     "t": "tabs",
     "label": "First request",
     "items": [
      {
       "tab": "Request",
       "code": "func init --worker-runtime node --language javascript\nfunc new --name HttpExample --template \"HTTP trigger\" --authlevel \"function\"\nfunc start",
       "intro": null
      },
      {
       "tab": "Response",
       "code": "Http Functions:\nHttpExample: [GET,POST] http://localhost:7071/api/HttpExample"
      }
     ]
    },
    {
     "t": "h3",
     "text": "Mistakes to avoid"
    },
    {
     "t": "mistakes",
     "items": [
      {
       "dont": "Creating a new app on the Consumption plan, especially on Linux.",
       "fix": "Create new serverless apps on the Flex Consumption plan.",
       "why": "The Consumption plan is legacy and its Linux option retires on 30 September 2028."
      },
      {
       "dont": "Using the default (polling) blob trigger on a Flex Consumption app.",
       "fix": "Set the trigger source to EventGrid and set up the Event Grid subscription.",
       "why": "Flex Consumption supports only the event-based blob trigger."
      },
      {
       "dont": "Writing a five-field cron schedule such as '*/5 * * * *' for a timer trigger.",
       "fix": "Use six fields with seconds first, for example '0 */5 * * * *'.",
       "why": "Azure Functions reads NCRONTAB, which adds a seconds field at the start."
      },
      {
       "dont": "Doing long work inside a web request handler.",
       "fix": "Return quickly and hand long work to a queue or Durable Functions, then report the result.",
       "why": "After 230 seconds the load balancer returns HTTP 502 even though the function keeps running."
      },
      {
       "dont": "Putting a function key in browser or mobile app code to protect an endpoint.",
       "fix": "Keep keys on servers you control; for public clients add App Service authentication or API Management.",
       "why": "Function keys are shared secrets and the docs say not to distribute them in public apps."
      }
     ]
    }
   ]
  },
  {
   "id": "faq",
   "nav": "Questions",
   "h2": "Questions",
   "parts": [
    {
     "t": "faq",
     "items": [
      {
       "q": "Is there a free tier?",
       "a": "Yes, a monthly free grant on pay-as-you-go subscriptions; on Flex Consumption it is 250,000 runs and 100,000 GB-s.",
       "evidence": {
        "url": "https://azure.microsoft.com/en-us/pricing/details/functions/",
        "quote": "Flex consumption plan pricing includes a monthly free grant of 250,000 executions and 100,000 GB-s of resource consumption per month per subscription in pay-as-you-go on-demand pricing across all function apps in that subscription."
       }
      },
      {
       "q": "Which plan should I choose for a new app?",
       "a": "Flex Consumption. The older Consumption plan is legacy, and its Linux version retires on 30 September 2028.",
       "evidence": {
        "url": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale",
        "quote": "The option to host function apps on Linux in a Consumption plan is retiring on 30 September 2028."
       }
      },
      {
       "q": "Which languages can I write functions in?",
       "a": "C#, Java, JavaScript, PowerShell, Python or Go, and others such as Rust through custom handlers.",
       "evidence": {
        "url": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-overview",
        "quote": "Code in C#, Java, JavaScript, PowerShell, Python, or Go , or use custom handlers for languages like Rust."
       }
      },
      {
       "q": "Can I call a protected function from my web page?",
       "a": "Not with a function key in public code. Keys are shared secrets; for public clients use sign-in through App Service authentication or another layer.",
       "evidence": {
        "url": "https://learn.microsoft.com/en-us/azure/azure-functions/function-keys-how-to",
        "quote": "For example, don't distribute shared secrets in a public app."
       }
      },
      {
       "q": "How long can a function run?",
       "a": "On Flex Consumption the default limit is 30 minutes and it can be unbounded, but web requests must answer within 230 seconds.",
       "evidence": {
        "url": "https://learn.microsoft.com/en-us/azure/azure-functions/functions-scale",
        "quote": "Plan Default Maximum 1 Flex Consumption plan 30 Unbounded"
       }
      }
     ]
    }
   ]
  }
 ],
 "glance": [
  [
   "Maker",
   "Microsoft"
  ],
  [
   "Category",
   "Hosting and deployment"
  ],
  [
   "Price",
   "from $0.000016 per GB-s"
  ],
  [
   "Official SDK",
   "npm @azure/functions, PyPI azure-functions"
  ],
  [
   "Latest SDK",
   "4.17.0 on npm"
  ],
  [
   "Agent check",
   "4 of 6"
  ],
  [
   "Pricing checked",
   "Oct 10, 2026"
  ]
 ],
 "good": [
  "You need an Azure account and subscription to put functions online; local testing works without one.",
  "A web request must be answered within 230 seconds, whatever the time limit you set.",
  "Flex Consumption is the recommended plan for new apps and runs on Linux only."
 ],
 "checked_line": "Read by AgentGid from 24 official pages, card checked Nov 10, 2026; usage numbers update daily."
}