# LinkedIn Profile Batch Reconciler — Missing & Duplicate Results (`mrtronson/linkedin-profile-batch-reconciler`) Actor

Reconcile requested LinkedIn profile URLs against scraper results. Find missing profiles, duplicate results and unexpected records; export a clean retry queue. Reads existing Apify datasets or pasted JSON. One report for up to 50,000 requests.

- **URL**: https://apify.com/mrtronson/linkedin-profile-batch-reconciler.md
- **Developed by:** [Typed Diff](https://apify.com/mrtronson) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$30.00 / 1,000 completed reconciliations

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

### Find which LinkedIn profiles your scraper actually returned

**Compare the URLs you requested with the profile records you received. Get a reconciliation report and a unique list of requested URLs without a matching result.** Detect duplicate requests, repeated scraper results, unexpected profiles and records whose identity cannot be determined.

This Actor processes data you already have. It makes no LinkedIn requests, starts no other Actors and requires no external API key. Use it after a profile scraper and before a CRM import or another paid enrichment step.

### The problem it solves

A successful run can return the expected number of rows while still delivering the wrong set of profiles. For example, three copies of one profile can hide two missing profiles. Comparing only row counts or removing duplicate output does not tell you which original requests remain unresolved.

This report reconciles both sides using normalized public profile URLs. It keeps your original request indices and the matching output indices so you can inspect the exact records in your pipeline. It also handles tracking parameters and common LinkedIn hostname variants that make raw string comparisons fail.

### Quick start

1. Paste the original URLs into **Requested LinkedIn profile URLs**.
2. Paste the returned records into **Returned profile records**.
3. Set **Profile URL field** to the actual field in your scraper's output, such as `linkedinUrl`, `url`, or `data.url`.
4. Run and inspect the dataset and the `RETRY_URLS` record.

Alternatively, select completed Apify datasets in the two optional dataset pickers. Each selected dataset overrides its corresponding inline array. Set the requested and returned URL field names to match those datasets. Only READ access to the selected datasets is requested. Pagination reads every row up to the 50,000-row limit; incomplete or changing datasets fail clearly instead of producing a false missing-profile report. Each dataset may contain up to 7 MB of extracted URL values.

You can provide an array of returned URLs instead of full records. An empty result array is allowed and marks every valid unique request as missing. The prefilled example uses synthetic `demo-a` and `demo-b` identifiers; it demonstrates reconciliation and does not represent scraped people.

### Output decisions

| Status | Meaning |
|---|---|
| `received` | Exactly one result has the same normalized URL |
| `missing` | No result has the same normalized URL |
| `duplicate_results` | Multiple returned records share that URL |
| `duplicate_request` | The requested URL repeats an earlier request |
| `invalid_request` | The input is not a supported public profile URL |
| `unrequested_result` | A returned URL was not in the requested set |
| `unidentifiable_result` | The configured result URL field is missing or unsupported |

Every requested row remains represented by `inputIndex`. Extra or unidentifiable results are represented by `resultIndex`. The first request for a normalized URL includes `resultIndices`; repeated requests reference `firstRequestIndex` instead of repeating a large index list.

`RETRY_URLS` is a unique array of missing URLs for review before another run. `OUTPUT` includes the full report, summary counts and the unique requested URLs. Export the dataset to JSON, CSV or Excel, or connect the Actor through Apify's API, Make or n8n.

### Identity rules

Accepted identities are public `/in/{slug}` URLs. HTTP and HTTPS, bare LinkedIn, `www`, `m` and two-letter country subdomains are normalized to HTTPS on `www.linkedin.com`. Query strings, fragments and a trailing slash do not distinguish profiles. UTF-8 percent encoding is normalized.

Profile slug case is preserved. Company pages, search URLs, shortened links, Sales Navigator links, credentials in URLs and extra path segments are held for review. Names and email addresses are never used to infer that two people are the same.

A profile rename or alias can make a genuinely returned person appear under a different URL. This Actor does not resolve those aliases. A `received` result confirms URL correspondence only; it does not prove that the profile exists, is fresh or contains accurate fields. When many results are unidentifiable, check `resultUrlField` before retrying anything. No retry is started automatically.

### Pricing and limits

$0.03 per completed reconciliation, including up to 50,000 requested URLs and 50,000 returned records within a 15 MB input limit. Platform usage is included under the published pay-per-event model. Invalid top-level input does not generate the billing event. A completed report with missing or invalid rows is still a delivered reconciliation.

For comparison, at a downstream price of $10 per 1,000 profiles, avoiding more than three unnecessary requests would exceed this Actor's fee, before other workflow costs. Your actual saving depends on your scraper's billing and existing deduplication. This Actor cannot refund an earlier scrape and does not promise a saving.

Only supplied data is processed. No private profile information is logged or sent to another service. Report reproducible issues in the Issues tab with the field mapping and a non-sensitive example.

# Actor input Schema

## `requestedDatasetId` (type: `string`):

Select a completed dataset with up to 50,000 rows. Overrides the corresponding inline array. Only selected dataset read access is required.

## `resultsDatasetId` (type: `string`):

Select a completed dataset with up to 50,000 rows. Overrides the corresponding inline array. Only selected dataset read access is required.

## `requestedUrlField` (type: `string`):

Used only with Requested profiles dataset. Supports nested paths such as data.url.

## `requestedUrls` (type: `array`):

The original profile URLs sent to your scraper. Up to 50,000. Examples are synthetic.

## `scrapedResults` (type: `array`):

Paste returned records or an array of returned profile URLs. Empty array means no profiles were returned.

## `resultUrlField` (type: `string`):

Exact field containing the returned public profile URL. Nested paths such as data.url are supported.

## Actor input object example

```json
{
  "requestedUrlField": "url",
  "requestedUrls": [
    "https://www.linkedin.com/in/demo-a/",
    "https://uk.linkedin.com/in/demo-a?trk=example",
    "https://www.linkedin.com/in/demo-b/"
  ],
  "scrapedResults": [
    {
      "linkedinUrl": "https://www.linkedin.com/in/demo-a/"
    },
    {
      "linkedinUrl": "https://www.linkedin.com/in/demo-a/"
    }
  ],
  "resultUrlField": "linkedinUrl"
}
```

# Actor output Schema

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

No description

## `queue` (type: `string`):

No description

## `report` (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 = {
    "requestedUrls": [
        "https://www.linkedin.com/in/demo-a/",
        "https://uk.linkedin.com/in/demo-a?trk=example",
        "https://www.linkedin.com/in/demo-b/"
    ],
    "scrapedResults": [
        {
            "linkedinUrl": "https://www.linkedin.com/in/demo-a/"
        },
        {
            "linkedinUrl": "https://www.linkedin.com/in/demo-a/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("mrtronson/linkedin-profile-batch-reconciler").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 = {
    "requestedUrls": [
        "https://www.linkedin.com/in/demo-a/",
        "https://uk.linkedin.com/in/demo-a?trk=example",
        "https://www.linkedin.com/in/demo-b/",
    ],
    "scrapedResults": [
        { "linkedinUrl": "https://www.linkedin.com/in/demo-a/" },
        { "linkedinUrl": "https://www.linkedin.com/in/demo-a/" },
    ],
}

# Run the Actor and wait for it to finish
run = client.actor("mrtronson/linkedin-profile-batch-reconciler").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 '{
  "requestedUrls": [
    "https://www.linkedin.com/in/demo-a/",
    "https://uk.linkedin.com/in/demo-a?trk=example",
    "https://www.linkedin.com/in/demo-b/"
  ],
  "scrapedResults": [
    {
      "linkedinUrl": "https://www.linkedin.com/in/demo-a/"
    },
    {
      "linkedinUrl": "https://www.linkedin.com/in/demo-a/"
    }
  ]
}' |
apify call mrtronson/linkedin-profile-batch-reconciler --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,mrtronson/linkedin-profile-batch-reconciler"
        }
    }
}
```

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/shFEcqqv65ggQhmfL/builds/jvGnckABXQtnfCAu0/openapi.json
