# Public Document Finder — Domain & Company Files (`bakos_bence/public-document-finder`) Actor

Find public PDFs and files for a company, domain, or keyword — no logins, no API keys. Search, Google Drive, cloud shares, Wayback, GitHub, sitemaps, and site crawls. Deduped URLs with type, host, and channel for lead gen and recon.

- **URL**: https://apify.com/bakos\_bence/public-document-finder.md
- **Developed by:** [Bakos Bence](https://apify.com/bakos_bence) (community)
- **Categories:** Automation, Developer tools, Lead generation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.38 / 1,000 results

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — 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

## Public Document Finder — Domain & Company Files

Find **publicly discoverable** documents and data files for a company, domain, or keyword — PDFs, Office, CSV/JSON, archives, and more. No logins and **no vendor API keys** — discovery runs through HTTP automation only.

Use it for competitive research, vendor diligence, journalism, and authorized recon when you need a structured list of public file URLs (not private contents behind auth).

### What you get

Each dataset row is one unique document URL with:

| Field | Meaning |
|-------|---------|
| `url` | Direct or share URL |
| `title` | Best-effort title |
| `fileType` | Extension hint (`pdf`, `docx`, …) |
| `hostClass` | `website`, `google_drive`, `amazon_s3`, `wayback`, `github`, … |
| `channel` | Which discovery path found it |
| `interestScore` | 0–100 heuristic OSINT triage score (cloud shares, budgets, decks, etc. rank higher; `robots.txt`-style noise is skipped) |
| `snippet` | Search snippet when available |

### How to run

1. Enter a **domain** (`mozilla.org`) and/or **keyword** (`annual report`).
2. Keep **Maximum documents** at 5 for a cheap first run.
3. Click **Start**. Export JSON/CSV or call the API.

### Google / Bing filetype search

Builds grouped `filetype:` OR queries across documents, sheets, decks, archives, and data/config files, then collects matching public URLs from search HTML.

### Google Drive & Google Docs (public)

Searches for indexed **public** Drive/Docs share links tied to your brand or domain. Only links search engines already expose; nothing behind a Google login.

### Amazon S3 / open cloud objects

Looks for publicly indexed object URLs and share pages (S3-style hosts and similar) associated with your query. Useful when marketing sites or blogs link to files on cloud storage.

### Wayback Machine / Internet Archive

Queries Wayback CDX for historical captures whose URLs end in OSINT-relevant extensions (PDF, Office, CSV, ZIP, JSON, …) on the target domain tree (`matchType=domain`).

### GitHub public assets

Finds public GitHub-hosted files related to the brand via search pivots (no GitHub API token).

### Website sitemaps

Reads `robots.txt` sitemap pointers and walks sitemap indexes for document / data / archive file URLs published by the site itself.

### Well-known / agent-discovery files

Probes `/llms.txt`, `/llms-full.txt`, `/AGENTS.md`, `/.well-known/security.txt`, and related public discovery files. Rows get an `interestScore` plus optional `discoveryFlags` (e.g. `possibleAgentInstruction`) when the text looks like agent-facing policy or prompt-injection shaped language — useful for AI-security OSINT without logging in.

### Subdomains

When **Include subdomains** is on (default), the Actor discovers public hostnames under your apex domain via certificate transparency and free host-search pages (no API keys), then extends `site:` search queries, sitemaps, and shallow crawls to those hosts (capped by **Maximum subdomains**). Common Crawl and Wayback already query the whole domain tree via wildcard / `matchType=domain`.

### Sources

Additional channels used when enabled:

- Common Crawl public index (URL extension filter across the default OSINT file-type set)
- Shallow same-site crawl of docs/research/download-style paths
- Dropbox / OneDrive / SharePoint / Box public links (search-indexed only)
- Azure Blob / GCS style hosts when they appear in search
- SlideShare / SpeakerDeck when they match the query

Turn channels on/off with the **Discovery channels** input: `search`, `commonCrawl`, `wayback`, `sitemap`, `siteCrawl`, `cloudShares`, `wellKnown`.

### Input tips

- Prefer a **hostname** (`who.int`) over a long marketing URL.
- Add an **Extra keyword** to narrow (`strategy`, `transparency`, `pricing`).
- Increase **Maximum documents** after a successful 5-row smoke.
- Enable **Apify Proxy** if search HTML is empty from datacenter IPs.

### Output & pricing

Results land in the default dataset. Pricing is **pay per result** on the Store Pricing tab (Free vs paid plans differ). The Actor stops early if your run charge limit is reached.

### Limitations

- Only **public / indexed** material — not authenticated portals, paywalls, or private Drive folders.
- Search and archive sources can rate-limit or time out; try proxy or fewer channels.
- Titles/snippets are best-effort; always open the URL to verify.
- Unofficial tool — not affiliated with Google, Amazon, Microsoft, Internet Archive, or any site you query.

### Related

Pair with a PDF text extractor Actor if you already have URLs and need full text. This Actor **finds** public document URLs; it does not OCR or parse file bodies.

# Actor input Schema

## `queries` (type: `array`):

Company domains (who.int, nasa.gov) and/or free-text keywords. Domains get site-scoped discovery; keywords run filetype search.

## `query` (type: `string`):

Optional single domain or keyword. Prefer Domains or keywords for bulk.

## `domain` (type: `string`):

Alias for a single domain query.

## `domains` (type: `array`):

Alias list of domains.

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

Optional full website URLs — hostnames are used as domains.

## `keyword` (type: `string`):

Optional brand or topic words combined with domain filetype queries (e.g. annual report).

## `includeSubdomains` (type: `boolean`):

Automatically discover subdomains (certificate transparency / public host lists) and extend site: search, sitemaps, and crawls to them.

## `maxSubdomains` (type: `integer`):

Cap how many discovered hosts to expand into (apex + www always prioritized).

## `channels` (type: `array`):

Leave empty for all. Options: search, commonCrawl, wayback, sitemap, siteCrawl, cloudShares, wellKnown.

## `fileTypes` (type: `array`):

Extensions to hunt (pdf, docx, xlsx, csv, zip, json, …). Leave empty / default for the full OSINT-relevant set.

## `fileType` (type: `string`):

Single file type alias of fileTypes.

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

Cap unique document rows. Prefill 5 for a cheap first run.

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

Alias of maxItems.

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

Optional. Enable Apify Proxy if search engines block datacenter IPs.

## `proxy` (type: `object`):

Alias for proxyConfiguration.

## Actor input object example

```json
{
  "queries": [
    "who.int"
  ],
  "includeSubdomains": true,
  "maxSubdomains": 25,
  "maxItems": 5,
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}
```

# Actor output Schema

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

Default dataset items.

# 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 = {
    "queries": [
        "who.int"
    ],
    "includeSubdomains": true,
    "maxSubdomains": 25,
    "maxItems": 5,
    "maxResults": 5,
    "proxyConfiguration": {
        "useApifyProxy": false
    }
};

// Run the Actor and wait for it to finish
const run = await client.actor("bakos_bence/public-document-finder").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 = {
    "queries": ["who.int"],
    "includeSubdomains": True,
    "maxSubdomains": 25,
    "maxItems": 5,
    "maxResults": 5,
    "proxyConfiguration": { "useApifyProxy": False },
}

# Run the Actor and wait for it to finish
run = client.actor("bakos_bence/public-document-finder").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 '{
  "queries": [
    "who.int"
  ],
  "includeSubdomains": true,
  "maxSubdomains": 25,
  "maxItems": 5,
  "maxResults": 5,
  "proxyConfiguration": {
    "useApifyProxy": false
  }
}' |
apify call bakos_bence/public-document-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bakos_bence/public-document-finder"
        }
    }
}

```

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/ECI4uzQi9cL3iO51f/builds/YwpE7ZsN09SEdjCLC/openapi.json
