{
  "data": {
    "id": "kgvnqgKSosfpPzZC4",
    "actId": "C5BexVLa39ZcPgizT",
    "userId": "zq8lKbpLzTjGDayPC",
    "startedAt": "2026-11-04T01:34:24.298Z",
    "finishedAt": "2026-11-04T01:34:28.312Z",
    "status": "SUCCEEDED",
    "meta": {
      "origin": "CLI"
    },
    "stats": {
      "durationMillis": 3922,
      "runTimeSecs": 3.922,
      "computeUnits": 0.004357777777777778,
      "imageSizeBytes": 319063552
    },
    "options": {
      "useCache": true,
      "betaPackages": false,
      "memoryMbytes": 4096,
      "diskMbytes": 8192
    },
    "createdByOrganizationMemberUserId": "GK9YjZRyQZVzOdoH5",
    "exitCode": 0,
    "inputSchema": "{\n  \"title\": \"Patch Scraper Input\",\n  \"description\": \"Scrape hyperlocal US news, events and classifieds from Patch.com by keyword, town, category, author, tag or URL, with optional full body text, detail-page enrichment and new-record monitoring.\",\n  \"type\": \"object\",\n  \"schemaVersion\": 1,\n  \"properties\": {\n    \"mode\": {\n      \"title\": \"Mode\",\n      \"type\": \"string\",\n      \"description\": \"What to fetch from Patch.com.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"search\",\n        \"byTown\",\n        \"byCategory\",\n        \"byAuthor\",\n        \"byTag\",\n        \"events\",\n        \"classifieds\",\n        \"byUrl\"\n      ],\n      \"enumTitles\": [\n        \"Search by keyword\",\n        \"Browse latest news for a town/city\",\n        \"Browse by category\",\n        \"Browse articles by author/reporter\",\n        \"Browse articles by editorial tag\",\n        \"Browse local events (calendar)\",\n        \"Browse local classifieds (marketplace listings)\",\n        \"Scrape Patch URLs (article, event, classified, town, topic, state or search)\"\n      ],\n      \"default\": \"search\",\n      \"prefill\": \"search\"\n    },\n    \"startUrls\": {\n      \"title\": \"Patch URLs\",\n      \"type\": \"array\",\n      \"description\": \"mode=byUrl only. Paste Patch article, event, classified, town, category/topic, state or search URLs. Article/event/classified URLs are scraped directly; town/topic/state/search URLs are converted into the equivalent scoped query.\",\n      \"editor\": \"requestListSources\",\n      \"items\": {\n        \"type\": \"object\",\n        \"properties\": {\n          \"url\": {\n            \"type\": \"string\",\n            \"title\": \"URL\",\n            \"description\": \"A full Patch.com URL (or patch.com/... path).\"\n          }\n        }\n      }\n    },\n    \"searchQuery\": {\n      \"title\": \"Search query\",\n      \"type\": \"string\",\n      \"description\": \"Free-text keyword to search for (mode=search; also applies to mode=events/classifieds and to scope URLs). Leave empty to browse the newest articles matching the other filters.\",\n      \"editor\": \"textfield\",\n      \"prefill\": \"city council\"\n    },\n    \"searchMatch\": {\n      \"title\": \"Search match\",\n      \"type\": \"string\",\n      \"description\": \"How multi-word searches match. \\\"All words\\\" requires every word anywhere in the headline/summary/topic (more results). \\\"Exact phrase\\\" requires the words to appear together (the old behavior).\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"allWords\",\n        \"exactPhrase\"\n      ],\n      \"enumTitles\": [\n        \"All words anywhere\",\n        \"Exact phrase\"\n      ],\n      \"default\": \"allWords\",\n      \"prefill\": \"allWords\"\n    },\n    \"authorName\": {\n      \"title\": \"Author name\",\n      \"type\": \"string\",\n      \"description\": \"Exact byline/reporter/poster name (required for mode=byAuthor; on any other mode it is an extra server-side filter). Copy it from this actor's `author` output field, e.g. \\\"Eric Heyl\\\".\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"tagName\": {\n      \"title\": \"Tag name\",\n      \"type\": \"string\",\n      \"description\": \"Exact editorial tag (required for mode=byTag; on article modes it is an extra filter). Copy it from this actor's `tags` field, e.g. \\\"Back To School\\\". Only a minority of articles carry tags.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"regionSlug\": {\n      \"title\": \"State\",\n      \"type\": \"string\",\n      \"description\": \"US state/edition to scope results to (required for mode=byTown; optional filter on every other mode). \\\"Across America\\\" is Patch's national edition (code US); \\\"US Territories\\\" is a valid Patch region with no current articles.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"across-america\",\n        \"alabama\",\n        \"alaska\",\n        \"arizona\",\n        \"arkansas\",\n        \"california\",\n        \"colorado\",\n        \"connecticut\",\n        \"delaware\",\n        \"district-columbia\",\n        \"florida\",\n        \"georgia\",\n        \"hawaii\",\n        \"idaho\",\n        \"illinois\",\n        \"indiana\",\n        \"iowa\",\n        \"kansas\",\n        \"kentucky\",\n        \"louisiana\",\n        \"maine\",\n        \"maryland\",\n        \"massachusetts\",\n        \"michigan\",\n        \"minnesota\",\n        \"mississippi\",\n        \"missouri\",\n        \"montana\",\n        \"nebraska\",\n        \"nevada\",\n        \"new-hampshire\",\n        \"new-jersey\",\n        \"new-mexico\",\n        \"new-york\",\n        \"north-carolina\",\n        \"north-dakota\",\n        \"ohio\",\n        \"oklahoma\",\n        \"oregon\",\n        \"pennsylvania\",\n        \"rhode-island\",\n        \"south-carolina\",\n        \"south-dakota\",\n        \"tennessee\",\n        \"texas\",\n        \"us-territories\",\n        \"utah\",\n        \"vermont\",\n        \"virginia\",\n        \"washington\",\n        \"west-virginia\",\n        \"wisconsin\",\n        \"wyoming\"\n      ],\n      \"enumTitles\": [\n        \"(any state - nationwide)\",\n        \"Across America (national edition)\",\n        \"Alabama\",\n        \"Alaska\",\n        \"Arizona\",\n        \"Arkansas\",\n        \"California\",\n        \"Colorado\",\n        \"Connecticut\",\n        \"Delaware\",\n        \"District of Columbia\",\n        \"Florida\",\n        \"Georgia\",\n        \"Hawaii\",\n        \"Idaho\",\n        \"Illinois\",\n        \"Indiana\",\n        \"Iowa\",\n        \"Kansas\",\n        \"Kentucky\",\n        \"Louisiana\",\n        \"Maine\",\n        \"Maryland\",\n        \"Massachusetts\",\n        \"Michigan\",\n        \"Minnesota\",\n        \"Mississippi\",\n        \"Missouri\",\n        \"Montana\",\n        \"Nebraska\",\n        \"Nevada\",\n        \"New Hampshire\",\n        \"New Jersey\",\n        \"New Mexico\",\n        \"New York\",\n        \"North Carolina\",\n        \"North Dakota\",\n        \"Ohio\",\n        \"Oklahoma\",\n        \"Oregon\",\n        \"Pennsylvania\",\n        \"Rhode Island\",\n        \"South Carolina\",\n        \"South Dakota\",\n        \"Tennessee\",\n        \"Texas\",\n        \"US Territories\",\n        \"Utah\",\n        \"Vermont\",\n        \"Virginia\",\n        \"Washington\",\n        \"West Virginia\",\n        \"Wisconsin\",\n        \"Wyoming\"\n      ],\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"townSlug\": {\n      \"title\": \"Town/city slug\",\n      \"type\": \"string\",\n      \"description\": \"Patch town/city URL slug (required for mode=byTown; requires regionSlug too). Find it in a Patch URL, e.g. patch.com/california/santamonica -> \\\"santamonica\\\". Example: \\\"santamonica\\\" (with regionSlug=california).\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"category\": {\n      \"title\": \"Category\",\n      \"type\": \"string\",\n      \"description\": \"News category/topic to filter by (required for mode=byCategory; optional filter on mode=search/byTown/byAuthor/byTag). Not applicable to mode=events/classifieds -- use `classifiedCategory` for mode=classifieds instead.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"around-town\",\n        \"arts-entertainment\",\n        \"bulletinboard\",\n        \"business\",\n        \"going-green\",\n        \"holidays\",\n        \"kids-family\",\n        \"lifestyle\",\n        \"obituaries\",\n        \"personal-finance\",\n        \"pets\",\n        \"police-fire\",\n        \"politics\",\n        \"real-estate\",\n        \"restaurants-bars\",\n        \"schools\",\n        \"small-business-voices\",\n        \"sports\",\n        \"traffic-transit\",\n        \"travel\",\n        \"weather\"\n      ],\n      \"enumTitles\": [\n        \"(any category)\",\n        \"Community Corner\",\n        \"Arts & Entertainment\",\n        \"Neighbor News\",\n        \"Business\",\n        \"Home & Garden\",\n        \"Seasonal & Holidays\",\n        \"Kids & Family\",\n        \"Health & Fitness\",\n        \"Obituaries\",\n        \"Personal Finance\",\n        \"Pets\",\n        \"Crime & Safety\",\n        \"Politics & Government\",\n        \"Real Estate\",\n        \"Restaurants & Bars\",\n        \"Schools\",\n        \"Local Voices\",\n        \"Sports\",\n        \"Traffic & Transit\",\n        \"Travel\",\n        \"Weather\"\n      ],\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"classifiedCategory\": {\n      \"title\": \"Classified category\",\n      \"type\": \"string\",\n      \"description\": \"Classifieds category to filter by (mode=classifieds only; a completely separate value set from `category`, which is news-only). Leave as \\\"(any category)\\\" to browse every classified category.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"\",\n        \"announcements\",\n        \"for-sale\",\n        \"free-stuff\",\n        \"gigs-services\",\n        \"housing\",\n        \"lost-found\",\n        \"news-tip\",\n        \"opinion\",\n        \"other\",\n        \"question\",\n        \"recommendation\"\n      ],\n      \"enumTitles\": [\n        \"(any category)\",\n        \"Announcements\",\n        \"For Sale\",\n        \"Free Stuff\",\n        \"Gigs & Services\",\n        \"Housing\",\n        \"Lost & Found\",\n        \"News Tip\",\n        \"Opinion\",\n        \"Other\",\n        \"Question\",\n        \"Recommendation\"\n      ],\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"sortBy\": {\n      \"title\": \"Sort by\",\n      \"type\": \"string\",\n      \"description\": \"Order of results. \\\"Nearest first\\\" requires both `nearLat`/`nearLng` AND mode=search/byTown/byCategory/byAuthor/byTag (news); otherwise it falls back to Relevance. \\\"Soonest event first\\\" requires mode=events; on any other mode it also falls back to Relevance.\",\n      \"editor\": \"select\",\n      \"enum\": [\n        \"relevance\",\n        \"newest\",\n        \"oldest\",\n        \"nearest\",\n        \"eventDate\"\n      ],\n      \"enumTitles\": [\n        \"Relevance\",\n        \"Newest first\",\n        \"Oldest first\",\n        \"Nearest first (requires nearLat/nearLng, news modes only)\",\n        \"Soonest event first (requires mode=events)\"\n      ],\n      \"default\": \"relevance\",\n      \"prefill\": \"relevance\"\n    },\n    \"publishedAfter\": {\n      \"title\": \"Published after (YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"Only include articles/events/classifieds posted to Patch on or after this date (i.e. listing date, not an event's own occurrence date -- see `eventDateAfter` for that). Format: YYYY-MM-DD. Combine with `publishedBefore` for a date range.\",\n      \"editor\": \"textfield\",\n      \"pattern\": \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"\n    },\n    \"publishedBefore\": {\n      \"title\": \"Published before (YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"Only include articles/events/classifieds posted to Patch on or before this date. Format: YYYY-MM-DD. Combine with `publishedAfter` for a date range.\",\n      \"editor\": \"textfield\",\n      \"pattern\": \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"\n    },\n    \"eventDateAfter\": {\n      \"title\": \"Event date after (YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"mode=events only. Only include events occurring on or after this date (the event's own date, not when it was posted to Patch -- see `publishedAfter` for that). Format: YYYY-MM-DD. Combine with `eventDateBefore` for a date range, e.g. \\\"what's happening this weekend\\\".\",\n      \"editor\": \"textfield\",\n      \"pattern\": \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"\n    },\n    \"eventDateBefore\": {\n      \"title\": \"Event date before (YYYY-MM-DD)\",\n      \"type\": \"string\",\n      \"description\": \"mode=events only. Only include events occurring on or before this date. Format: YYYY-MM-DD. Combine with `eventDateAfter` for a date range.\",\n      \"editor\": \"textfield\",\n      \"pattern\": \"^\\\\d{4}-\\\\d{2}-\\\\d{2}$\"\n    },\n    \"nearLat\": {\n      \"title\": \"Near latitude\",\n      \"type\": \"number\",\n      \"description\": \"Latitude of a point to search near (combine with `nearLng` and `radiusMiles`). News modes only (search/byTown/byCategory/byAuthor/byTag) -- not available for mode=events/classifieds, whose Patch indexes don't expose a filterable location field. Both `nearLat` and `nearLng` must be set together; otherwise this filter is ignored.\",\n      \"minimum\": -90,\n      \"maximum\": 90\n    },\n    \"nearLng\": {\n      \"title\": \"Near longitude\",\n      \"type\": \"number\",\n      \"description\": \"Longitude of a point to search near (combine with `nearLat` and `radiusMiles`). News modes only -- see `nearLat` description. Both `nearLat` and `nearLng` must be set together; otherwise this filter is ignored.\",\n      \"minimum\": -180,\n      \"maximum\": 180\n    },\n    \"radiusMiles\": {\n      \"title\": \"Radius (miles)\",\n      \"type\": \"integer\",\n      \"description\": \"Search radius around `nearLat`/`nearLng`, in miles. News modes only -- see `nearLat` description. Ignored unless both `nearLat` and `nearLng` are set.\",\n      \"minimum\": 1,\n      \"maximum\": 500,\n      \"default\": 25,\n      \"prefill\": 25\n    },\n    \"includeBodyText\": {\n      \"title\": \"Include full body text\",\n      \"type\": \"boolean\",\n      \"description\": \"Add bodyHtml (the original HTML), bodyText (readable plain text) and bodyLength to each record. Article/event/classified bodies come from Patch's own search payload, so this costs no extra request.\",\n      \"default\": true,\n      \"prefill\": false\n    },\n    \"includeDetails\": {\n      \"title\": \"Enrich from detail pages\",\n      \"type\": \"boolean\",\n      \"description\": \"Fetch each record's Patch page and add gallery images/captions/credits, author avatar and points, comment/reply counts, breaking/sponsored flags, town grade/weekly views/ZIPs/timezone/county/metro, event venue/type/website, and classified contact state. One extra request per record; failed pages never discard the base record.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"maxDetails\": {\n      \"title\": \"Max detail pages\",\n      \"type\": \"integer\",\n      \"description\": \"How many records to enrich when `includeDetails` is on. 0 means every emitted record (up to `maxItems`). Ignored when detail enrichment is off.\",\n      \"minimum\": 0,\n      \"maximum\": 1000,\n      \"default\": 100,\n      \"prefill\": 0\n    },\n    \"monitorMode\": {\n      \"title\": \"Monitor: only new records\",\n      \"type\": \"boolean\",\n      \"description\": \"Emit only records whose Patch ID has not been seen by an earlier run with the same monitor key. State is stored in the actor's key-value store.\",\n      \"default\": false,\n      \"prefill\": false\n    },\n    \"monitorKey\": {\n      \"title\": \"Monitor key\",\n      \"type\": \"string\",\n      \"description\": \"Optional namespace for monitor state. Give different saved tasks different keys to keep their seen-ID lists separate. Derived automatically from the mode and filters when empty.\",\n      \"editor\": \"textfield\",\n      \"default\": \"\",\n      \"prefill\": \"\"\n    },\n    \"maxItems\": {\n      \"title\": \"Max results\",\n      \"type\": \"integer\",\n      \"description\": \"Maximum number of articles, events or classifieds to return (1-1000). Requests above 250 are automatically split into date partitions to bypass Patch's 250-hit search-key window.\",\n      \"minimum\": 1,\n      \"maximum\": 1000,\n      \"default\": 25,\n      \"prefill\": 3\n    }\n  },\n  \"required\": [\n    \"mode\"\n  ]\n}",
    "readme": "# Patch.com Local News, Events & Classifieds Finder\n\nCollect hyperlocal US news, local events and classifieds from **Patch.com** in one run. Search by keyword across the whole country, browse a town or a news category, follow one reporter or editorial tag, open the local events calendar, scan the classifieds board, or paste Patch URLs directly. Every record can include the full body text, article coordinates and expiry, and optional detail-page metadata such as gallery images, author avatars, comment counts, town grade/views/ZIPs, event venue details and classified contact state. No login, cookies, proxy or API key required.\n\n## What this actor does\n\n- **Eight modes:** `search`, `byTown`, `byCategory`, `byAuthor`, `byTag`, `events`, `classifieds`, `byUrl`\n- **Direct URL support:** paste article, event, classified, town, topic, state or search URLs and the actor turns them into a record or an equivalent scoped query\n- **Full body text:** `bodyHtml`, `bodyText` and `bodyLength` come straight from Patch's own search payload, so they cost no extra request\n- **Optional detail enrichment:** gallery images with captions/credits, author avatar and points, comment/reply counts, breaking/sponsored/staff flags, town grade/weekly views/ZIPs/timezone/county/metro, event venue/type/website and classified contact-form state\n- **Article coordinates and expiry:** `latitude`, `longitude` and `expiresDate` for articles; events and classifieds also expose their expiry and event coordinates\n- **Up to 1,000 rows:** requests above Patch's 250-hit search window are automatically split into date partitions and deduplicated\n- **Monitor mode:** emit only IDs that a previous run with the same monitor key has not seen\n- **Search matching control:** all-words matching by default, exact-phrase matching when you need it\n- **Filters:** publish-date range, event-occurrence date range, US state/edition, town, news category, classifieds category, author, tag and geo-radius/nearest sorting\n- **Clean records:** empty fields are omitted at every depth; no `null`, `\"\"` or `[]` values are pushed\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `search` | `search`, `byTown`, `byCategory`, `byAuthor`, `byTag`, `events`, `classifieds` or `byUrl` |\n| `startUrls` | request list | – | mode=byUrl only. Article, event, classified, town, category/topic, state or search URLs |\n| `searchQuery` | text | – | Keyword to search for; empty means browse with the other filters |\n| `searchMatch` | select | `allWords` | `allWords` (every word anywhere) or `exactPhrase` (words adjacent, the old behavior) |\n| `authorName` | text | – | Exact byline; required for `byAuthor`, extra filter elsewhere |\n| `tagName` | text | – | Exact editorial tag; required for `byTag`, extra filter on article modes |\n| `regionSlug` | select | – | US state/edition, including `across-america` (national) and `us-territories` |\n| `townSlug` | text | – | Town/city slug or full town URL; pair with `regionSlug` for `byTown` |\n| `category` | select | – | One of 21 Patch news topics |\n| `classifiedCategory` | select | – | One of 11 classifieds categories (classifieds mode only) |\n| `sortBy` | select | `relevance` | `relevance`, `newest`, `oldest`, `nearest` (news + geo), `eventDate` (events) |\n| `publishedAfter` / `publishedBefore` | text | – | `YYYY-MM-DD` bounds on when the record was posted to Patch |\n| `eventDateAfter` / `eventDateBefore` | text | – | `YYYY-MM-DD` bounds on the event's own occurrence date (events only) |\n| `nearLat` / `nearLng` | number | – | Center point for a news geo-radius search; set both together |\n| `radiusMiles` | integer | `25` | Radius in miles (1–500) |\n| `includeBodyText` | boolean | `true` | Add `bodyHtml`, `bodyText`, `bodyLength` |\n| `includeDetails` | boolean | `false` | Fetch each record's Patch page for optional enrichment fields |\n| `maxDetails` | integer | `100` | Detail pages to fetch; `0` means every emitted record |\n| `monitorMode` | boolean | `false` | Emit only records not seen by an earlier run |\n| `monitorKey` | text | – | Namespace for monitor state; derived from the query when empty |\n| `maxItems` | integer | `25` | Maximum records to return (1–1,000) |\n\n`regionSlug` and `townSlug` are the two path segments in a Patch town URL: `patch.com/california/santamonica` gives `regionSlug=california`, `townSlug=santamonica`. `startUrls` accepts full URLs or bare `patch.com/...` paths; non-Patch URLs are ignored with a warning.\n\n## Modes\n\n| Mode | What it does |\n|---|---|\n| `search` | Keyword or browse search across Patch articles; combine any filters |\n| `byTown` | Latest articles for one town (requires `regionSlug` + `townSlug`) |\n| `byCategory` | Browse one Patch news topic (requires `category`) |\n| `byAuthor` | Every article matching one exact byline (requires `authorName`) |\n| `byTag` | Every article carrying one exact editorial tag (requires `tagName`) |\n| `events` | Patch's local events calendar with venue, type and website enrichment |\n| `classifieds` | Patch's marketplace listings with contact-form state |\n| `byUrl` | Paste Patch article/event/classified URLs for direct records, or town/topic/state/search URLs for scoped queries |\n\n## Output fields\n\nEvery record includes `recordType` (`article` / `event` / `classified`) and `scrapedAt` last. Field availability depends on the content type and on whether detail enrichment is on; anything Patch does not provide is omitted rather than returned as an empty value.\n\n### Common fields\n\n- `headline`, `shortHeadline`, `summary`, `author`, `authorId`, `authorUrl`\n- `publishedDate`, `updatedDate` (only when changed), `url`\n- `town`, `townUrl`, `state`, `regionUrl`, `stateName`\n- `imageUrl`, `imageCount`, `images[]` (`url`, `caption`, `credit`, `copyright` when detail enrichment is on)\n- `bodyHtml`, `bodyText`, `bodyLength` (when `includeBodyText` is true)\n- `expiresDate`, `contentType`, `patchId`, `promotedUntil`\n\n### Articles\n\n- `articleId`, `category`, `tags`, `latitude`, `longitude`, `distanceMiles` (geo runs only)\n- `topicId`, `tagIds`, `townId`\n- Detail enrichment: `preHeader`, `authorAvatarUrl`, `authorPoints`, `commentCount`, `replyCount`\n- Detail enrichment: `isBreakingNews`, `isSponsoredContent`, `isStaffContent`, `isPressRelease`, `isNeighborContent`, `isNewsPartnerContent`, `isDailyDigest`, `isRobot`, `isExternal`, `isTopStory`, `isMostRecent`, `isShared`, `isEvergreen`, `isOriginalContent`, `contentSource`\n- Detail enrichment: `townGrade`, `townWeeklyViews`, `townZipCodes`, `timezone`, `countyName`, `countyFips`, `metroArea`, `townLatitude`, `townLongitude`, `townType`, `townModel`\n\n### Events\n\n- `eventId`, `eventDate`, `eventAddress`, `eventLat`, `eventLng`, `isPromoted`, `isSharedNationally`\n- Detail enrichment: `eventVenueName`, `eventStreetAddress`, `eventCountry`, `eventWebsite`, `eventType`, `eventStatus`, `interestedCount`, `sharedTowns[]`\n- Same author, comment, town and image enrichment fields as articles\n\n### Classifieds\n\n- `classifiedId`, `category`, `expiresDate`, `isPromoted`, `isSharedNationally`\n- Detail enrichment: `contactFormEnabled`, `thankCount`\n- Same author, comment, town and image enrichment fields as articles\n\n## Examples\n\nNationwide keyword search with full body text:\n\n```json\n{\n  \"mode\": \"search\",\n  \"searchQuery\": \"school board\",\n  \"sortBy\": \"newest\",\n  \"includeBodyText\": true,\n  \"maxItems\": 50\n}\n```\n\nOne town with detail enrichment:\n\n```json\n{\n  \"mode\": \"byTown\",\n  \"regionSlug\": \"california\",\n  \"townSlug\": \"santamonica\",\n  \"includeDetails\": true,\n  \"maxDetails\": 25,\n  \"maxItems\": 25\n}\n```\n\nEvents happening in a date range:\n\n```json\n{\n  \"mode\": \"events\",\n  \"regionSlug\": \"california\",\n  \"townSlug\": \"santamonica\",\n  \"eventDateAfter\": \"2026-11-01\",\n  \"eventDateBefore\": \"2026-11-30\",\n  \"sortBy\": \"eventDate\",\n  \"maxItems\": 100\n}\n```\n\nClassifieds in one category:\n\n```json\n{\n  \"mode\": \"classifieds\",\n  \"classifiedCategory\": \"housing\",\n  \"regionSlug\": \"texas\",\n  \"maxItems\": 50\n}\n```\n\nPaste any mix of Patch URLs:\n\n```json\n{\n  \"mode\": \"byUrl\",\n  \"startUrls\": [\n    { \"url\": \"https://patch.com/california/santamonica/some-article\" },\n    { \"url\": \"https://patch.com/california/across-ca\" }\n  ],\n  \"includeBodyText\": true,\n  \"maxItems\": 100\n}\n```\n\nOnly new records since the previous run:\n\n```json\n{\n  \"mode\": \"search\",\n  \"searchQuery\": \"city council\",\n  \"monitorMode\": true,\n  \"monitorKey\": \"santamonica-council\",\n  \"maxItems\": 100\n}\n```\n\nLarge runs above 250 rows:\n\n```json\n{\n  \"mode\": \"search\",\n  \"searchQuery\": \"high school sports\",\n  \"sortBy\": \"newest\",\n  \"maxItems\": 1000\n}\n```\n\n## How pagination works\n\nPatch's public search key exposes at most 250 hits per query. For `maxItems` above 250 the actor probes the date range, recursively splits it into `created_ts` slices (or `display_date_ts` for `sortBy=eventDate`), collects each slice under the cap, deduplicates by Patch ID and then sorts the merged result. A bounded request budget prevents runaway calls; if the budget is reached before the requested row count, the status message says so instead of silently short-changing the run. There is no wall-clock cutoff.\n\n## Data source\n\nPatch.com's public site and the search service that powers it. The actor bootstraps the scoped search host/key from Patch's own SSR payload on each run, and uses public SSR detail pages only when detail enrichment or URL mode asks for them. It never uses cookies, logins, paid proxies or unofficial credentials.\n\n## Limitations\n\n- **250 hits per backend query:** handled with date partitioning; extremely dense single-second ranges can still cap a slice.\n- **Image placeholders:** some `imageUrl` values are Patch layout assets rather than article photos; `images[]` from detail pages is the gallery source.\n- **Conditional metadata:** venue name/street, author avatars, gallery captions and classified contact state appear only when Patch stores them.\n- **US only:** Patch is a US hyperlocal network. `us-territories` is a valid region but currently has no articles; `across-america` is the national edition.\n- **Comment text and article view counts:** Patch does not expose comment threads, commenter identities or article view counts publicly; only counts and town-level weekly views are available.\n- **Detail enrichment is optional and per-record:** it costs one request per record, so it is off by default and can be capped with `maxDetails`.\n\n## FAQ\n\n**Do I need an API key, cookies or a proxy?**\nNo. The actor reads Patch's public search service and public pages directly. Every mode works without credentials or proxy setup.\n\n**Is this affiliated with Patch.com?**\nNo. It is an independent third-party actor that reads publicly accessible Patch.com data. It is not affiliated with or endorsed by Patch Media.\n\n**How do I find a town's `regionSlug` and `townSlug`?**\nOpen the town on patch.com and read the URL: `patch.com/new-york/manhattan` means `regionSlug=new-york`, `townSlug=manhattan`. You can also paste the full town URL into `byUrl`.\n\n**How do I find an exact `authorName` or `tagName`?**\nRun another mode first and copy the value from the `author` or `tags` field. Patch matches these exactly (case-insensitive), so a guessed value may return zero records.\n\n**Why did a keyword search change its result count compared with the old version?**\nThe new default is `searchMatch=allWords`, which requires every word to appear anywhere in the headline/summary/topic and usually returns more relevant matches than an exact phrase. Set `searchMatch=exactPhrase` to restore the old phrase-only behavior.\n\n**Does the actor return the full article, event or classified body?**\nYes. `bodyHtml`, `bodyText` and `bodyLength` are included by default. Set `includeBodyText=false` to keep records small and avoid the body payload entirely.\n\n**What does `includeDetails` add, and what does it cost?**\nIt fetches each record's Patch page once to add gallery images/captions/credits, author avatars, comment counts, flags, town metadata, event venue/type/website and classified contact state. Failed detail pages never discard the base record; use `maxDetails` to cap the extra requests.\n\n**How do I get more than 250 rows?**\nSet `maxItems` up to 1,000. The actor automatically partitions the date range to stay under Patch's per-query window. For very broad queries, narrow the town, category or publish-date range to reduce the number of partitions.\n\n**How does monitor mode remember what it has seen?**\nIt stores a bounded list of Patch IDs in a persistent named key-value store (shared across runs) under a key derived from `monitorKey` (or from the query when no key is given). Reuse the same key across scheduled runs to receive only new records.\n\n**How fresh is the data?**\nResults come from Patch's live search index and live pages at run time, so they typically reflect newly published articles/events/classifieds within minutes.\n",
    "actorDefinition": {
      "actorSpecification": 1,
      "name": "patch-com-local-news-events-and-classifieds-finder",
      "title": "Patch.com Local News, Events & Classifieds Finder",
      "description": "Scrape Patch.com hyperlocal US news, events and classifieds by keyword, town, category, author, tag or URL, with full body text, optional detail enrichment, date/distance filters and new-record monitoring.",
      "version": "1.0",
      "buildTag": "latest",
      "dockerfile": "./Dockerfile",
      "readme": "# Patch.com Local News, Events & Classifieds Finder\n\nCollect hyperlocal US news, local events and classifieds from **Patch.com** in one run. Search by keyword across the whole country, browse a town or a news category, follow one reporter or editorial tag, open the local events calendar, scan the classifieds board, or paste Patch URLs directly. Every record can include the full body text, article coordinates and expiry, and optional detail-page metadata such as gallery images, author avatars, comment counts, town grade/views/ZIPs, event venue details and classified contact state. No login, cookies, proxy or API key required.\n\n## What this actor does\n\n- **Eight modes:** `search`, `byTown`, `byCategory`, `byAuthor`, `byTag`, `events`, `classifieds`, `byUrl`\n- **Direct URL support:** paste article, event, classified, town, topic, state or search URLs and the actor turns them into a record or an equivalent scoped query\n- **Full body text:** `bodyHtml`, `bodyText` and `bodyLength` come straight from Patch's own search payload, so they cost no extra request\n- **Optional detail enrichment:** gallery images with captions/credits, author avatar and points, comment/reply counts, breaking/sponsored/staff flags, town grade/weekly views/ZIPs/timezone/county/metro, event venue/type/website and classified contact-form state\n- **Article coordinates and expiry:** `latitude`, `longitude` and `expiresDate` for articles; events and classifieds also expose their expiry and event coordinates\n- **Up to 1,000 rows:** requests above Patch's 250-hit search window are automatically split into date partitions and deduplicated\n- **Monitor mode:** emit only IDs that a previous run with the same monitor key has not seen\n- **Search matching control:** all-words matching by default, exact-phrase matching when you need it\n- **Filters:** publish-date range, event-occurrence date range, US state/edition, town, news category, classifieds category, author, tag and geo-radius/nearest sorting\n- **Clean records:** empty fields are omitted at every depth; no `null`, `\"\"` or `[]` values are pushed\n\n## Input\n\n| Field | Type | Default | Description |\n|---|---|---|---|\n| `mode` | select | `search` | `search`, `byTown`, `byCategory`, `byAuthor`, `byTag`, `events`, `classifieds` or `byUrl` |\n| `startUrls` | request list | – | mode=byUrl only. Article, event, classified, town, category/topic, state or search URLs |\n| `searchQuery` | text | – | Keyword to search for; empty means browse with the other filters |\n| `searchMatch` | select | `allWords` | `allWords` (every word anywhere) or `exactPhrase` (words adjacent, the old behavior) |\n| `authorName` | text | – | Exact byline; required for `byAuthor`, extra filter elsewhere |\n| `tagName` | text | – | Exact editorial tag; required for `byTag`, extra filter on article modes |\n| `regionSlug` | select | – | US state/edition, including `across-america` (national) and `us-territories` |\n| `townSlug` | text | – | Town/city slug or full town URL; pair with `regionSlug` for `byTown` |\n| `category` | select | – | One of 21 Patch news topics |\n| `classifiedCategory` | select | – | One of 11 classifieds categories (classifieds mode only) |\n| `sortBy` | select | `relevance` | `relevance`, `newest`, `oldest`, `nearest` (news + geo), `eventDate` (events) |\n| `publishedAfter` / `publishedBefore` | text | – | `YYYY-MM-DD` bounds on when the record was posted to Patch |\n| `eventDateAfter` / `eventDateBefore` | text | – | `YYYY-MM-DD` bounds on the event's own occurrence date (events only) |\n| `nearLat` / `nearLng` | number | – | Center point for a news geo-radius search; set both together |\n| `radiusMiles` | integer | `25` | Radius in miles (1–500) |\n| `includeBodyText` | boolean | `true` | Add `bodyHtml`, `bodyText`, `bodyLength` |\n| `includeDetails` | boolean | `false` | Fetch each record's Patch page for optional enrichment fields |\n| `maxDetails` | integer | `100` | Detail pages to fetch; `0` means every emitted record |\n| `monitorMode` | boolean | `false` | Emit only records not seen by an earlier run |\n| `monitorKey` | text | – | Namespace for monitor state; derived from the query when empty |\n| `maxItems` | integer | `25` | Maximum records to return (1–1,000) |\n\n`regionSlug` and `townSlug` are the two path segments in a Patch town URL: `patch.com/california/santamonica` gives `regionSlug=california`, `townSlug=santamonica`. `startUrls` accepts full URLs or bare `patch.com/...` paths; non-Patch URLs are ignored with a warning.\n\n## Modes\n\n| Mode | What it does |\n|---|---|\n| `search` | Keyword or browse search across Patch articles; combine any filters |\n| `byTown` | Latest articles for one town (requires `regionSlug` + `townSlug`) |\n| `byCategory` | Browse one Patch news topic (requires `category`) |\n| `byAuthor` | Every article matching one exact byline (requires `authorName`) |\n| `byTag` | Every article carrying one exact editorial tag (requires `tagName`) |\n| `events` | Patch's local events calendar with venue, type and website enrichment |\n| `classifieds` | Patch's marketplace listings with contact-form state |\n| `byUrl` | Paste Patch article/event/classified URLs for direct records, or town/topic/state/search URLs for scoped queries |\n\n## Output fields\n\nEvery record includes `recordType` (`article` / `event` / `classified`) and `scrapedAt` last. Field availability depends on the content type and on whether detail enrichment is on; anything Patch does not provide is omitted rather than returned as an empty value.\n\n### Common fields\n\n- `headline`, `shortHeadline`, `summary`, `author`, `authorId`, `authorUrl`\n- `publishedDate`, `updatedDate` (only when changed), `url`\n- `town`, `townUrl`, `state`, `regionUrl`, `stateName`\n- `imageUrl`, `imageCount`, `images[]` (`url`, `caption`, `credit`, `copyright` when detail enrichment is on)\n- `bodyHtml`, `bodyText`, `bodyLength` (when `includeBodyText` is true)\n- `expiresDate`, `contentType`, `patchId`, `promotedUntil`\n\n### Articles\n\n- `articleId`, `category`, `tags`, `latitude`, `longitude`, `distanceMiles` (geo runs only)\n- `topicId`, `tagIds`, `townId`\n- Detail enrichment: `preHeader`, `authorAvatarUrl`, `authorPoints`, `commentCount`, `replyCount`\n- Detail enrichment: `isBreakingNews`, `isSponsoredContent`, `isStaffContent`, `isPressRelease`, `isNeighborContent`, `isNewsPartnerContent`, `isDailyDigest`, `isRobot`, `isExternal`, `isTopStory`, `isMostRecent`, `isShared`, `isEvergreen`, `isOriginalContent`, `contentSource`\n- Detail enrichment: `townGrade`, `townWeeklyViews`, `townZipCodes`, `timezone`, `countyName`, `countyFips`, `metroArea`, `townLatitude`, `townLongitude`, `townType`, `townModel`\n\n### Events\n\n- `eventId`, `eventDate`, `eventAddress`, `eventLat`, `eventLng`, `isPromoted`, `isSharedNationally`\n- Detail enrichment: `eventVenueName`, `eventStreetAddress`, `eventCountry`, `eventWebsite`, `eventType`, `eventStatus`, `interestedCount`, `sharedTowns[]`\n- Same author, comment, town and image enrichment fields as articles\n\n### Classifieds\n\n- `classifiedId`, `category`, `expiresDate`, `isPromoted`, `isSharedNationally`\n- Detail enrichment: `contactFormEnabled`, `thankCount`\n- Same author, comment, town and image enrichment fields as articles\n\n## Examples\n\nNationwide keyword search with full body text:\n\n```json\n{\n  \"mode\": \"search\",\n  \"searchQuery\": \"school board\",\n  \"sortBy\": \"newest\",\n  \"includeBodyText\": true,\n  \"maxItems\": 50\n}\n```\n\nOne town with detail enrichment:\n\n```json\n{\n  \"mode\": \"byTown\",\n  \"regionSlug\": \"california\",\n  \"townSlug\": \"santamonica\",\n  \"includeDetails\": true,\n  \"maxDetails\": 25,\n  \"maxItems\": 25\n}\n```\n\nEvents happening in a date range:\n\n```json\n{\n  \"mode\": \"events\",\n  \"regionSlug\": \"california\",\n  \"townSlug\": \"santamonica\",\n  \"eventDateAfter\": \"2026-11-01\",\n  \"eventDateBefore\": \"2026-11-30\",\n  \"sortBy\": \"eventDate\",\n  \"maxItems\": 100\n}\n```\n\nClassifieds in one category:\n\n```json\n{\n  \"mode\": \"classifieds\",\n  \"classifiedCategory\": \"housing\",\n  \"regionSlug\": \"texas\",\n  \"maxItems\": 50\n}\n```\n\nPaste any mix of Patch URLs:\n\n```json\n{\n  \"mode\": \"byUrl\",\n  \"startUrls\": [\n    { \"url\": \"https://patch.com/california/santamonica/some-article\" },\n    { \"url\": \"https://patch.com/california/across-ca\" }\n  ],\n  \"includeBodyText\": true,\n  \"maxItems\": 100\n}\n```\n\nOnly new records since the previous run:\n\n```json\n{\n  \"mode\": \"search\",\n  \"searchQuery\": \"city council\",\n  \"monitorMode\": true,\n  \"monitorKey\": \"santamonica-council\",\n  \"maxItems\": 100\n}\n```\n\nLarge runs above 250 rows:\n\n```json\n{\n  \"mode\": \"search\",\n  \"searchQuery\": \"high school sports\",\n  \"sortBy\": \"newest\",\n  \"maxItems\": 1000\n}\n```\n\n## How pagination works\n\nPatch's public search key exposes at most 250 hits per query. For `maxItems` above 250 the actor probes the date range, recursively splits it into `created_ts` slices (or `display_date_ts` for `sortBy=eventDate`), collects each slice under the cap, deduplicates by Patch ID and then sorts the merged result. A bounded request budget prevents runaway calls; if the budget is reached before the requested row count, the status message says so instead of silently short-changing the run. There is no wall-clock cutoff.\n\n## Data source\n\nPatch.com's public site and the search service that powers it. The actor bootstraps the scoped search host/key from Patch's own SSR payload on each run, and uses public SSR detail pages only when detail enrichment or URL mode asks for them. It never uses cookies, logins, paid proxies or unofficial credentials.\n\n## Limitations\n\n- **250 hits per backend query:** handled with date partitioning; extremely dense single-second ranges can still cap a slice.\n- **Image placeholders:** some `imageUrl` values are Patch layout assets rather than article photos; `images[]` from detail pages is the gallery source.\n- **Conditional metadata:** venue name/street, author avatars, gallery captions and classified contact state appear only when Patch stores them.\n- **US only:** Patch is a US hyperlocal network. `us-territories` is a valid region but currently has no articles; `across-america` is the national edition.\n- **Comment text and article view counts:** Patch does not expose comment threads, commenter identities or article view counts publicly; only counts and town-level weekly views are available.\n- **Detail enrichment is optional and per-record:** it costs one request per record, so it is off by default and can be capped with `maxDetails`.\n\n## FAQ\n\n**Do I need an API key, cookies or a proxy?**\nNo. The actor reads Patch's public search service and public pages directly. Every mode works without credentials or proxy setup.\n\n**Is this affiliated with Patch.com?**\nNo. It is an independent third-party actor that reads publicly accessible Patch.com data. It is not affiliated with or endorsed by Patch Media.\n\n**How do I find a town's `regionSlug` and `townSlug`?**\nOpen the town on patch.com and read the URL: `patch.com/new-york/manhattan` means `regionSlug=new-york`, `townSlug=manhattan`. You can also paste the full town URL into `byUrl`.\n\n**How do I find an exact `authorName` or `tagName`?**\nRun another mode first and copy the value from the `author` or `tags` field. Patch matches these exactly (case-insensitive), so a guessed value may return zero records.\n\n**Why did a keyword search change its result count compared with the old version?**\nThe new default is `searchMatch=allWords`, which requires every word to appear anywhere in the headline/summary/topic and usually returns more relevant matches than an exact phrase. Set `searchMatch=exactPhrase` to restore the old phrase-only behavior.\n\n**Does the actor return the full article, event or classified body?**\nYes. `bodyHtml`, `bodyText` and `bodyLength` are included by default. Set `includeBodyText=false` to keep records small and avoid the body payload entirely.\n\n**What does `includeDetails` add, and what does it cost?**\nIt fetches each record's Patch page once to add gallery images/captions/credits, author avatars, comment counts, flags, town metadata, event venue/type/website and classified contact state. Failed detail pages never discard the base record; use `maxDetails` to cap the extra requests.\n\n**How do I get more than 250 rows?**\nSet `maxItems` up to 1,000. The actor automatically partitions the date range to stay under Patch's per-query window. For very broad queries, narrow the town, category or publish-date range to reduce the number of partitions.\n\n**How does monitor mode remember what it has seen?**\nIt stores a bounded list of Patch IDs in a persistent named key-value store (shared across runs) under a key derived from `monitorKey` (or from the query when no key is given). Reuse the same key across scheduled runs to receive only new records.\n\n**How fresh is the data?**\nResults come from Patch's live search index and live pages at run time, so they typically reflect newly published articles/events/classifieds within minutes.\n",
      "input": {
        "title": "Patch Scraper Input",
        "description": "Scrape hyperlocal US news, events and classifieds from Patch.com by keyword, town, category, author, tag or URL, with optional full body text, detail-page enrichment and new-record monitoring.",
        "type": "object",
        "schemaVersion": 1,
        "properties": {
          "mode": {
            "title": "Mode",
            "type": "string",
            "description": "What to fetch from Patch.com.",
            "editor": "select",
            "enum": [
              "search",
              "byTown",
              "byCategory",
              "byAuthor",
              "byTag",
              "events",
              "classifieds",
              "byUrl"
            ],
            "enumTitles": [
              "Search by keyword",
              "Browse latest news for a town/city",
              "Browse by category",
              "Browse articles by author/reporter",
              "Browse articles by editorial tag",
              "Browse local events (calendar)",
              "Browse local classifieds (marketplace listings)",
              "Scrape Patch URLs (article, event, classified, town, topic, state or search)"
            ],
            "default": "search",
            "prefill": "search"
          },
          "startUrls": {
            "title": "Patch URLs",
            "type": "array",
            "description": "mode=byUrl only. Paste Patch article, event, classified, town, category/topic, state or search URLs. Article/event/classified URLs are scraped directly; town/topic/state/search URLs are converted into the equivalent scoped query.",
            "editor": "requestListSources",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL",
                  "description": "A full Patch.com URL (or patch.com/... path)."
                }
              }
            }
          },
          "searchQuery": {
            "title": "Search query",
            "type": "string",
            "description": "Free-text keyword to search for (mode=search; also applies to mode=events/classifieds and to scope URLs). Leave empty to browse the newest articles matching the other filters.",
            "editor": "textfield",
            "prefill": "city council"
          },
          "searchMatch": {
            "title": "Search match",
            "type": "string",
            "description": "How multi-word searches match. \"All words\" requires every word anywhere in the headline/summary/topic (more results). \"Exact phrase\" requires the words to appear together (the old behavior).",
            "editor": "select",
            "enum": [
              "allWords",
              "exactPhrase"
            ],
            "enumTitles": [
              "All words anywhere",
              "Exact phrase"
            ],
            "default": "allWords",
            "prefill": "allWords"
          },
          "authorName": {
            "title": "Author name",
            "type": "string",
            "description": "Exact byline/reporter/poster name (required for mode=byAuthor; on any other mode it is an extra server-side filter). Copy it from this actor's `author` output field, e.g. \"Eric Heyl\".",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "tagName": {
            "title": "Tag name",
            "type": "string",
            "description": "Exact editorial tag (required for mode=byTag; on article modes it is an extra filter). Copy it from this actor's `tags` field, e.g. \"Back To School\". Only a minority of articles carry tags.",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "regionSlug": {
            "title": "State",
            "type": "string",
            "description": "US state/edition to scope results to (required for mode=byTown; optional filter on every other mode). \"Across America\" is Patch's national edition (code US); \"US Territories\" is a valid Patch region with no current articles.",
            "editor": "select",
            "enum": [
              "",
              "across-america",
              "alabama",
              "alaska",
              "arizona",
              "arkansas",
              "california",
              "colorado",
              "connecticut",
              "delaware",
              "district-columbia",
              "florida",
              "georgia",
              "hawaii",
              "idaho",
              "illinois",
              "indiana",
              "iowa",
              "kansas",
              "kentucky",
              "louisiana",
              "maine",
              "maryland",
              "massachusetts",
              "michigan",
              "minnesota",
              "mississippi",
              "missouri",
              "montana",
              "nebraska",
              "nevada",
              "new-hampshire",
              "new-jersey",
              "new-mexico",
              "new-york",
              "north-carolina",
              "north-dakota",
              "ohio",
              "oklahoma",
              "oregon",
              "pennsylvania",
              "rhode-island",
              "south-carolina",
              "south-dakota",
              "tennessee",
              "texas",
              "us-territories",
              "utah",
              "vermont",
              "virginia",
              "washington",
              "west-virginia",
              "wisconsin",
              "wyoming"
            ],
            "enumTitles": [
              "(any state - nationwide)",
              "Across America (national edition)",
              "Alabama",
              "Alaska",
              "Arizona",
              "Arkansas",
              "California",
              "Colorado",
              "Connecticut",
              "Delaware",
              "District of Columbia",
              "Florida",
              "Georgia",
              "Hawaii",
              "Idaho",
              "Illinois",
              "Indiana",
              "Iowa",
              "Kansas",
              "Kentucky",
              "Louisiana",
              "Maine",
              "Maryland",
              "Massachusetts",
              "Michigan",
              "Minnesota",
              "Mississippi",
              "Missouri",
              "Montana",
              "Nebraska",
              "Nevada",
              "New Hampshire",
              "New Jersey",
              "New Mexico",
              "New York",
              "North Carolina",
              "North Dakota",
              "Ohio",
              "Oklahoma",
              "Oregon",
              "Pennsylvania",
              "Rhode Island",
              "South Carolina",
              "South Dakota",
              "Tennessee",
              "Texas",
              "US Territories",
              "Utah",
              "Vermont",
              "Virginia",
              "Washington",
              "West Virginia",
              "Wisconsin",
              "Wyoming"
            ],
            "default": "",
            "prefill": ""
          },
          "townSlug": {
            "title": "Town/city slug",
            "type": "string",
            "description": "Patch town/city URL slug (required for mode=byTown; requires regionSlug too). Find it in a Patch URL, e.g. patch.com/california/santamonica -> \"santamonica\". Example: \"santamonica\" (with regionSlug=california).",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "category": {
            "title": "Category",
            "type": "string",
            "description": "News category/topic to filter by (required for mode=byCategory; optional filter on mode=search/byTown/byAuthor/byTag). Not applicable to mode=events/classifieds -- use `classifiedCategory` for mode=classifieds instead.",
            "editor": "select",
            "enum": [
              "",
              "around-town",
              "arts-entertainment",
              "bulletinboard",
              "business",
              "going-green",
              "holidays",
              "kids-family",
              "lifestyle",
              "obituaries",
              "personal-finance",
              "pets",
              "police-fire",
              "politics",
              "real-estate",
              "restaurants-bars",
              "schools",
              "small-business-voices",
              "sports",
              "traffic-transit",
              "travel",
              "weather"
            ],
            "enumTitles": [
              "(any category)",
              "Community Corner",
              "Arts & Entertainment",
              "Neighbor News",
              "Business",
              "Home & Garden",
              "Seasonal & Holidays",
              "Kids & Family",
              "Health & Fitness",
              "Obituaries",
              "Personal Finance",
              "Pets",
              "Crime & Safety",
              "Politics & Government",
              "Real Estate",
              "Restaurants & Bars",
              "Schools",
              "Local Voices",
              "Sports",
              "Traffic & Transit",
              "Travel",
              "Weather"
            ],
            "default": "",
            "prefill": ""
          },
          "classifiedCategory": {
            "title": "Classified category",
            "type": "string",
            "description": "Classifieds category to filter by (mode=classifieds only; a completely separate value set from `category`, which is news-only). Leave as \"(any category)\" to browse every classified category.",
            "editor": "select",
            "enum": [
              "",
              "announcements",
              "for-sale",
              "free-stuff",
              "gigs-services",
              "housing",
              "lost-found",
              "news-tip",
              "opinion",
              "other",
              "question",
              "recommendation"
            ],
            "enumTitles": [
              "(any category)",
              "Announcements",
              "For Sale",
              "Free Stuff",
              "Gigs & Services",
              "Housing",
              "Lost & Found",
              "News Tip",
              "Opinion",
              "Other",
              "Question",
              "Recommendation"
            ],
            "default": "",
            "prefill": ""
          },
          "sortBy": {
            "title": "Sort by",
            "type": "string",
            "description": "Order of results. \"Nearest first\" requires both `nearLat`/`nearLng` AND mode=search/byTown/byCategory/byAuthor/byTag (news); otherwise it falls back to Relevance. \"Soonest event first\" requires mode=events; on any other mode it also falls back to Relevance.",
            "editor": "select",
            "enum": [
              "relevance",
              "newest",
              "oldest",
              "nearest",
              "eventDate"
            ],
            "enumTitles": [
              "Relevance",
              "Newest first",
              "Oldest first",
              "Nearest first (requires nearLat/nearLng, news modes only)",
              "Soonest event first (requires mode=events)"
            ],
            "default": "relevance",
            "prefill": "relevance"
          },
          "publishedAfter": {
            "title": "Published after (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include articles/events/classifieds posted to Patch on or after this date (i.e. listing date, not an event's own occurrence date -- see `eventDateAfter` for that). Format: YYYY-MM-DD. Combine with `publishedBefore` for a date range.",
            "editor": "textfield",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "publishedBefore": {
            "title": "Published before (YYYY-MM-DD)",
            "type": "string",
            "description": "Only include articles/events/classifieds posted to Patch on or before this date. Format: YYYY-MM-DD. Combine with `publishedAfter` for a date range.",
            "editor": "textfield",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "eventDateAfter": {
            "title": "Event date after (YYYY-MM-DD)",
            "type": "string",
            "description": "mode=events only. Only include events occurring on or after this date (the event's own date, not when it was posted to Patch -- see `publishedAfter` for that). Format: YYYY-MM-DD. Combine with `eventDateBefore` for a date range, e.g. \"what's happening this weekend\".",
            "editor": "textfield",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "eventDateBefore": {
            "title": "Event date before (YYYY-MM-DD)",
            "type": "string",
            "description": "mode=events only. Only include events occurring on or before this date. Format: YYYY-MM-DD. Combine with `eventDateAfter` for a date range.",
            "editor": "textfield",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
          },
          "nearLat": {
            "title": "Near latitude",
            "type": "number",
            "description": "Latitude of a point to search near (combine with `nearLng` and `radiusMiles`). News modes only (search/byTown/byCategory/byAuthor/byTag) -- not available for mode=events/classifieds, whose Patch indexes don't expose a filterable location field. Both `nearLat` and `nearLng` must be set together; otherwise this filter is ignored.",
            "minimum": -90,
            "maximum": 90
          },
          "nearLng": {
            "title": "Near longitude",
            "type": "number",
            "description": "Longitude of a point to search near (combine with `nearLat` and `radiusMiles`). News modes only -- see `nearLat` description. Both `nearLat` and `nearLng` must be set together; otherwise this filter is ignored.",
            "minimum": -180,
            "maximum": 180
          },
          "radiusMiles": {
            "title": "Radius (miles)",
            "type": "integer",
            "description": "Search radius around `nearLat`/`nearLng`, in miles. News modes only -- see `nearLat` description. Ignored unless both `nearLat` and `nearLng` are set.",
            "minimum": 1,
            "maximum": 500,
            "default": 25,
            "prefill": 25
          },
          "includeBodyText": {
            "title": "Include full body text",
            "type": "boolean",
            "description": "Add bodyHtml (the original HTML), bodyText (readable plain text) and bodyLength to each record. Article/event/classified bodies come from Patch's own search payload, so this costs no extra request.",
            "default": true,
            "prefill": false
          },
          "includeDetails": {
            "title": "Enrich from detail pages",
            "type": "boolean",
            "description": "Fetch each record's Patch page and add gallery images/captions/credits, author avatar and points, comment/reply counts, breaking/sponsored flags, town grade/weekly views/ZIPs/timezone/county/metro, event venue/type/website, and classified contact state. One extra request per record; failed pages never discard the base record.",
            "default": false,
            "prefill": false
          },
          "maxDetails": {
            "title": "Max detail pages",
            "type": "integer",
            "description": "How many records to enrich when `includeDetails` is on. 0 means every emitted record (up to `maxItems`). Ignored when detail enrichment is off.",
            "minimum": 0,
            "maximum": 1000,
            "default": 100,
            "prefill": 0
          },
          "monitorMode": {
            "title": "Monitor: only new records",
            "type": "boolean",
            "description": "Emit only records whose Patch ID has not been seen by an earlier run with the same monitor key. State is stored in the actor's key-value store.",
            "default": false,
            "prefill": false
          },
          "monitorKey": {
            "title": "Monitor key",
            "type": "string",
            "description": "Optional namespace for monitor state. Give different saved tasks different keys to keep their seen-ID lists separate. Derived automatically from the mode and filters when empty.",
            "editor": "textfield",
            "default": "",
            "prefill": ""
          },
          "maxItems": {
            "title": "Max results",
            "type": "integer",
            "description": "Maximum number of articles, events or classifieds to return (1-1000). Requests above 250 are automatically split into date partitions to bypass Patch's 250-hit search-key window.",
            "minimum": 1,
            "maximum": 1000,
            "default": 25,
            "prefill": 3
          }
        },
        "required": [
          "mode"
        ]
      },
      "output": {
        "actorOutputSchemaVersion": 1,
        "title": "Patch.com Local News, Events & Classifieds Finder Output",
        "description": "Hyperlocal Patch.com articles, events and classifieds with headline, summary, full body text, author, dates, town/category metadata, coordinates, media and optional detail-page enrichment.",
        "properties": {
          "articles": {
            "type": "string",
            "title": "Patch articles / events / classifieds",
            "description": "Dataset containing all scraped Patch.com records (articles, events or classifieds, depending on the input mode), each tagged with recordType.",
            "template": "{{links.apiDefaultDatasetUrl}}/items"
          }
        }
      },
      "storages": {
        "dataset": {
          "actorSpecification": 1,
          "views": {
            "overview": {
              "title": "Articles / Events / Classifieds",
              "transformation": {
                "fields": [
                  "recordType",
                  "headline",
                  "town",
                  "category",
                  "author",
                  "publishedDate",
                  "eventDate",
                  "url",
                  "isBreakingNews",
                  "commentCount"
                ]
              },
              "display": {
                "component": "table",
                "properties": {}
              }
            }
          }
        }
      },
      "environmentVariables": {},
      "defaultMemoryMbytes": 1024
    },
    "buildNumber": "1.0.2",
    "imageDigest": "79e8223bf0c33ab5068112893c1fc265d8083607662afb3301ebc43fa1ad0e6f",
    "actVersion": {
      "sourceType": "SOURCE_FILES",
      "buildTag": "latest",
      "versionNumber": "1.0"
    },
    "usage": {
      "ACTOR_COMPUTE_UNITS": 0.004357777777777778
    }
  }
}