# Patch USA News Scraper (`runtime/patch-usa-news-scraper`) Actor

Extract structured Patch.com local news articles with titles, authors, dates, summaries, content, images, location fields, source URLs, and discovery rank.

- **URL**: https://apify.com/runtime/patch-usa-news-scraper.md
- **Developed by:** [scraping automation](https://apify.com/runtime) (community)
- **Categories:** News
- **Stats:** 2 total users, 0 monthly users, 100.0% runs succeeded, 1 bookmarks
- **User rating**: No ratings yet

## Pricing

from $30.00 / 1,000 patch articles

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
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.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## 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.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Patch USA News Scraper

Extract Patch.com local news articles with titles, authors, dates, summaries, content, images, and source links.

### Who this is for

- Local news monitors
- Market researchers
- Real estate and retail intelligence teams

### What it helps you do

- Monitor local Patch pages
- Collect article metadata and summaries
- Track local events, openings, closures, and community signals

### Inputs you can use

- Patch start URLs
- Maximum article records
- Full article option

### Data you get

- title
- article URL
- author
- published date
- summary
- image URL
- content snippet
- location

### How to get better results

- Start with a narrow, specific query or a small list of source URLs.
- Use realistic limits for the first run, then increase the volume once the output looks right.
- Keep source URLs, dates, and location context when you need repeatable market monitoring.
- Review a few sample records before connecting the dataset to a larger workflow.

### Notes

- Results depend on what the public source exposes at run time.
- Some pages may hide, delay, rename, or remove fields, so individual records can have partial data.
- Use the built-in output table to inspect results before exporting to spreadsheets, dashboards, or automation tools.

### Support

If a run returns unexpected data, open an issue from the Actor page with the input used, the run ID, and the result you expected.

# Actor input Schema

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

Patch.com listing, state, city, section, or article URLs to scrape.

## `maxResults` (type: `integer`):

Maximum number of article records to save across all start URLs.

## `includeFullContent` (type: `boolean`):

Open each discovered article and extract title, author, publish date, canonical URL, image, summary, and body text. Disable for very fast listing-only monitoring.

## `contentMaxChars` (type: `integer`):

Maximum number of article body characters to save per item. Set 0 to omit body text.

## `maxPages` (type: `integer`):

Maximum number of start URLs to process.

## `pageTimeout` (type: `integer`):

Maximum time to wait for a Patch listing page.

## `articleTimeout` (type: `integer`):

Maximum time to wait for an individual article page.

## `waitTime` (type: `integer`):

Small wait after page load for JavaScript-rendered article cards.

## `failOnNoResults` (type: `boolean`):

Make the run fail when no article records are saved. Useful for monitoring and smoke tests.

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

Optional Apify Proxy settings. Patch.com usually works without a proxy for small runs; enable proxy for larger scheduled monitoring.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://patch.com/new-york/across-ny"
    },
    {
      "url": "https://patch.com/california/los-angeles"
    }
  ],
  "maxResults": 10,
  "includeFullContent": true,
  "contentMaxChars": 4000,
  "maxPages": 1,
  "pageTimeout": 15000,
  "articleTimeout": 12000,
  "waitTime": 1000,
  "failOnNoResults": false,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

## `dataset` (type: `string`):

Dataset of Patch.com local news article records.

# 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": [
        {
            "url": "https://patch.com/new-york/across-ny"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("runtime/patch-usa-news-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": [{ "url": "https://patch.com/new-york/across-ny" }] }

# Run the Actor and wait for it to finish
run = client.actor("runtime/patch-usa-news-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).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": [
    {
      "url": "https://patch.com/new-york/across-ny"
    }
  ]
}' |
apify call runtime/patch-usa-news-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,runtime/patch-usa-news-scraper"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/wINCRvU1abJqsT63d/builds/lzEQd4AorUqhrKGmC/openapi.json
