{
  "openapi": "3.0.1",
  "info": {
    "title": "Shopify Alt Text Generator: Bulk Image SEO Auto-Fix EN/FR/AR",
    "description": "Audit and fix Shopify image SEO for e-commerce stores: find missing, duplicate or filename alt text, generate alt text in English, French or Arabic, and add it in bulk (dry run, rollback). Outputs image issues with fixes, a CSV and a store report. Works as an AI agent / MCP tool.",
    "version": "1.0",
    "x-build-id": "1A778vPvluB2KlRBO"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/j0l30~shopify-seo-alt-text-fixer/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-j0l30-shopify-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~shopify-seo-alt-text-fixer/runs": {
      "post": {
        "operationId": "runs-sync-j0l30-shopify-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~shopify-seo-alt-text-fixer/run-sync": {
      "post": {
        "operationId": "run-sync-j0l30-shopify-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": [
          "storeUrl"
        ],
        "properties": {
          "storeUrl": {
            "title": "Shopify store URL",
            "type": "string",
            "description": "Public URL of the Shopify store to audit (home page or any page of it). The audit needs no login. Example: https://www.allbirds.com"
          },
          "maxProducts": {
            "title": "Max products",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Maximum number of products to read from the store (1 to 5,000). Example: 250",
            "default": 250
          },
          "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, Product schema and page-speed image issues (0 to 500). 0 skips the page audit. Example: 20",
            "default": 20
          },
          "maxImageChecks": {
            "title": "Image size checks (HEAD requests)",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "How many page images to check for file size (over 200 KB) and format (WebP/AVIF), with one polite HEAD request each, at least 1 second apart (0 to 100). 0 skips size checks. Example: 20",
            "default": 20
          },
          "altLanguage": {
            "title": "Alt text language",
            "enum": [
              "auto",
              "en",
              "fr",
              "ar"
            ],
            "type": "string",
            "description": "Language of the suggested alt text: auto (reads the store's <html lang> and Content-Language), en, fr or ar. Alts are written by rules from your product data, no AI. Example: fr",
            "default": "auto"
          },
          "onlyImagesWithIssues": {
            "title": "Only images that need fixing",
            "type": "boolean",
            "description": "true = return (and charge for) only images with alt text problems. false = return every image. Example: true",
            "default": true
          },
          "autoFix": {
            "title": "Premium: fix alt text automatically in Shopify",
            "type": "boolean",
            "description": "Premium ($0.01 per image actually changed). true = write the suggested alt text into product media through the Shopify Admin API. Needs shopDomain, adminAccessToken and authorizationConfirmed. Every change is re-checked, 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 the store. false = apply the changes. Run with true first. Example: true",
            "default": true
          },
          "authorizationConfirmed": {
            "title": "I own this store or am authorized to change it",
            "type": "boolean",
            "description": "Set to true only if you own this store or are authorized to change it. Required for autoFix and rollback. AI agents: ask the store owner before setting it. Example: true",
            "default": false
          },
          "shopDomain": {
            "title": "Store's myshopify.com domain",
            "type": "string",
            "description": "The store's myshopify.com domain (Shopify admin → Settings → Domains). Needed for autoFix and rollback. Your token is only ever sent here, over HTTPS. Example: your-store.myshopify.com"
          },
          "adminAccessToken": {
            "title": "Admin API access token (custom app)",
            "type": "string",
            "description": "Secret, for autoFix and rollback. Shopify admin → Settings → Apps and sales channels → Develop apps → Create an app → Admin API scopes read_products, write_products (add write_files for fileUpdate) → Install → copy the Admin API access token. Uninstall the app to revoke it. Example format: shpat_xxxxxxxx"
          },
          "maxFixes": {
            "title": "Max images to fix",
            "minimum": 1,
            "maximum": 5000,
            "type": "integer",
            "description": "Upper limit of images changed in one autoFix run (1 to 5,000). 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 (key-value store). Restores each image's original alt text; images edited after the fix are left alone. Needs shopDomain, adminAccessToken and authorizationConfirmed. Example: [{\"id\": \"gid://shopify/MediaImage/123\", \"alt_before\": \"\", \"alt_written\": \"Blue shirt, front view\"}]"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}