{
  "openapi": "3.0.1",
  "info": {
    "title": "Dataset Deduper | Exact & Fuzzy Dedupe for Any Dataset",
    "description": "Collapse duplicates in any dataset, in two passes you control. Exact matching ignores case, punctuation, and word order; an optional fuzzy pass catches the near-duplicates normalization cannot. Every decision is explained in an audit trail, and a cross-run ledger remembers what you already got.",
    "version": "0.1",
    "x-build-id": "kQk48mU4WoyIQu5JB"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/broomwagon~dataset-deduper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-broomwagon-dataset-deduper",
        "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/broomwagon~dataset-deduper/runs": {
      "post": {
        "operationId": "runs-sync-broomwagon-dataset-deduper",
        "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/broomwagon~dataset-deduper/run-sync": {
      "post": {
        "operationId": "run-sync-broomwagon-dataset-deduper",
        "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": {
          "datasetId": {
            "title": "Dataset to dedupe",
            "type": "string",
            "description": "Any actor's output dataset. Pipe it straight in; a picked dataset always wins over the sample records below."
          },
          "items": {
            "title": "Inline records",
            "type": "array",
            "description": "Records provided inline as a JSON array, for trying the actor out before wiring a scraper up. Ignored when a dataset is picked above."
          },
          "fileUrl": {
            "title": "File URL",
            "type": "string",
            "description": "URL of a JSON or NDJSON file of records."
          },
          "exactFields": {
            "title": "Exact match fields",
            "type": "array",
            "description": "Fields that must match for two records to be the same. Compared after normalizing: case, punctuation, extra spaces, and word order are ignored, so \"The Blue Cafe\" equals \"blue cafe, the\". Leave empty to compare the whole record."
          },
          "fuzzyFields": {
            "title": "Fuzzy match fields",
            "type": "array",
            "description": "Fields compared by similarity for records the exact pass did not catch, e.g. [\"name\", \"address\"]. Leave empty to turn fuzzy matching off entirely."
          },
          "fuzzyThreshold": {
            "title": "Similarity threshold",
            "minimum": 50,
            "maximum": 100,
            "type": "integer",
            "description": "How close is close enough, 0 to 100, averaged across the fuzzy fields. 90 is a good starting point: high enough to reject different businesses, loose enough to join abbreviations and suffixes. Raise it if you see wrong merges in the AUDIT record.",
            "default": 90
          },
          "vetoFields": {
            "title": "Veto fields",
            "type": "array",
            "description": "Fields where two different non-empty values forbid a fuzzy merge, e.g. [\"phone\"] or [\"sku\"]. A record missing the field is never vetoed by it. This is how you stop a kiosk inside a venue from merging into the venue."
          },
          "blockField": {
            "title": "Comparison group field",
            "type": "string",
            "description": "Only compare records that share this field's value, e.g. \"city\" or \"category\". Leave empty and the actor groups by the distinctive words in your fuzzy fields instead, which is usually fine but caps very large groups."
          },
          "ledgerCapacity": {
            "title": "Ledger capacity",
            "minimum": 1000,
            "type": "integer",
            "description": "How many distinct records the cross-run ledger is sized for. Going far past this raises the rate at which a new record is mistaken for one already delivered. The run report always tells you where you stand.",
            "default": 100000
          },
          "memory": {
            "title": "Previous memory",
            "type": "object",
            "description": "An object beginning with \"memoryVersion\", copied from the MEMORY record in your last run's key-value store (not your records, those go in the fields above). Without it, each run dedupes only within itself."
          },
          "memoryStoreId": {
            "title": "Memory key-value store",
            "type": "string",
            "description": "Optional: a key-value store in YOUR account. The actor reads the ledger from it before running and writes the update back after, so scheduled runs chain automatically with nothing to copy by hand."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}