{
  "openapi": "3.0.1",
  "info": {
    "title": "🧬 Entity Resolution - Merge Duplicate Records, No Shared ID",
    "description": "⚡ Find which messy records are the same real-world entity when there is no shared ID. ✅ Fuzzy name/company matching, blocking so 50k records don't need 1.25bn comparisons, probabilistic scoring, transitive clustering.",
    "version": "1.0",
    "x-build-id": "Wb9NtpTAARtIUB16F"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/that_red_bird~entity-resolver/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-that_red_bird-entity-resolver",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/that_red_bird~entity-resolver/runs": {
      "post": {
        "operationId": "runs-sync-that_red_bird-entity-resolver",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/that_red_bird~entity-resolver/run-sync": {
      "post": {
        "operationId": "run-sync-that_red_bird-entity-resolver",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "properties": {
          "records": {
            "title": "Records",
            "type": "array",
            "description": "The records to resolve, as an array of flat objects. Combine freely with sourceDatasetIds.",
            "default": [
              {
                "name": "Jennifer Adams",
                "company": "Acme Corporation",
                "email": "jen@acme.com",
                "phone": "415-555-0100"
              },
              {
                "name": "Jen Adams",
                "company": "Acme Corp.",
                "email": "jen@acme.com",
                "phone": ""
              },
              {
                "name": "J. Adams",
                "company": "ACME, Inc.",
                "email": "",
                "phone": "(415) 555 0100"
              },
              {
                "name": "Michael Chen",
                "company": "Globex Ltd",
                "email": "mchen@globex.io",
                "phone": "212-555-0199"
              },
              {
                "name": "Mike Chen",
                "company": "Globex Limited",
                "email": "mchen@globex.io",
                "phone": ""
              }
            ]
          },
          "sourceDatasetIds": {
            "title": "Source dataset IDs",
            "type": "array",
            "description": "Apify dataset IDs to pull records from. Rows are tagged with their dataset so sourcePriority survivorship can prefer one system over another.",
            "items": {
              "type": "string"
            }
          },
          "fields": {
            "title": "Fields to compare",
            "type": "array",
            "description": "Leave empty to infer from the data. For control pass objects: {\"field\":\"email\",\"type\":\"email\",\"weight\":5}. Types: email, phone, person, company, address, numeric, text, exact. Higher weight = stronger evidence."
          },
          "matchThreshold": {
            "title": "Match threshold (0-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pairs scoring at or above this are merged. Higher = fewer false merges, more missed duplicates. Expressed 0-100; 85 means 0.85.",
            "default": 85
          },
          "reviewThreshold": {
            "title": "Review threshold (0-100)",
            "minimum": 1,
            "maximum": 100,
            "type": "integer",
            "description": "Pairs between this and the match threshold are reported for human review instead of being merged. Silently fusing two real entities is worse than missing a duplicate.",
            "default": 70
          },
          "maxBlockSize": {
            "title": "Max block size",
            "minimum": 10,
            "maximum": 20000,
            "type": "integer",
            "description": "Blocks larger than this are skipped to avoid an O(n²) blowup when many records share a generic key such as a common email domain.",
            "default": 500
          },
          "survivorshipStrategy": {
            "title": "Which value wins",
            "enum": [
              "mostComplete",
              "longest",
              "mostCommon",
              "newest",
              "first",
              "sourcePriority"
            ],
            "type": "string",
            "description": "Default rule for building the golden record from a cluster.",
            "default": "mostComplete"
          },
          "fieldStrategies": {
            "title": "Per-field survivorship overrides",
            "type": "object",
            "description": "Override the rule for specific fields, e.g. {\"email\":\"newest\",\"company\":\"longest\"}."
          },
          "dateField": {
            "title": "Date field",
            "type": "string",
            "description": "Field holding a record's last-updated date. Required by the \"newest\" strategy."
          },
          "sourceField": {
            "title": "Source field",
            "type": "string",
            "description": "Field naming the record's origin system. Defaults to the automatic _source tag."
          },
          "sourcePriority": {
            "title": "Source priority order",
            "type": "array",
            "description": "Most trusted source first, e.g. [\"crm\",\"webform\"]. Used by the sourcePriority strategy.",
            "items": {
              "type": "string"
            }
          },
          "outputMode": {
            "title": "Output mode",
            "enum": [
              "entities",
              "golden",
              "duplicates"
            ],
            "type": "string",
            "description": "entities = full clusters with members and provenance · golden = one clean row per entity · duplicates = only clusters that actually merged.",
            "default": "entities"
          },
          "includeReviewPairs": {
            "title": "Include review pairs",
            "type": "boolean",
            "description": "Emit ambiguous pairs with their evidence so a human can decide.",
            "default": true
          },
          "includeScoredPairs": {
            "title": "Include every scored pair",
            "type": "boolean",
            "description": "Emit all compared pairs with per-field similarity. Useful for tuning thresholds; verbose on large inputs.",
            "default": false
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}