# Official Social Links Finder (`eichan/official-social-links-finder`) Actor

- **URL**: https://apify.com/eichan/official-social-links-finder.md
- **Developed by:** [Eichan Jolly](https://apify.com/eichan) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 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.

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

## Official Social Links Finder

**One job:** Given one company domain, extract links to public company social profiles **from the official business homepage only**. Reads `a[href]`, `link[rel=me]`, and business-typed schema.org JSON-LD `sameAs`. It **never visits** social-network sites. LinkedIn handling is link discovery limited to `/company/…` paths, not LinkedIn scraping.

### Who it is for

B2B lead enrichment workflows, sales-operations teams, and public company-profile research.

### Inputs

```json
{"domain": "apify.com"}
```

One domain only, without `https://`, paths, or ports. The input form is prefilled with exactly this one domain.

### Dataset output

One item **per distinct recognized social profile**, up to 25 per site. Example below is **illustrative synthetic data**, not verified live data:

```json
{"domain":"acme.example","platform":"instagram","profile_url":"https://instagram.com/acmebrand","source_url":"https://acme.example/","discovery_method":"official_html_link"}
```

Fixed string fields: `domain`, `platform`, `profile_url`, `source_url`, `discovery_method` (`official_html_link` or `schema_org_sameAs`). Empty findings produce **zero dataset items** and a success message. Deduplication is by platform and normalized URL. Support: Instagram, Facebook, X/Twitter, YouTube channels, LinkedIn **company** pages, TikTok, Pinterest, Threads.

### Limits and policy

- Only the official homepage (`https://domain/`) is fetched; no deep crawl, no login, no social platform requests, no collection of named individuals, and no scraping of LinkedIn.
- Public business domains only: blocks loopback/private/non-public DNS, custom ports, non-HTTPS redirects, and redirects outside the starting host or its `www` counterpart. Honors `robots.txt` and aborts if it cannot verify access.
- Up to 1 MB of HTML; 200 KB of `robots.txt`; 12-second timeout per request; no JavaScript rendering. An on-page link cannot prove ownership of a social profile. Links are **not validated** by visiting the platforms.
- A recognized account URL is a link signal, **not proof of corporate control**. Individual-looking LinkedIn paths (`/in/`) are excluded. Additional identity checks are a downstream responsibility.
- Zero results is not a scraper error; unavailable/blocked websites fail with short plain-language `ERROR:` messages and no dataset item.

### Apify packaging

Contains `.actor/actor.json` (references root `Dockerfile` and `input_schema.json`), root `requirements.txt` (comment only, no pip deps), and `src/main.py`. Only Python stdlib is used; no Apify SDK.

In Apify, the Actor reads `INPUT` from the default key-value store with the run's `APIFY_TOKEN` and `APIFY_DEFAULT_KEY_VALUE_STORE_ID`, and writes to the default Dataset via the Apify REST API using `APIFY_DEFAULT_DATASET_ID`. No external login is performed. For local runs, set `ACTOR_INPUT_JSON` or write `storage/key_value_stores/default/INPUT.json`; output appears under `storage/datasets/default/`. Override local storage location via `APIFY_LOCAL_STORAGE_DIR`.

### Local run (real network)

```bash
cd official-social-links-finder
ACTOR_INPUT_JSON='{"domain":"apify.com"}' python src/main.py
```

Requires outbound HTTPS and DNS. Environment restrictions, network errors, 403 or robots disallow may prevent output.

### Reproducible offline script-mode tests

```bash
cd official-social-links-finder
python -m unittest discover -s tests -v
```

The included `tests/fixture_http.py` provides **fake HTTP/DNS only to child processes with** `ACTOR_TEST_FIXTURES=1` and `PYTHONPATH=tests`. Tests actually execute `python src/main.py` with a valid synthetic domain and inspect JSON output. No fixture code ships in the Docker image. See `tests/SMOKE_OUTPUT.txt` for direct script-mode terminal output and items.

### Store and pricing proposal (not configured)

**Declared suggested categories (2):** Lead generation; Social media.

**Suggested model:** pay per dataset result, **$3 per 1,000 output items** ($0.003/profile link), with no charge for zero results; check current Apify monetization granularity before implementing. This is a proposal, **not configured on Apify**. No Actor has been published.

# Actor input Schema

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

One public business domain (no scheme or path).

## Actor input object example

```json
{
  "domain": "apify.com"
}
```

# Actor output Schema

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

Dataset containing the Actor's result 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 = {
    "domain": "apify.com"
};

// Run the Actor and wait for it to finish
const run = await client.actor("eichan/official-social-links-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 = { "domain": "apify.com" }

# Run the Actor and wait for it to finish
run = client.actor("eichan/official-social-links-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 '{
  "domain": "apify.com"
}' |
apify call eichan/official-social-links-finder --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,eichan/official-social-links-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/KWFuCKbR5CaBMtgds/builds/My7yUh7bbTWJthTgl/openapi.json
