# AZ Quotes Scraper (`shahidirfan/az-quotes-scraper`) Actor

Introducing the AZ Quotes Scraper, a lightweight actor designed to efficiently extract quotes, authors, and topics from AZQuotes. Fast and reliable. For best results and to avoid blocking, the use of residential proxies is highly recommended. Build your database of wisdom effortlessly!

- **URL**: https://apify.com/shahidirfan/az-quotes-scraper.md
- **Developed by:** [Shahid Irfan](https://apify.com/shahidirfan) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 9 total users, 3 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/platform/actors/running/actors-in-store#pay-per-usage

## What's an Apify Actor?

Actors are a software tools running on the Apify platform, for all kinds of web data extraction and automation use cases.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.
Actors are written with capital "A".

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.
The best way to integrate Actors is as follows.

In JavaScript/TypeScript projects, use official [JavaScript/TypeScript client](https://docs.apify.com/api/client/js.md):

```bash
npm install apify-client
```

In Python projects, use official [Python client library](https://docs.apify.com/api/client/python.md):

```bash
pip install apify-client
```

In shell scripts, use [Apify CLI](https://docs.apify.com/cli/docs.md):

````bash
# MacOS / Linux
curl -fsSL https://apify.com/install-cli.sh | bash
# Windows
irm https://apify.com/install-cli.ps1 | iex
```bash

In AI frameworks, you might use the [Apify MCP server](https://docs.apify.com/platform/integrations/mcp.md).

If your project is in a different language, use the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).


# README

## AZ Quotes Scraper

Collect quote data from AZ Quotes with author context, topic tags, popularity signals, and source links in a clean, analysis-ready dataset.

This actor is useful for content teams, researchers, publishing workflows, and quote intelligence pipelines that need consistently structured records at scale.

### Features

- **Author and topic targeting** - Collect records by specific author, author letter, topic, or custom start URLs.
- **Machine-readable discovery flow** - Starts from structured URL sources for stable content discovery.
- **Rich quote records** - Captures quote text, author details, tags, popularity signal, and source metadata.
- **Strict data hygiene** - Removes null and empty values before saving each item.
- **Automatic deduplication** - Prevents duplicate records across overlapping pages and pagination.
- **Pagination support** - Continues through additional pages until your target count is reached.

### Use Cases

#### Editorial Content Planning
Build reliable quote pools for newsletters, social content, and thematic campaigns.

#### Author Intelligence
Create author-level datasets for trend analysis, publication planning, and reference systems.

#### Topic Research
Track quote coverage around topics like leadership, success, creativity, and motivation.

#### Data Enrichment Pipelines
Feed clean quote records into downstream systems such as BI dashboards, CMS imports, or AI workflows.

### Input Parameters

| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| `startUrls` | String or Array | No | - | One or multiple AZ Quotes URLs to start from. |
| `startUrl` | String | No | - | Single start URL. |
| `url` | String | No | - | Alternative single URL input. |
| `authorLetter` | String | No | - | Filter author discovery by first letter. |
| `searchAuthor` | String | No | - | Match authors by name. |
| `topic` | String | No | - | Collect quotes from a topic page. |
| `results_wanted` | Integer | No | `20` fallback | Maximum number of records to save. |
| `max_pages` | Integer | No | `10` fallback | Maximum pagination depth per route. |
| `proxyConfiguration` | Object | No | - | Optional proxy settings for improved reliability. |

### Output Data

Each dataset item includes cleaned, non-empty fields only.

| Field | Type | Description |
|---|---|---|
| `quote_id` | Number | Quote ID when available from source links. |
| `quote` | String | Full quote text. |
| `author` | String | Author name. |
| `author_id` | Number | Author ID when available from author URL. |
| `author_slug` | String | Human-readable author slug derived from source URL. |
| `author_url` | String | Author page URL. |
| `tags` | Array<String> | Topic tags associated with the quote. |
| `likes` | Number | Popularity signal when available. |
| `source` | String | Quote source URL. |
| `source_page` | String | Listing page where the quote was captured. |
| `scraped_at` | String | ISO timestamp when the item was collected. |

### Usage Examples

#### Collect by Topic

```json
{
  "topic": "inspirational",
  "results_wanted": 50,
  "max_pages": 5
}
````

#### Collect by Author Name

```json
{
  "searchAuthor": "Maya Angelou",
  "results_wanted": 40,
  "max_pages": 4
}
```

#### Collect from Custom URLs

```json
{
  "startUrls": "https://www.azquotes.com/author/4399-Albert_Einstein\nhttps://www.azquotes.com/author/2500-Dale_Carnegie",
  "results_wanted": 60,
  "max_pages": 6
}
```

#### Collect by Author Letter

```json
{
  "authorLetter": "e",
  "results_wanted": 75,
  "max_pages": 8
}
```

### Sample Output

```json
{
  "quote_id": 48682,
  "quote": "The successful man will profit from his mistakes and try again in a different way.",
  "author": "Dale Carnegie",
  "author_id": 2500,
  "author_slug": "Dale Carnegie",
  "author_url": "https://www.azquotes.com/author/2500-Dale_Carnegie",
  "tags": [
    "Success",
    "Failure",
    "Inspirational"
  ],
  "likes": 2934,
  "source": "https://www.azquotes.com/quote/48682",
  "source_page": "https://www.azquotes.com/author/2500-Dale_Carnegie",
  "scraped_at": "2026-03-14T14:20:11.312Z"
}
```

### Tips for Best Results

#### Start Small

Begin with 20 to 50 results to validate your targeting before larger runs.

#### Prefer Specific Filters

Using `searchAuthor` or `topic` usually produces faster and more relevant datasets.

#### Use Proxies for Large Runs

For larger extractions, enable proxy configuration to improve consistency.

#### Balance Depth and Speed

Increase `max_pages` only when you need broader coverage.

### Integrations

- **Google Sheets** - Export and analyze quote datasets quickly.
- **Airtable** - Build searchable quote libraries and editorial databases.
- **Make** - Trigger automations after each run.
- **Zapier** - Send results to downstream tools.
- **Webhooks** - Deliver fresh data to custom services.

#### Export Formats

- **JSON**
- **CSV**
- **Excel**
- **XML**

### Frequently Asked Questions

#### Does the actor remove duplicates?

Yes. Duplicate entries are blocked before they are written to the dataset.

#### Can output contain null values?

No. Empty, null, and undefined values are removed before save.

#### Can I target a single author?

Yes. Use `searchAuthor`, `startUrl`, or `startUrls`.

#### Can I collect topic-based quotes?

Yes. Use the `topic` input with your preferred maximum result count.

#### What controls extraction size?

`results_wanted` sets the cap, while `max_pages` controls depth.

### Support

For issues or feature requests, use the Apify actor issue channel or support options in your Apify Console.

### Legal Notice

Use this actor responsibly and ensure your data collection complies with applicable laws, policies, and website terms.

# Actor input Schema

## `startUrls` (type: `array`):

Optional direct AZ Quotes pages to start from.

## `authorLetter` (type: `string`):

Optional author first letter (A-Z).

## `searchAuthor` (type: `string`):

Optional exact or partial author name.

## `topic` (type: `string`):

Optional topic slug or topic name.

## `results_wanted` (type: `integer`):

Maximum number of quotes to save.

## `max_pages` (type: `integer`):

Maximum pages to visit per source.

## `proxyConfiguration` (type: `object`):

Optional proxy settings.

## Actor input object example

```json
{
  "startUrls": [
    "https://www.azquotes.com/author/2500-Dale_Carnegie"
  ],
  "authorLetter": "a",
  "searchAuthor": "Maya Angelou",
  "topic": "inspirational",
  "results_wanted": 20,
  "max_pages": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `overview` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "startUrls": [
        "https://www.azquotes.com/author/2500-Dale_Carnegie"
    ],
    "authorLetter": "a",
    "searchAuthor": "Maya Angelou",
    "topic": "inspirational",
    "results_wanted": 20,
    "max_pages": 3,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("shahidirfan/az-quotes-scraper").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "startUrls": ["https://www.azquotes.com/author/2500-Dale_Carnegie"],
    "authorLetter": "a",
    "searchAuthor": "Maya Angelou",
    "topic": "inspirational",
    "results_wanted": 20,
    "max_pages": 3,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("shahidirfan/az-quotes-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "startUrls": [
    "https://www.azquotes.com/author/2500-Dale_Carnegie"
  ],
  "authorLetter": "a",
  "searchAuthor": "Maya Angelou",
  "topic": "inspirational",
  "results_wanted": 20,
  "max_pages": 3,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call shahidirfan/az-quotes-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=shahidirfan/az-quotes-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

```json
{
    "openapi": "3.0.1",
    "info": {
        "title": "AZ Quotes Scraper",
        "description": "Introducing the AZ Quotes Scraper, a lightweight actor designed to efficiently extract quotes, authors, and topics from AZQuotes. Fast and reliable. For best results and to avoid blocking, the use of residential proxies is highly recommended. Build your database of wisdom effortlessly!",
        "version": "0.0",
        "x-build-id": "M4jJ9GedWNEYRriWr"
    },
    "servers": [
        {
            "url": "https://api.apify.com/v2"
        }
    ],
    "paths": {
        "/acts/shahidirfan~az-quotes-scraper/run-sync-get-dataset-items": {
            "post": {
                "operationId": "run-sync-get-dataset-items-shahidirfan-az-quotes-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        },
        "/acts/shahidirfan~az-quotes-scraper/runs": {
            "post": {
                "operationId": "runs-sync-shahidirfan-az-quotes-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor and returns information about the initiated run in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/runsResponseSchema"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/acts/shahidirfan~az-quotes-scraper/run-sync": {
            "post": {
                "operationId": "run-sync-shahidirfan-az-quotes-scraper",
                "x-openai-isConsequential": false,
                "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
                "tags": [
                    "Run Actor"
                ],
                "requestBody": {
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "$ref": "#/components/schemas/inputSchema"
                            }
                        }
                    }
                },
                "parameters": [
                    {
                        "name": "token",
                        "in": "query",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "description": "Enter your Apify token here"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "inputSchema": {
                "type": "object",
                "properties": {
                    "startUrls": {
                        "title": "Start URLs",
                        "type": "array",
                        "description": "Optional direct AZ Quotes pages to start from.",
                        "items": {
                            "type": "string"
                        }
                    },
                    "authorLetter": {
                        "title": "Author Letter",
                        "pattern": "^[a-zA-Z]?$",
                        "type": "string",
                        "description": "Optional author first letter (A-Z)."
                    },
                    "searchAuthor": {
                        "title": "Search Author",
                        "type": "string",
                        "description": "Optional exact or partial author name."
                    },
                    "topic": {
                        "title": "Quote Topic",
                        "type": "string",
                        "description": "Optional topic slug or topic name."
                    },
                    "results_wanted": {
                        "title": "Results Wanted",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum number of quotes to save.",
                        "default": 20
                    },
                    "max_pages": {
                        "title": "Max Pages",
                        "minimum": 1,
                        "type": "integer",
                        "description": "Maximum pages to visit per source.",
                        "default": 3
                    },
                    "proxyConfiguration": {
                        "title": "Proxy Configuration",
                        "type": "object",
                        "description": "Optional proxy settings.",
                        "default": {
                            "useApifyProxy": false
                        }
                    }
                }
            },
            "runsResponseSchema": {
                "type": "object",
                "properties": {
                    "data": {
                        "type": "object",
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "actId": {
                                "type": "string"
                            },
                            "userId": {
                                "type": "string"
                            },
                            "startedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "finishedAt": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2025-01-08T00:00:00.000Z"
                            },
                            "status": {
                                "type": "string",
                                "example": "READY"
                            },
                            "meta": {
                                "type": "object",
                                "properties": {
                                    "origin": {
                                        "type": "string",
                                        "example": "API"
                                    },
                                    "userAgent": {
                                        "type": "string"
                                    }
                                }
                            },
                            "stats": {
                                "type": "object",
                                "properties": {
                                    "inputBodyLen": {
                                        "type": "integer",
                                        "example": 2000
                                    },
                                    "rebootCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "restartCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "resurrectCount": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "computeUnits": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "options": {
                                "type": "object",
                                "properties": {
                                    "build": {
                                        "type": "string",
                                        "example": "latest"
                                    },
                                    "timeoutSecs": {
                                        "type": "integer",
                                        "example": 300
                                    },
                                    "memoryMbytes": {
                                        "type": "integer",
                                        "example": 1024
                                    },
                                    "diskMbytes": {
                                        "type": "integer",
                                        "example": 2048
                                    }
                                }
                            },
                            "buildId": {
                                "type": "string"
                            },
                            "defaultKeyValueStoreId": {
                                "type": "string"
                            },
                            "defaultDatasetId": {
                                "type": "string"
                            },
                            "defaultRequestQueueId": {
                                "type": "string"
                            },
                            "buildNumber": {
                                "type": "string",
                                "example": "1.0.0"
                            },
                            "containerUrl": {
                                "type": "string"
                            },
                            "usage": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "integer",
                                        "example": 1
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            },
                            "usageTotalUsd": {
                                "type": "number",
                                "example": 0.00005
                            },
                            "usageUsd": {
                                "type": "object",
                                "properties": {
                                    "ACTOR_COMPUTE_UNITS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATASET_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "KEY_VALUE_STORE_WRITES": {
                                        "type": "number",
                                        "example": 0.00005
                                    },
                                    "KEY_VALUE_STORE_LISTS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_READS": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "REQUEST_QUEUE_WRITES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_INTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "DATA_TRANSFER_EXTERNAL_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                                        "type": "integer",
                                        "example": 0
                                    },
                                    "PROXY_SERPS": {
                                        "type": "integer",
                                        "example": 0
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
```
