{
  "openapi": "3.0.1",
  "info": {
    "title": "Apify Scraper Data Normalizer",
    "description": "Combine output from supported Apify scrapers into consistent records for posts, comments, videos, products, property listings, and places, with source references.",
    "version": "1.0",
    "x-build-id": "qqkrNjIkPNg3I3mGY"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/jfinny~research-data-normalizer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-jfinny-research-data-normalizer",
        "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/jfinny~research-data-normalizer/runs": {
      "post": {
        "operationId": "runs-sync-jfinny-research-data-normalizer",
        "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/jfinny~research-data-normalizer/run-sync": {
      "post": {
        "operationId": "run-sync-jfinny-research-data-normalizer",
        "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": "Source dataset",
            "type": "string",
            "description": "Dataset to read. Clear the inline demo records first. Takes precedence over payload. For integrations use {{resource.defaultDatasetId}} here to grant scoped read access."
          },
          "payload": {
            "title": "Integration event",
            "type": "object",
            "description": "Optional ACTOR.RUN.SUCCEEDED event. Clear the inline demo records first. Payload dataset references alone may not grant read permission; prefer datasetId."
          },
          "sourceType": {
            "title": "Source type",
            "enum": [
              "auto",
              "instagram_posts",
              "tiktok_posts",
              "instagram_comments",
              "tiktok_comments",
              "youtube_comments",
              "youtube_videos",
              "linkedin_posts",
              "ecommerce_products",
              "amazon_products",
              "shopify_products",
              "zillow_properties",
              "imdb_titles",
              "instagram_reels",
              "instagram_feed_posts",
              "instagram_hashtag_posts",
              "facebook_posts",
              "x_posts",
              "reddit_posts_comments",
              "google_maps_places",
              "tiktok_profile_videos",
              "linkedin_post_search",
              "facebook_comments"
            ],
            "type": "string",
            "description": "V1 auto detects supported social signatures. V2 auto selects a known caller-declared sourceActor, or applies an explicit customMapping in 2.2. No Actor identity is inferred from record fields.",
            "default": "auto"
          },
          "sourceActor": {
            "title": "Source Actor slug",
            "type": "string",
            "description": "Optional caller-declared provenance, e.g. apify/instagram-scraper. Never inferred from record fields."
          },
          "maxRecords": {
            "title": "Maximum input rows inspected",
            "minimum": 1,
            "maximum": 10000,
            "type": "integer",
            "description": "Includes invalid and duplicate input rows.",
            "default": 1000
          },
          "includeRaw": {
            "title": "Include original records",
            "type": "boolean",
            "description": "Append raw source records to output; disabled by default.",
            "default": false
          },
          "items": {
            "title": "Inline records or synthetic demo",
            "maxItems": 100,
            "type": "array",
            "description": "Two synthetic demo rows are prefilled for a quick test. Replace them with up to 100 scraped JSON rows, or clear this field when using datasetId, payload, csvText, or sources. The demo saves two billable records. An empty array is a successful empty run."
          },
          "outputVersion": {
            "title": "Output format",
            "enum": [
              "1.0.0",
              "2.0.0",
              "2.1.0",
              "2.2.0"
            ],
            "type": "string",
            "description": "V1 preserves the existing social contract. V2.0 keeps the original typed records; V2.1 adds comment previews and product identifier evidence. V2.2 adds places and explicit caller-defined mappings. Built-in source mappings remain unchanged.",
            "default": "1.0.0"
          },
          "sources": {
            "title": "Sources to normalize together",
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "description": "V2 only. Supply datasets, inline JSON groups or explicitly mapped CSV text, each with its source declaration. Use instead of top-level datasetId, payload, items, csvText and source declarations. maxRecords applies across all sources in listed order.",
            "items": {
              "type": "object",
              "properties": {
                "datasetId": {
                  "title": "Source dataset",
                  "type": "string",
                  "description": "Dataset ID for this source. Also select the same ID in datasetIds to grant READ access. Choose exactly one datasetId, items or csvText.",
                  "editor": "textfield"
                },
                "sourceType": {
                  "title": "Source type",
                  "type": "string",
                  "description": "Supported output mode for this source. Choose a mode or declare its known sourceActor.",
                  "enum": [
                    "auto",
                    "instagram_posts",
                    "tiktok_posts",
                    "instagram_comments",
                    "tiktok_comments",
                    "youtube_comments",
                    "youtube_videos",
                    "linkedin_posts",
                    "ecommerce_products",
                    "amazon_products",
                    "shopify_products",
                    "zillow_properties",
                    "imdb_titles",
                    "instagram_reels",
                    "instagram_feed_posts",
                    "instagram_hashtag_posts",
                    "facebook_posts",
                    "x_posts",
                    "reddit_posts_comments",
                    "google_maps_places",
                    "tiktok_profile_videos",
                    "linkedin_post_search",
                    "facebook_comments"
                  ],
                  "enumTitles": [
                    "Auto",
                    "Instagram posts / reels",
                    "TikTok videos / posts",
                    "Instagram comments",
                    "TikTok comments / replies",
                    "YouTube comments / replies",
                    "YouTube videos / shorts / streams",
                    "LinkedIn profile posts",
                    "E-commerce product offers",
                    "Amazon product detail",
                    "Shopify products",
                    "Zillow property detail",
                    "IMDb titles (experimental)",
                    "Instagram Reel Scraper: reels",
                    "Instagram Post Scraper: posts",
                    "Instagram Hashtag Scraper: posts / reels",
                    "Facebook Posts Scraper: posts",
                    "Tweet Scraper V2: X tweets / replies",
                    "Reddit Scraper: posts / comments",
                    "Google Maps places (V2.2 only)",
                    "TikTok Profile Scraper: video-section posts",
                    "LinkedIn Post Search: posts",
                    "Facebook Comments Scraper: comments / replies"
                  ],
                  "default": "auto",
                  "editor": "select"
                },
                "sourceActor": {
                  "title": "Source Actor slug",
                  "type": "string",
                  "description": "Caller-declared source Actor slug, e.g. apify/instagram-scraper. Never inferred from record fields.",
                  "editor": "textfield"
                },
                "items": {
                  "title": "Source records",
                  "type": "array",
                  "description": "Up to 100 already scraped JSON rows for this source. Choose exactly one items, datasetId or csvText.",
                  "editor": "json",
                  "maxItems": 100
                },
                "customMapping": {
                  "title": "Explicit mapping for another scraper",
                  "type": "object",
                  "editor": "json",
                  "description": "Mapping for this source only. Requires outputVersion 2.2.0, sourceType auto and a declared sourceActor."
                },
                "csvText": {
                  "title": "CSV text",
                  "type": "string",
                  "editor": "textarea",
                  "maxLength": 8388608,
                  "description": "V2.2 only. Paste CSV with an explicit customMapping and sourceActor. Clear items first. Cells remain strings until your mapping explicitly converts them; use the CSV guide. Up to 8 MiB of UTF-8 text across sources."
                },
                "csvOptions": {
                  "title": "CSV options",
                  "type": "object",
                  "editor": "json",
                  "description": "For csvText only. Optional delimiter: comma (default), semicolon, tab or pipe. hasHeader defaults to true; false uses column keys 0, 1, and so on. No automatic type or delimiter detection."
                }
              }
            }
          },
          "datasetIds": {
            "title": "Datasets to read together",
            "minItems": 1,
            "maxItems": 100,
            "uniqueItems": true,
            "type": "array",
            "description": "V2 sources only. Select exactly the datasetId values used in sources. This field grants READ access to those datasets; source declarations identify their adapters."
          },
          "customMapping": {
            "title": "Explicit mapping for another scraper",
            "type": "object",
            "description": "V2.2 only. Declare source fields, record type, custom namespace and conversions using the customMapping guide. Requires sourceType auto and a caller-declared sourceActor. No inferred schema or arbitrary code."
          },
          "csvText": {
            "title": "CSV text",
            "maxLength": 8388608,
            "type": "string",
            "description": "V2.2 only. Paste CSV with an explicit customMapping and sourceActor. Clear items first. Cells remain strings until your mapping explicitly converts them; use the CSV guide. Up to 8 MiB of UTF-8 text across sources."
          },
          "csvOptions": {
            "title": "CSV options",
            "type": "object",
            "description": "For csvText only. Optional delimiter: comma (default), semicolon, tab or pipe. hasHeader defaults to true; false uses column keys 0, 1, and so on. No automatic type or delimiter detection."
          }
        }
      },
      "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "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
                  },
                  "PROXY_UNBLOCKER_UNITS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}