MockAPI vs MockWebServer
MockAPI
mockapi.ioMockWebServer
square.github.ioSide by side
| Figure | MockAPI | MockWebServer |
|---|---|---|
| Price from | $2.92/mo | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| Android | — | Yes |
| API | Yes | — |
| Plans published | 3 | 2 |
| Spec score · API Mocking Tools | 8.9 (#4) | 7.7 (#14) |
| Purpose | MockAPI provides hosted REST APIs for prototyping, testing and learning. | MockWebServer is a library for testing HTTP, HTTPS, and HTTP/2 clients. |
Plans
In their own words
MockAPI
MockAPI lets users create REST API endpoints, generate custom data, and operate on it through a RESTful interface. Each project receives a unique base URL shared by its endpoints. Users define resource schemas and field-level generators, including Faker.js functions such as lorem.sentences and datatype.boolean. Relations between resources can be configured, with endpoints generated automatically. Generated resources support GET, POST, PUT, PATCH, and DELETE operations. Listed query capabilities include pagination, sorting, filtering, data generation, and customizable responses, and OpenAPI import is supported. The service is described for prototyping, testing, and learning. Documentation covers projects, resources, data generation, code examples, filtering, pagination, and relations. The Free plan costs nothing for 1 project and 2 resources. Paid monthly access costs $5 a month, and paid annual access costs $35 a year; each paid plan allows 20 projects and 50 resources. Custom endpoints and webhooks are marked coming soon.
MockWebServer
MockWebServer is a free, open-source Android test library for developers checking HTTP clients. It provides a scriptable local server where tests supply canned responses and inspect requests made during HTTP, HTTPS, or HTTP/2 calls. Recorded requests expose method, path, HTTP version, body, headers, and chunk sizes for verification. Responses can be queued in sequence or generated by a Dispatcher that applies a request-by-request policy. Tests can throttle responses to imitate slow networks, and socket policies can keep connections open, disconnect during request or response bodies, or send no response. The README includes Java and Kotlin examples. The documented dependency is com.squareup.okhttp3:mockwebserver3:5.5.0, available through Maven Central. MockWebServer is licensed under Apache License 2.0 and is intended for internal and basic testing of apps using OkHttp. The project says it is not a full-featured standalone HTTP testing library and is not actively developed for new features; it suggests MockServer when requirements exceed its scope.