# Sample API Response Generator

> Generate realistic REST, JSON:API, GraphQL and error-envelope responses with pagination.

A sample API response generator builds realistic JSON payloads in the shapes real APIs use: a paginated REST collection, a single resource, a success envelope, JSON:API, a GraphQL data response, cursor pagination, an error object, or RFC 9457 problem details — complete with links, meta blocks and request identifiers.

**URL:** https://convertto.tech/t/sample-api-response-generator
**Category:** Samples & Mock Data (https://convertto.tech/c/sample-data)
**Privacy:** Runs entirely in the browser; no upload
**Cost:** Free, no sign-up
**Last updated:** 2026-08-01

## Key facts

- **Response styles:** Eight — REST collection and single, success envelope, JSON:API, GraphQL, cursor pagination, error object and RFC 9457 problem details
- **Pagination:** Page numbers, totals, page counts and next/previous links are all computed consistently
- **Privacy:** Runs entirely in your browser — nothing is uploaded
- **Cost:** Free, unlimited, no sign-up

## How to use

1. Choose the response style.
2. Choose the resource.
3. Set the items in this page.
4. Set the current page.
5. Set the page size.
6. Set the total records.
7. Choose the http status.
8. Turn "Include links and meta" on or off as needed.
9. Turn "Pretty-print" on or off as needed.
10. Enter or paste your seed.
11. The result appears immediately — copy or download it.

## FAQ

### What is RFC 9457?

The successor to RFC 7807, it standardises a machine-readable error body with type, title, status, detail and instance members, served as application/problem+json. Using it means clients can handle your errors without bespoke parsing.

### Why does the generator compute page links?

Because off-by-one errors in pagination links are one of the most common API bugs. Generating consistent next, previous, first and last links gives you a correct reference to test your own implementation against.

## Related tools

- [Sample JSON Generator](https://convertto.tech/t/sample-json-generator): Turn a JSON Schema into realistic sample documents, respecting types, enums, formats and constraints.
- [API Request Builder](https://convertto.tech/t/api-request-builder): Build an HTTP request visually and get it as curl, fetch, axios, Python, Go or PHP code.
- [GraphQL Formatter](https://convertto.tech/t/graphql-formatter): Format or minify a GraphQL query, mutation or schema, and inspect its depth.
- [HTTP Status Code Reference](https://convertto.tech/t/http-status-codes): Look up what any HTTP status code means and when to use it.
- [JSON Schema Generator](https://convertto.tech/t/json-schema-generator): Infer a JSON Schema from example data, detecting types, string formats and required keys.
- [Mock Data Generator](https://convertto.tech/t/mock-data-generator): Generate realistic fake test data in 14 formats from 100+ field types, with reproducible seeds.
- [AI API Cost Calculator](https://convertto.tech/t/ai-api-cost-calculator): Work out what a prompt costs per call, per day and per month, and compare the same workload across every major model.
- [cURL to Code Converter](https://convertto.tech/t/curl-to-code): Turn a cURL command into fetch, axios, Python requests or Node.js code.
