{
  "openapi": "3.0.1",
  "info": {
    "title": "WooCommerce Alt Text Generator & WordPress Image SEO Fixer",
    "description": "Audit and fix WooCommerce image SEO: generate alt text for product images and WordPress media in English, French or Arabic, write it safely (dry run, rollback) and flag heavy, non-WebP images. Outputs image issues with fixes, a CSV and a WP-CLI script. Works as an AI agent / MCP tool.",
    "version": "1.0",
    "x-build-id": "OyayTRF6ucbXHH5Mt"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0l30~woocommerce-seo-alt-text-fixer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0l30-woocommerce-seo-alt-text-fixer",
        "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/j0l30~woocommerce-seo-alt-text-fixer/runs": {
      "post": {
        "operationId": "runs-sync-j0l30-woocommerce-seo-alt-text-fixer",
        "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/j0l30~woocommerce-seo-alt-text-fixer/run-sync": {
      "post": {
        "operationId": "run-sync-j0l30-woocommerce-seo-alt-text-fixer",
        "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",
        "required": [
          "siteUrl"
        ],
        "properties": {
          "siteUrl": {
            "title": "WordPress or WooCommerce site URL",
            "type": "string",
            "description": "Public URL of the WooCommerce store or WordPress site to audit. No login or API keys needed for the audit. Example: https://nalgene.com"
          },
          "maxProducts": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of products to scan (up to 5,000). Example: 250",
            "default": 250
          },
          "maxMediaImages": {
            "title": "Media library images",
            "minimum": 0,
            "maximum": 10000,
            "type": "integer",
            "description": "Also audit this many images from the WordPress media library (blog posts, pages). 0 skips it. Example: 200",
            "default": 0
          },
          "maxAuditPages": {
            "title": "Pages to SEO-audit",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Home page plus product pages to audit for title, meta description, H1, canonical and schema. 0 skips the page audit. Example: 20",
            "default": 20
          },
          "onlyImagesWithIssues": {
            "title": "Only images that need fixing",
            "type": "boolean",
            "description": "true = return (and charge for) only images with alt text or page-speed problems. false = return every image. Example: true",
            "default": true
          },
          "altLanguage": {
            "title": "Alt text language",
            "enum": [
              "auto",
              "en",
              "fr",
              "ar"
            ],
            "type": "string",
            "description": "Language of the suggested alt text: auto, en, fr or ar. Auto reads the WordPress site language (with an admin login), the page's html lang, or the script of your product names. Auto-fix writes alt text in this language. Example: ar",
            "default": "auto"
          },
          "checkPageSpeed": {
            "title": "Check image page speed",
            "type": "boolean",
            "description": "true = flag images over 200 KB, not WebP/AVIF, missing width/height (layout shift) and not lazy-loaded. Sizes come from the WordPress media API, with a few polite HEAD requests as backup. Example: true",
            "default": true
          },
          "maxHeadRequests": {
            "title": "Max HEAD requests for image size",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Only used when WordPress doesn't report a file size: upper limit of HEAD requests, each robots.txt-aware and at least 1 second apart. 0 turns them off. Example: 50",
            "default": 50
          },
          "autoFix": {
            "title": "Premium: fix alt text automatically",
            "type": "boolean",
            "description": "Premium. true = write the suggested alt text into your WordPress media library through the REST API. Needs wpUsername, wpAppPassword and confirmAuthorized. Every change is logged and can be rolled back. Example: false",
            "default": false
          },
          "dryRun": {
            "title": "Dry run (preview only)",
            "type": "boolean",
            "description": "For autoFix. true = show exactly what would change without touching your site. false = apply the changes. Run with true first. Example: true",
            "default": true
          },
          "confirmAuthorized": {
            "title": "I own this site or am authorized to change it",
            "type": "boolean",
            "description": "Set to true only if you own this site or are authorized to change it. Required for autoFix and rollback. AI agents: ask the site owner before setting it. Example: true",
            "default": false
          },
          "wpUsername": {
            "title": "WordPress username",
            "type": "string",
            "description": "For autoFix and rollback: the WordPress user that owns the Application Password (Editor or Administrator). Example: shop-admin"
          },
          "wpAppPassword": {
            "title": "WordPress Application Password",
            "type": "string",
            "description": "Secret, for autoFix and rollback. Create one in WordPress: Users → Profile → Application Passwords. Revoke it any time. Never use your main password. Example format: abcd efgh ijkl mnop qrst uvwx"
          },
          "maxFixes": {
            "title": "Max images to fix",
            "minimum": 1,
            "type": "integer",
            "description": "Upper limit of images changed in one autoFix run. Example: 500",
            "default": 500
          },
          "rollback": {
            "title": "Rollback (free): paste rollback.json from a fix run",
            "type": "array",
            "description": "Free undo. Paste the array from rollback.json of an earlier applied fix run. Restores the original alt text of each image. Needs wpUsername, wpAppPassword and confirmAuthorized. Example: [{\"id\": 1234, \"alt_text\": \"\"}]"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}