Resources
Quotes
Original, fictional quotes with fictional authors. Read-only. The dataset contains 50 quotes.
Read-only resource
Quotes can be listed, searched, and fetched by ID. Write methods return 405 Method Not Allowed.
Endpoints
The quote object
Use select to return a subset of these fields. Sort with sortBy on id, author; search matches . See query parameters.
| Field | Type | Notes |
|---|---|---|
id | integer | min -9007199254740991, max 9007199254740991 |
quote | string | |
author | string |
List quotes
GET
/api/v1/quotesReturns a paginated list of quotes. Supports pagination, field selection, sorting, and filtering.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Number of records to return (1-100).Default: 30Range: 1-100 |
skip | query | integer | Number of records to skip before returning results.Default: 0Range: 0-1000000 |
select | query | string | Comma-separated list of fields to return. id is always included. Allowed: id, quote, author. |
sortBy | query | string | Field to sort by.One of: id, authorDefault: id |
order | query | string | Sort direction.One of: asc, descDefault: asc |
author | query | string | Filter by author (case-insensitive exact match). |
delay | query | integer | Delay the response by this many milliseconds (0-5000). Subject to a stricter rate limit.Range: 0-5000 |
Status codes
- 200A page of quotes with
total,skip, andlimitmetadata. - 400Invalid path or query parameter (
INVALID_PARAMETER/INVALID_ID). - 429Too many requests from this IP (
RATE_LIMIT_EXCEEDED). - 503The database is temporarily unavailable (
SERVICE_UNAVAILABLE).
Request
curl 'https://test.naimulhassan.me/api/v1/quotes?limit=2'Example responses
Captured from the real API with the requests shown on this page.
200application/json
{
"quotes": [
{
"id": 1,
"quote": "Small steps taken daily outrun big plans made yearly.",
"author": "Mara Ellison"
},
{
"id": 2,
"quote": "A good question is a map; a good answer is only a destination.",
"author": "Tobias Wren"
}
],
"total": 50,
"skip": 0,
"limit": 2
}Try it
Get a random quote
GET
/api/v1/quotes/randomReturns one randomly selected quote. This is the only intentionally non-deterministic endpoint.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
delay | query | integer | Delay the response by this many milliseconds (0-5000). Subject to a stricter rate limit.Range: 0-5000 |
Status codes
- 200A quote object.
Request
curl 'https://test.naimulhassan.me/api/v1/quotes/random'Example responses
Captured from the real API with the requests shown on this page.
200application/json
{
"id": 28,
"quote": "Teach what you learn and you will learn it twice.",
"author": "Lena Okoro"
}Try it
Get a quote
GET
/api/v1/quotes/{id}Returns a single quote by its numeric ID.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | integer | Numeric quote ID (positive integer).Min: 1 |
select | query | string | Comma-separated list of fields to return. id is always included. Allowed: id, quote, author. |
delay | query | integer | Delay the response by this many milliseconds (0-5000). Subject to a stricter rate limit.Range: 0-5000 |
Status codes
- 200The quote object.
- 400Invalid path or query parameter (
INVALID_PARAMETER/INVALID_ID). - 404No record exists with that ID (
RESOURCE_NOT_FOUND).
Request
curl 'https://test.naimulhassan.me/api/v1/quotes/1'Example responses
Captured from the real API with the requests shown on this page.
200application/json
{
"id": 1,
"quote": "Small steps taken daily outrun big plans made yearly.",
"author": "Mara Ellison"
}