# The Quotes Hub

> Quotations from The Quotes Hub: a random quote for a daily message or a newsletter sign-off, the whole collection a page at a time, one quote by its number, and quotes gathered by tag or by author. Tags and authors come with their own listings and quote counts, so a workflow can pick a theme or a voice and pull from it. Every quote carries its author, its tags and a link to itself. No account or API key required.

App · Misc References · 8 actions. Web page: https://docs.lodol.com/docs/integrations/the-quotes-hub

## Actions

### Check service status

Check whether The Quotes Hub is answering, and how quickly. This is the one action that reports a problem as a value instead of failing the step, so a workflow can branch on it and fall back to a saved quote when the service is down. Being throttled is reported separately from being down. No API key required.

**Inputs**: None.

**Outputs**

- `message` (text): What happened, in a sentence worth posting.
- `online` (true/false): True when the service answered with a quote. This is the field to branch on.
- `rate_limited` (true/false): True when the answer was a throttle (HTTP 429). Being throttled is not the same as being down.
- `reachable` (true/false): True when something answered at all, even with an error. False means the request never landed.
- `response_time_ms` (number): How long the request took, in milliseconds, or null when nothing came back.
- `status_code` (number): The HTTP status that came back, or null when nothing did.

**Example output**

```json
{
  "message": "The Quotes Hub is up and serving quotes.",
  "online": true,
  "rate_limited": false,
  "reachable": true,
  "response_time_ms": 42.7,
  "status_code": 200
}
```

### Get a quote

Get one quotation by its number, with its author and tags. The way to fetch a quote again later once an earlier step or a saved row has its id. No API key required.

**Inputs**

- Quote (`quote_id`, number, required): The quote's number, as List quotes and Get a random quote report it in their id field and as it appears at the end of the quote's api_url. At least 1.

**Outputs**

- `quote` (object): One quotation, with who said it and what it is filed under.

**Example output**

```json
{
  "quote": {
    "api_url": "https://thequoteshub.com/api/quotes/1",
    "author": "Marcus Aurelius",
    "author_id": "marcus-aurelius",
    "id": 1,
    "tags": [
      "happiness",
      "wisdom"
    ],
    "text": "The happiness of your life depends upon the quality of your thoughts."
  }
}
```

### Get a random quote

Get one quotation chosen at random, with who said it and the tags it is filed under. The step behind a quote of the day, a sign-off line for a newsletter or an opener for a message, with a different quote every run. No API key required.

**Inputs**: None.

**Outputs**

- `quote` (object): One quotation, with who said it and what it is filed under.

**Example output**

```json
{
  "quote": {
    "api_url": "https://thequoteshub.com/api/quotes/1",
    "author": "Marcus Aurelius",
    "author_id": "marcus-aurelius",
    "id": 1,
    "tags": [
      "happiness",
      "wisdom"
    ],
    "text": "The happiness of your life depends upon the quality of your thoughts."
  }
}
```

### Get quotes by author

List one author's quotations, a page at a time, with the author's name and quote count beside them. Takes the author_id that List authors reports, or the one every quote carries, so a random quote's author can be explored in the next step. No API key required.

**Inputs**

- Author (`author_id`, text, required): The author's id, as List authors reports it in the author_id field and as every quote carries it beside the author's name. It is a slug-style string rather than the name, so chain the author_id from an earlier step.
- Page (`page`, number): Optional. Which page to fetch, numbered from 1. Use the next page from the previous result to page through. 1 by default. At least 1. Default: `1`.
- Page size (`page_size`, number): Optional. How many quotes to return per page. Between 1 and 100; 20 by default. From 1 to 100. Default: `20`.

**Outputs**

- `author` (object): One author, with how many quotes they have.
- `count` (number): How many records are in this page.
- `has_more` (true/false): True when there is a page after this one.
- `next_page` (number): The page number that fetches the next page. Null when this is the last one.
- `page` (number): Which page this is, numbered from 1.
- `page_size` (number): How many records a page holds, as the service reports it, which is the size that was asked for unless the service capped it.
- `quotes` (list): The quotes in this page.
- `total_items` (number): How many records matched in total, across every page.
- `total_pages` (number): How many pages there are at this page size.

**Example output**

```json
{
  "author": {
    "api_url": "https://thequoteshub.com/api/authors/marcus-aurelius",
    "author_id": "marcus-aurelius",
    "name": "Marcus Aurelius",
    "total_quotes": 96
  },
  "count": 1,
  "has_more": true,
  "next_page": 2,
  "page": 1,
  "page_size": 20,
  "quotes": [
    {
      "api_url": "https://thequoteshub.com/api/quotes/1",
      "author": "Marcus Aurelius",
      "author_id": "marcus-aurelius",
      "id": 1,
      "tags": [
        "happiness",
        "wisdom"
      ],
      "text": "The happiness of your life depends upon the quality of your thoughts."
    }
  ],
  "total_items": 96,
  "total_pages": 5
}
```

### Get quotes by tag

List the quotations filed under one tag, a page at a time. The step for a themed digest: quotes on wisdom for a Monday email, quotes on love for a card. Takes the tag_id from List tags. No API key required.

**Inputs**

- Tag (`tag_id`, text, required): The tag's id, as List tags reports it in the tag_id field. It is a slug-style string rather than the displayed name, so run List tags first and chain the tag_id you want.
- Page (`page`, number): Optional. Which page to fetch, numbered from 1. Use the next page from the previous result to page through. 1 by default. At least 1. Default: `1`.
- Page size (`page_size`, number): Optional. How many quotes to return per page. Between 1 and 100; 20 by default. From 1 to 100. Default: `20`.

**Outputs**

- `count` (number): How many records are in this page.
- `has_more` (true/false): True when there is a page after this one.
- `next_page` (number): The page number that fetches the next page. Null when this is the last one.
- `page` (number): Which page this is, numbered from 1.
- `page_size` (number): How many records a page holds, as the service reports it, which is the size that was asked for unless the service capped it.
- `quotes` (list): The quotes in this page.
- `tag_id` (text): The tag id that was asked for.
- `total_items` (number): How many records matched in total, across every page.
- `total_pages` (number): How many pages there are at this page size.

**Example output**

```json
{
  "count": 1,
  "has_more": true,
  "next_page": 2,
  "page": 1,
  "page_size": 20,
  "quotes": [
    {
      "api_url": "https://thequoteshub.com/api/quotes/1",
      "author": "Marcus Aurelius",
      "author_id": "marcus-aurelius",
      "id": 1,
      "tags": [
        "happiness",
        "wisdom"
      ],
      "text": "The happiness of your life depends upon the quality of your thoughts."
    }
  ],
  "tag_id": "wisdom",
  "total_items": 1200,
  "total_pages": 60
}
```

### List authors

List the people the quotations are attributed to, a page at a time, each with their id and how many quotes they have. The author_id here is what Get quotes by author takes. No API key required.

**Inputs**

- Page (`page`, number): Optional. Which page to fetch, numbered from 1. Use the next page from the previous result to page through. 1 by default. At least 1. Default: `1`.
- Page size (`page_size`, number): Optional. How many authors to return per page. Between 1 and 100; 20 by default. From 1 to 100. Default: `20`.

**Outputs**

- `authors` (list): The authors in this page.
- `count` (number): How many records are in this page.
- `has_more` (true/false): True when there is a page after this one.
- `next_page` (number): The page number that fetches the next page. Null when this is the last one.
- `page` (number): Which page this is, numbered from 1.
- `page_size` (number): How many records a page holds, as the service reports it, which is the size that was asked for unless the service capped it.
- `total_items` (number): How many records matched in total, across every page.
- `total_pages` (number): How many pages there are at this page size.

**Example output**

```json
{
  "authors": [
    {
      "api_url": "https://thequoteshub.com/api/authors/marcus-aurelius",
      "author_id": "marcus-aurelius",
      "name": "Marcus Aurelius",
      "total_quotes": 96
    }
  ],
  "count": 1,
  "has_more": true,
  "next_page": 2,
  "page": 1,
  "page_size": 20,
  "total_items": 5000,
  "total_pages": 250
}
```

### List quotes

List quotations a page at a time, each with its author, tags and id. Page through the whole collection to build a library of your own, or take one page to fill a digest. No API key required.

**Inputs**

- Page (`page`, number): Optional. Which page to fetch, numbered from 1. Use the next page from the previous result to page through. 1 by default. At least 1. Default: `1`.
- Page size (`page_size`, number): Optional. How many quotes to return per page. Between 1 and 100; 20 by default. From 1 to 100. Default: `20`.

**Outputs**

- `count` (number): How many records are in this page.
- `has_more` (true/false): True when there is a page after this one.
- `next_page` (number): The page number that fetches the next page. Null when this is the last one.
- `page` (number): Which page this is, numbered from 1.
- `page_size` (number): How many records a page holds, as the service reports it, which is the size that was asked for unless the service capped it.
- `quotes` (list): The quotes in this page.
- `total_items` (number): How many records matched in total, across every page.
- `total_pages` (number): How many pages there are at this page size.

**Example output**

```json
{
  "count": 1,
  "has_more": true,
  "next_page": 2,
  "page": 1,
  "page_size": 20,
  "quotes": [
    {
      "api_url": "https://thequoteshub.com/api/quotes/1",
      "author": "Marcus Aurelius",
      "author_id": "marcus-aurelius",
      "id": 1,
      "tags": [
        "happiness",
        "wisdom"
      ],
      "text": "The happiness of your life depends upon the quality of your thoughts."
    }
  ],
  "total_items": 75000,
  "total_pages": 3750
}
```

### List tags

List the tags quotations are filed under, a page at a time, each with its id and how many quotes carry it. The tag_id here is what Get quotes by tag takes. No API key required.

**Inputs**

- Page (`page`, number): Optional. Which page to fetch, numbered from 1. Use the next page from the previous result to page through. 1 by default. At least 1. Default: `1`.
- Page size (`page_size`, number): Optional. How many tags to return per page. Between 1 and 100; 20 by default. From 1 to 100. Default: `20`.

**Outputs**

- `count` (number): How many records are in this page.
- `has_more` (true/false): True when there is a page after this one.
- `next_page` (number): The page number that fetches the next page. Null when this is the last one.
- `page` (number): Which page this is, numbered from 1.
- `page_size` (number): How many records a page holds, as the service reports it, which is the size that was asked for unless the service capped it.
- `tags` (list): The tags in this page.
- `total_items` (number): How many records matched in total, across every page.
- `total_pages` (number): How many pages there are at this page size.

**Example output**

```json
{
  "count": 1,
  "has_more": true,
  "next_page": 2,
  "page": 1,
  "page_size": 20,
  "tags": [
    {
      "api_url": "https://thequoteshub.com/api/tags/wisdom",
      "name": "Wisdom",
      "tag_id": "wisdom",
      "total_quotes": 1200
    }
  ],
  "total_items": 900,
  "total_pages": 45
}
```
