Test your APIs under realistic traffic conditions

API Load Testing

Use standalone k6 scripts to compare API latency and failed requests at an agreed concurrency. The example below uses virtual users; loadtest.dev’s declarative plans instead set a request rate.
Standalone k6 example
Adapt this script and run it with k6 against an approved target. loadtest.dev accepts declarative GET/HEAD plans; it does not execute these scripts.
Standalone k6 examples for HTTP API requests
Choose a VU executor or an arrival-rate executor for your traffic model
Real-time response time and error rate monitoring
Custom headers, authentication, and payloads
JavaScript-based test scripting with k6
Detailed percentile breakdowns (p50, p95, p99)
api-load-test.js
import http from 'k6/http';
import { check, sleep } from 'k6';

export const options = {
  vus: 100,
  duration: '2m',
};

export default function () {
  const res = http.get('https://api.example.com/users');
  check(res, {
    'status is 200': (r) => r.status === 200,
    'response time < 500ms': (r) => r.timings.duration < 500,
  });
  sleep(1);
}

Frequently asked questions

Related guides

REST API Benchmarking
Compare REST API endpoint latency with standalone k6 Trend metrics and per-endpoint thresholds, using the same traffic and data between test runs.
GraphQL Load Testing
Adapt a standalone k6 script for GraphQL queries and mutations, validate response errors, and compare operation latency on your approved endpoint.
WebSocket Load Testing
Use a standalone k6 WebSocket script to open connections, exchange messages, check responses, and examine behavior under agreed concurrency limits.

Use an HTTP plan with loadtest.dev

For estate apps, declare GET/HEAD requests to a verified hostname and submit a plan through the authenticated API.
loadtest.dev — Part of the Narduk Enterprises network