Get quotes with pagination support (deterministic order)
Returns quotes in a deterministic, paginated order, filterable by category, author or work title. For a random selection instead use /randomquotes.
Example code
// Using @orth/sdk - The simplest way to call APIs
// Install: npm install @orth/sdk
import Orthogonal from "@orth/sdk";
const orthogonal = new Orthogonal({
apiKey: process.env.ORTHOGONAL_API_KEY,
});
const output = await orthogonal.run({
api: "api-ninjas",
path: "/v2/quotes"
});
console.log(output);Query parameters
Comma-separated list of categories to include in results (results will match all of the categories). Example: categories=wisdom,success
Comma-separated list of categories to exclude from results (results will not match any of the categories). Example: exclude_categories=love,philosophy
Filter quotes by author name (partial match supported). Example: author=Einstein
Filter quotes by work title (partial match supported). Example: work=War
Number of results to return. Must be between 1 and 100. Default is 1. (Default: 1)
Number of results to skip for pagination. Default is 0. (Default: 0)
Set safe=true to exclude quotes flagged as sexually explicit, crude, or containing profanity, slurs, or offensive content. Defaults to false, so results are unfiltered unless you opt in. Filtering is best-effort and not a guarantee. Any value other than true/false returns an error. (Default: False)