Start here
4 endpoints · 1 group
A live catalog of every endpoint, plus health checks.
View endpointsOpening your dashboard…
v2.0 · 新免费真实 API 接口无需注册支持 CORS
贴近真实的 REST 接口,用来开发前端、测试 HTTP 客户端,或者看看 API 实际怎么表现。 先用 35 个免费接口,无需账号,几秒内就能拿到真实的 JSON。
https://api.testingapis.comapi.testingapis.com/api/Products?limit=2[
{
"id": 1,
"title": "Wireless Noise-Cancelling Headphones",
"price": 249.99,
"description": "Over-ear headphones with 30hr battery life and active noise cancellation.",
"category": "electronics",
"image": "https://picsum.photos/seed/prod1/400/400",
"rating": {"rate": 4.3, "count": 127},
"inStock": true,
"createdAt": "2025-06-12T10:30:00Z"
},
…
]API 包含什么
数量直接取自 API 参考文档,始终与 API 实际提供的一致。探索真实接口、贴近真实的数据,以及更快开发和测试所需的细节。
19 种资源,如商品、图书、国家和员工,包含嵌套对象、日期、价格和图片。
POST、PUT、PATCH 和 DELETE 会真正修改数据,创建的记录可以再查回来。服务器重启后所有数据会重置。
为 Basic、Bearer、JWT、API Key、OAuth 2.0、OAuth 1.0a、Digest 和 HMAC 提供固定的测试凭证。
任意状态码、重定向、Cookie 和缓存头。在任意请求后加上 ?delay=3 或 ?error=503。
默认返回 JSON,还支持 XML、CSV、YAML、文件、流式响应、WebSocket、SOAP 和 GraphQL。
每个接口都有单独页面,列出参数、示例响应和“Try it”,登录用户还可获取 OpenAPI 文件。
在线调试
选一个接口或示例,修改请求,然后发送到正在运行的 API,不是模拟数据。 这 35 个接口无需账号即可使用;参考文档中列出了全部 360 个。
Query parameters
Any endpoint also takes delay (seconds, up to 10) and error (a status code).
Code examples
curl 'https://api.testingapis.com/api/Products?limit=3'No response yet
Press Send to call the live API. If it has been idle, the first response can take a few seconds.
API 参考
7 个分类下共 53 组接口。每组都有参考页面,附请求和响应示例。
4 endpoints · 1 group
A live catalog of every endpoint, plus health checks.
View endpoints44 endpoints · 7 groups
Methods, status codes, redirects, cookies, caching and request bodies.
View endpoints62 endpoints · 4 groups
Common content types, file downloads, JSON edge cases and utilities.
View endpoints38 endpoints · 6 groups
Auth schemes, OAuth 2.0 and 1.0a, JWT, rate limiting and payments.
View endpoints50 endpoints · 9 groups
Streaming, WebSockets, async jobs, pagination, failure injection and more.
View endpoints142 endpoints · 19 groups
Realistic data sets such as products, posts, books and countries.
View endpoints20 endpoints · 7 groups
The first version of the API: users in JSON and XML, uploads and auth tests.
View endpoints360 endpoints
Every endpoint with its parameters and example responses, the data models, GraphQL and an OpenAPI file for your tools.
使用场景
在真实 API 就绪之前,用贴近真实的 JSON 开发列表页、详情页和表单。资源支持分页、排序和搜索。
商品 API检查客户端如何发送方法、请求头、查询参数和请求体。Echo 接口会原样返回收到的内容。
Echo 接口使用已知的测试凭证练习 Basic、Bearer、JWT、API Key、OAuth 2.0、OAuth 1.0a、Digest 和 HMAC 流程,包括失败的情况。
认证测试接口强制返回 503、慢响应或异常的 JSON,看看你的应用如何应对,无需动真实服务。
按需返回错误课程讲解请求、响应、状态码和测试用例,边读边运行示例请求。
开始学习让 Postman 集合、测试套件和 CI 任务指向稳定的 URL,种子数据每次重启后都一样。
自动化 API 测试使用方法
选择一个接口,带上自己的参数发送真实请求,然后查看实时响应。 35 个核心接口无需账号。
在在线调试或参考文档中找到接口。每个接口都列出了参数和示例响应。
从你的应用、终端、Postman 或在线调试发送。就是普通的 HTTPS 调用。
curl 'https://api.testingapis.com/api/Products/1' \
-H 'Accept: application/json'查看状态码、响应头和 JSON,然后用在 UI 中,或在测试里写断言。
{
"id": 1,
"title": "Wireless Noise-Cancelling Headphones",
"price": 249.99,
"description": "Over-ear headphones with 30hr battery life and active noise cancellation.",
"category": "electronics",
"image": "https://picsum.photos/seed/prod1/400/400",
"rating": {"rate": 4.3, "count": 127},
"inStock": true,
"createdAt": "2025-06-12T10:30:00Z"
}快速开始
就是普通的 HTTPS 和 JSON,任何 HTTP 客户端都能用。每个示例都获取五个商品,无需密钥。
fetch('https://api.testingapis.com/api/Products?limit=5')
.then(res => res.json())
.then(data => console.log(data))[
{
"id": 1,
"title": "Wireless Noise-Cancelling Headphones",
"price": 249.99,
"description": "Over-ear headphones with 30hr battery life and active noise cancellation.",
"category": "electronics",
"image": "https://picsum.photos/seed/prod1/400/400",
"rating": { "rate": 4.3, "count": 127 },
"inStock": true,
"createdAt": "2025-06-12T10:30:00Z"
},
...
]响应默认为 JSON。列表接口支持 limit、page、sort 和 q。
35 个核心接口可免费调用。其余接口需加上你的密钥:
把它放在环境变量里,不要写进浏览器端代码。
支持 fetch、axios、requests、Postman、Insomnia 或代码生成器。
更喜欢用客户端?登录后从文档下载 OpenAPI 文件,导入 Postman、Insomnia 或代码生成器。
为什么选择 testingapis.com
不用运行服务器,不用配置 mock 库,也不用维护测试夹具。让代码直接请求返回真实感 JSON 的 HTTP 接口,把时间花在你的应用上。
同样免费:开发者工具,如 JSON 格式化、JWT 解码和 HTTP 状态码参考。
访问方式
现在就能发请求,或注册免费账号解锁全部接口。
API 构建器 · 仅限受邀
根据前端的 JSON 设计资源,获得一个托管 URL,数据贴近真实且只有你能修改。可免费开始;Pro 和 Team 提供更多项目、接口、请求量和请求日志。
先试试看
₹0 / month
适合个人开发者
即将推出
适合团队和项目
即将推出
常见问题
关于 testingapis.com 使用的常见问题快速解答。
X-TestingApis-Key 请求头中发送。WebSocket 和 EventSource 无法发送请求头,改用 ?ta_key=。登录后,文档里的“Try it”和本页的在线调试会自动帮你带上。?error=503(或其他状态码)或 ?delay=5(最多 10 秒)。