Skip to main content

How to Load Test RESTful APIs with LoadFocus

How to Load Test RESTful APIs with LoadFocus

Key takeaways

  • To load test a REST API with LoadFocus, create a New Load Test, pick a location, set virtual users, duration and ramp-up, add your requests with their method, headers and body, run it, and read p95, errors and throughput.
  • The free API load test needs no account but sends GET requests from one location with up to 25 virtual users. Methods, headers, authentication and bodies need the full app.
  • Every virtual user runs your requests in order, so each endpoint gets an equal share of the traffic. A weighted mix needs separate tests or a JMeter or k6 script.
  • A 200 response with an error in the body counts as a success in a cloud load test. Check bodies with a script or an API monitor.

A REST API load test sends many parallel requests to your endpoints and measures how response time, throughput and errors change as the number of users grows. With LoadFocus you can set one up in the browser in a few minutes, without installing anything. This page walks through the steps as the product works today (read from the LoadFocus docs and product pages on 2026-10-23) and what to decide at each one.

What is a RESTful API, and what does that mean for a load test?

REST is an architectural style defined in Roy Fielding’s 2000 dissertation. Its constraints are client-server separation, stateless communication, cacheable responses, a uniform interface and a layered system, plus an optional code-on-demand constraint (ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm, read 2026-10-23). In practice a “REST API” is usually JSON over HTTP, using the methods GET, POST, PUT, PATCH and DELETE on URLs that name resources.

Two consequences matter for testing. Because each request must carry everything the server needs (Fielding: “cannot take advantage of any stored context on the server”), virtual users can send requests independently, and the credentials have to be in every request. And because the traffic is plain HTTP, any HTTP load testing tool can drive it; what differs between tools is how easily you can set methods, headers and bodies.

How do you load test a REST API with LoadFocus?

These steps follow the “How to Run a New Load Test” guide in the LoadFocus docs.

  1. Name the test. LoadFocus fills in a name from the current date and time. Replace it with something you can find later, such as the service and the change being tested.
  2. Choose a test location. This is the region the virtual users send requests from, so pick one close to your real clients. If your API sits behind a firewall, allow LoadFocus’s load generator addresses first (whitelist IPs).
  3. Pick a starting scenario. Three presets, Initial Load, Warm-up Load and Moderate Load, fill in the load configuration when you click Apply. Use one to get a first run, then edit the numbers.
  4. Set the load. Choose the number of virtual users, a duration or a number of iterations, the ramp-up time and the ramp-up steps. Ramp-up is the time to bring all virtual users online, and a step ramp raises the load in stages so the chart shows where the API starts to slow. During the 7-day free trial of a paid plan, every test is limited to 50 virtual users, 5-minute tests and 3 runs per day; the full plan limits apply when the trial ends.
  5. Add the requests. Enter the endpoint URL and choose the method (GET is the default; POST, PUT, PATCH, DELETE and the others are available). You can add several requests: each virtual user runs them in sequence, and you can drag them to reorder.
  6. Set the advanced options per request. Each request has its own query parameters, headers, POST body, Basic authentication and cookies, and these are not shared between requests. For a token-protected API, add the token as a header (an Authorization: Bearer ... line), and save common headers as a header preset to reuse them. The docs also have guides on the OAuth 2.0 grant types. Use a test account and a test environment, since POST, PUT and DELETE requests will really change data, many times over.
  7. Optionally set pass/fail thresholds. In the Pass/fail thresholds section you can set a maximum p95 or p99 response time, a maximum error rate and a minimum throughput. Every run is then graded PASS or FAIL against them, and a GitHub Action or the verdict API can block a deploy on a FAIL.
  8. Run the test and read the results. Results update while it runs. The overview shows samples, average response time, the 90th percentile, hits per second, total errors and error percentage, with a chart of response time against virtual users. Use the endpoint dropdown to look at one request at a time, and the Errors tab for status codes.

Paid plans also include an AI analysis of each result that explains the numbers in plain language (loadfocus.com/index.md, read 2026-10-23).

Can you test an API for free without an account?

Yes, within limits. The free API load test takes a public URL, runs GET requests with up to 25 virtual users from one location, and needs no account or card. For POST bodies, headers and authentication, sign in and use the full app, or upload a script.

What should a REST API load test cover?

  • The endpoints clients really call. Take the mix from your access logs or analytics, not from the list of routes. The LoadFocus UI runs every request for every virtual user, so an even split is the default; to model a 90/10 read/write mix, run separate tests per endpoint or use a JMeter script (LoadFocus accepts cURL, HAR, Postman and OpenAPI imports to build one) or a k6 script.
  • Realistic payloads. Request and response size change parsing, validation and database work. A minimal body understates the cost of a real request.
  • Authentication and sessions. An API that checks a token on every call behaves differently from one that skips it. Use test credentials and, for long runs, tokens that outlive the test.
  • Bodies, not just status codes. LoadFocus counts 4xx and 5xx responses and connection failures as errors. A 200 whose body contains an error object counts as a success. If that matters, check bodies in a JMeter or k6 script, or with API monitoring, which checks status codes and response bodies on a schedule.

Read the results by percentile rather than the average: a p95 or p99 shows the slow tail that users and timeouts hit (see why percentiles are more useful than averages). For test design, how to design your load testing scenarios covers user mixes and think time, and how throughput and response time are related explains why throughput stops growing when something saturates.

What has changed since this post was first written in 2021?

The 2021 version of this page explained REST and then stopped before any steps, and its only image was a stock photo, so there are no old screenshots here to go stale. The product has moved on since, so use the current docs for screens. Things the steps above rely on that a 2021 reader would not have seen described here: starting scenarios, step ramp-up, per-request headers with presets, pass/fail thresholds with a CI gate, results with percentiles and a per-endpoint view, and the option to run JMeter or k6 scripts on the same platform. The product pages now state 25+ cloud regions (loadfocus.com/index.md, 2026-10-23). Prices are on the pricing page and are not repeated here.

Written by Bogdan Vazzolla.

Frequently Asked Questions

How many virtual users should I use to load test a REST API?

Start from the traffic you expect at peak and convert it to users with the request rate and response time (see the throughput post above), then step up past that to find the limit. A first run with a preset scenario is a fine way to confirm the test works before you scale it.

Can LoadFocus load test an API that needs authentication?

Yes. Add the token or API key as a header on the request, use Basic authentication, or run a JMeter or k6 script that logs in first. Do not put secrets in the URL.

Can I load test GraphQL or SOAP endpoints too?

Yes, both are HTTP. The query or the SOAP envelope goes in the request body, set in the full app or in a script.

Does a load test change my data?

POST, PUT, PATCH and DELETE requests do exactly what they would for real clients, repeated for every virtual user. Run write tests against a test environment with disposable data.

Sources

Chris

Head of Content at LoadFocus

Chris leads content and oversees development across the services this blog covers. The guides and tool comparisons here come out of the same decisions that shape what ships.

Weekly tips right in your inbox.

Don’t miss out on the latest testing tips and tricks, tools and news related to software testing.

Already +20,000 members in the list.

The Load Testing Platform with AI That Explains Your Results

Load test websites and APIs from 25 cloud regions, monitor page speed and uptime, and get AI analysis that explains your results in plain English.

Cloud load testing, website speed and API monitoring in one place.

Hi there! Can I share a cool thing I'm working on with you?

A software testing newsletter that sparks joy.

Our goal is to create helpful content for software developers and testers.

If you're not into it, you can unsubscribe instantly.