List the products in a category
GET
https://api.testingapis.com/api/Products/category/{name}Parameters 1
| Name | Type | Description |
|---|---|---|
namerequired | path · string | Category name, case-insensitive, e.g. electronics. |
Responses
- 200
- Matching products (an empty array for an unknown category).
- 500
- Unexpected server error.
Example
Request
curl -X GET "https://api.testingapis.com/api/Products/category/electronics"Response200 OK
[
{
"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"
},
{
"id": 2,
… (11 more lines)