# Hockley County Foreclosure Properties and Details Scraper (`realestateapi/hockley-county-foreclosure-properties-and-details-scraper`) Actor

Collect Hockley County, Texas foreclosure notices and extract sale, deed-of-trust, recording, and legal-tract details from official PDFs.

- **URL**: https://apify.com/realestateapi/hockley-county-foreclosure-properties-and-details-scraper.md
- **Developed by:** [Real Estate API](https://apify.com/realestateapi) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $3.99 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Hockley County Foreclosure Properties and Details Scraper

This Actor reads the official Hockley County, Texas Foreclosure Notices page and emits the posted sale date and direct official PDF URL for each notice. It is source-gated: while `authorizationConfirmed` is false, a run makes zero source requests, writes no dataset row, and reports `SUCCEEDED / SKIPPED_POLICY`. The county disclaimer does not itself grant a dataset reuse license, so enable collection only when documented written authorization covers automated collection, dataset storage, and the intended reuse.

When enabled, the Actor downloads each linked notice PDF from the county and can extract recording details, named parties, mortgagee and servicer, note information, auction date/time/place, property address, and legal description. PDF detail extraction is a separate opt-in (`extractDocumentDetails`, default false); index-only runs request the notices page but no PDFs. Image-only PDF pages are rendered locally and processed with the bundled English Tesseract OCR model; documents are not sent to an external OCR service. The separate designated-area information PDF is excluded by default and can be included as a supporting record.

### Input and output

Use `pageUrl` for the official county page, `authorizationConfirmed` to attest documented authorization, `maxItems` for a bounded count, `includeSupportingPdf` for the county’s designated-area PDF, `extractDocumentDetails` to enable PDF parsing and OCR, and `timeoutSecs` for each public request. Non-official hosts, PDF paths outside `/upload/page/0096/`, credentials, custom ports, and redirects to other hosts are rejected. Fragment identifiers on selected notice URLs are ignored and duplicate `www`/non-`www` variants are deduplicated.

Dataset records include county-page evidence plus nested `recording`, `deedOfTrust`, `sale`, `property`, and `extraction` objects. The property county reflects the notice when explicitly printed, even when it differs from the Hockley County recording venue. Legal descriptions and instrument identifiers are labeled as OCR-derived and can contain recognition errors; verify exact wording and digits in the linked county PDF. `OUTPUT` reports Actor `status` (`SUCCEEDED` or `FAILED`), `runStatus` and `collectionStatus` (`COMPLETED`, `PARTIAL`, `FAILED`, or `SKIPPED_POLICY`), emitted notice/supporting-document counts, detail coverage, and aggregate failures. If an official notice is saved but its PDF cannot be extracted, the real notice remains in the dataset with `detailExtractionStatus: "failed"`; the Actor run remains `SUCCEEDED / PARTIAL`. Failures with no saved records are `FAILED / FAILED`. Clean empty pages and item-limited runs are `SUCCEEDED / COMPLETED`. PDF errors are counted in `OUTPUT`; no diagnostic rows or raw error strings are written to the dataset.

### Selecting notice PDFs

Use `noticeUrls` to select exact official PDF links already published on `pageUrl`. Selection happens before `maxItems`; the Actor does not fetch a selected URL missing from the current index. `OUTPUT.selectedNoticeCount` and `unmatchedNoticeCount` explain selection mismatches, which produce a failed or partial run rather than an unrelated result. This control does not grant source rights or consent. This batch's live property/PDF review requires user authorization naming each record and the destination; until then verification keeps `extractDocumentDetails` false. Published notices can have past sale dates.

### Output

Each dataset item represents a foreclosure notice posted by Hockley County, not a verified current property listing. This illustrative record uses synthetic notice details and no real owner or contact information. It is not copied from a county notice.

```json
{
  "recordType": "hockley-county-foreclosure-notice",
  "recordId": "https://www.co.hockley.tx.us/upload/page/0096/example-notice.pdf",
  "county": "Hockley County",
  "state": "TX",
  "saleDate": "2026-12-15",
  "noticeUrl": "https://www.co.hockley.tx.us/upload/page/0096/example-notice.pdf",
  "documentName": "Illustrative foreclosure notice",
  "documentKind": "foreclosure_notice",
  "sourcePage": "https://www.co.hockley.tx.us/page/foreclosures",
  "retrievedAt": "2026-01-15T12:00:00.000Z",
  "detailExtractionStatus": "not_applicable"
}
```

# Actor input Schema

## `pageUrl` (type: `string`):

Official Hockley County page containing posted foreclosure notice links.

## `authorizationConfirmed` (type: `boolean`):

Per the 2026-11-16 workspace attestation of written permission, collection is enabled by default. Set false to explicitly opt out; when false the Actor makes no source requests. This field is an operator attestation, not a permission grant from the county.

## `maxItems` (type: `integer`):

Maximum notice and supporting-document records to emit.

## `noticeUrls` (type: `array`):

Optional exact selection of up to 20 official notice PDFs. Fragment identifiers are ignored; duplicate host variants are deduplicated. Only selected URLs still linked by pageUrl are processed; unlinked URLs are never requested. Selection is applied before maxItems. An empty list keeps index order.

## `includeSupportingPdf` (type: `boolean`):

Include the county’s designated-area information PDF as a supporting document.

## `extractDocumentDetails` (type: `boolean`):

Download linked official notice PDFs and extract recording, sale, deed-of-trust, and tract details. Scanned pages are processed with local English OCR. Leave false for index-only runs; PDFs are not requested unless this is explicitly enabled.

## `timeoutSecs` (type: `integer`):

Maximum time allowed for each official county page or notice PDF request.

## Actor input object example

```json
{
  "pageUrl": "https://www.co.hockley.tx.us/page/foreclosures",
  "authorizationConfirmed": true,
  "maxItems": 100,
  "noticeUrls": [],
  "includeSupportingPdf": false,
  "extractDocumentDetails": false,
  "timeoutSecs": 30
}
```

# Actor output Schema

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

No description

## `runSummary` (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 = {};

// Run the Actor and wait for it to finish
const run = await client.actor("realestateapi/hockley-county-foreclosure-properties-and-details-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 = {}

# Run the Actor and wait for it to finish
run = client.actor("realestateapi/hockley-county-foreclosure-properties-and-details-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 '{}' |
apify call realestateapi/hockley-county-foreclosure-properties-and-details-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,realestateapi/hockley-county-foreclosure-properties-and-details-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/90CZyofgBvIs8AwcE/builds/PfJEZcv6dx48RGqzj/openapi.json
