{
  "openapi": "3.0.1",
  "info": {
    "title": "Google Ads Search Term Audit: Wasted Spend Report",
    "description": "Review your own search-term export against explicit irrelevant categories and thresholds. Protect conversions and allowed terms, inspect evidence, and compare named snapshots. No account connection or automatic changes.",
    "version": "0.1",
    "x-build-id": "XL49a9QWYRpsKG1s4"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/zaiq~search-term-waste-audit/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-zaiq-search-term-waste-audit",
        "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/zaiq~search-term-waste-audit/runs": {
      "post": {
        "operationId": "runs-sync-zaiq-search-term-waste-audit",
        "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/zaiq~search-term-waste-audit/run-sync": {
      "post": {
        "operationId": "run-sync-zaiq-search-term-waste-audit",
        "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": {
          "mode": {
            "title": "Input mode",
            "enum": [
              "demo",
              "text",
              "dataset"
            ],
            "type": "string",
            "description": "Demo uses fictional rows and has no audit event charge. Choose text or dataset to review your data.",
            "default": "demo"
          },
          "data": {
            "title": "CSV, TSV or JSON",
            "type": "string",
            "description": "Paste CSV, TSV or a JSON array, up to 8 MB / 20,000 rows. Supported default labels: campaign; search_term or Search term; spend or Cost; impressions or Impr.; clicks; conversions; optional id, ad_group, match_type. Use column mapping for other labels. Empty or absent conversions are unknown. Use plain non-negative numbers with a dot decimal, no commas or currency symbols. Numbers must match (0|[1-9][0-9]*)(\\.[0-9]+)? (no leading zeroes); clicks and impressions must be whole-valued."
          },
          "datasetId": {
            "title": "Private dataset ID or name",
            "type": "string",
            "description": "Existing customer-owned dataset ID or name accessible to the run, using letters, digits, hyphens or underscores. No URLs or paths. Up to 20,000 rows and 8 MB. Legacy input: it does not itself grant limited-permission access; use the corresponding resource picker for private storage."
          },
          "scope": {
            "title": "Input scope label",
            "type": "string",
            "description": "A stable non-sensitive label identifying the same account, campaign selection and report scope across snapshots. Do not use a customer name."
          },
          "offerContext": {
            "title": "Offer context",
            "type": "string",
            "description": "Describe the offer for your reviewer. The Actor does not infer intent from this text or output it."
          },
          "irrelevantCategories": {
            "title": "Explicit irrelevant categories",
            "type": "array",
            "description": "Array of objects: {\"label\":\"category label\", \"terms\":[\"explicit phrase\"]}. Literal whole-word phrase matching, not semantic analysis. Use generic non-sensitive labels.",
            "items": {
              "type": "object"
            }
          },
          "protectedTerms": {
            "title": "Protected positive or brand terms",
            "type": "array",
            "description": "Literal phrases protect related broader and narrower terms for review. Remove identifying information.",
            "items": {
              "type": "string"
            }
          },
          "exactNegatives": {
            "title": "Existing exact negatives",
            "type": "array",
            "description": "Existing exact negative phrases, without brackets. Exact text matches are marked as already listed, not proposed again.",
            "items": {
              "type": "string"
            }
          },
          "minSpend": {
            "title": "Minimum observed spend",
            "minimum": 0,
            "type": "number",
            "description": "Minimum total spend for a canonical term across all rows in one campaign. You choose this review threshold.",
            "default": 0
          },
          "minClicks": {
            "title": "Minimum observed clicks",
            "minimum": 0,
            "type": "integer",
            "description": "Minimum total clicks for a canonical term across all rows in one campaign. You choose this review threshold.",
            "default": 0
          },
          "currency": {
            "title": "Currency code",
            "type": "string",
            "description": "One ISO-style three-letter currency code for all rows, for example USD."
          },
          "periodStart": {
            "title": "Report start",
            "type": "string",
            "description": "Inclusive start date YYYY-MM-DD for the supplied export."
          },
          "periodEnd": {
            "title": "Report end",
            "type": "string",
            "description": "Inclusive end date YYYY-MM-DD. Your attribution window and reporting delay may extend beyond this period."
          },
          "attributionNote": {
            "title": "Attribution and conversion delay",
            "type": "string",
            "description": "Describe your attribution window or known conversion delays. This is private context and is not echoed."
          },
          "snapshotStore": {
            "title": "Private snapshot store",
            "type": "string",
            "description": "Optional private named key-value store for aggregate snapshots. Names must contain only letters, numbers, hyphen and underscore. Snapshot contents never include raw terms. Legacy input: it does not itself grant limited-permission access; use the corresponding resource picker for private storage."
          },
          "snapshotName": {
            "title": "Save snapshot name",
            "type": "string",
            "description": "Unique name per campaign; reserved before delivery and not reused by another run. Simultaneous writers are last-writer-wins; use unique names."
          },
          "compareTo": {
            "title": "Compare snapshot name",
            "type": "string",
            "description": "Optional previous snapshot name in the same store. Comparisons require the same scope, currency, campaign and review rules; periods are displayed."
          },
          "datasetByName": {
            "title": "Dataset identifier is a name",
            "type": "boolean",
            "description": "Turn on if the dataset field contains a name rather than an ID. The dataset must be accessible to this run.",
            "default": false
          },
          "columnMapping": {
            "title": "Column mapping (optional)",
            "type": "object",
            "description": "Map supported field keys to your exact source headers, e.g. {\"search_term\":\"Query\", \"spend\":\"Amount\", \"impressions\":\"Views\"}. Keys: campaign, search_term, spend, impressions, clicks, conversions, ad_group, match_type, id. Map cost only in currency units, never micros. Duplicate mappings and ambiguous aliases are rejected; blanks or absent conversions are unknown. The resolved mapping is part of snapshot compatibility."
          },
          "dataset": {
            "title": "Select search-term dataset",
            "type": "string",
            "description": "Select an existing buyer dataset; choose dataset mode and leave the legacy dataset ID/name field empty."
          },
          "snapshotStoreResource": {
            "title": "Select private snapshot store",
            "type": "string",
            "description": "Select an existing private store for aggregate snapshot reads and writes. Leave the legacy store name empty."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}