{
  "openapi": "3.0.1",
  "info": {
    "title": "Citation Builder",
    "description": "Build local SEO citations by automatically submitting your business NAP (Name, Address, Phone) to 45+ directories.\n\nWhy Citations Matter\nLocal citations are mentions of your business name, address, and phone number on other websites. They're a critical local SEO ranking factor:",
    "version": "2.1",
    "x-build-id": "d6rqvR1PLes3CGPLs"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/alizarin_refrigerator-owner~citation-builder/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-alizarin_refrigerator-owner-citation-builder",
        "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/alizarin_refrigerator-owner~citation-builder/runs": {
      "post": {
        "operationId": "runs-sync-alizarin_refrigerator-owner-citation-builder",
        "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/alizarin_refrigerator-owner~citation-builder/run-sync": {
      "post": {
        "operationId": "run-sync-alizarin_refrigerator-owner-citation-builder",
        "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": "Mode",
            "enum": [
              "audit",
              "submit",
              "full"
            ],
            "type": "string",
            "description": "audit = check 45+ directories for existing citations and NAP consistency. submit = audit + auto-fill free directories + copy-paste data for login-required ones. full = audit + submit + push to Data Axle/Yext/BrightLocal APIs.",
            "default": "audit"
          },
          "businessName": {
            "title": "Business Name",
            "type": "string",
            "description": "Your official business name (must match exactly across all citations)"
          },
          "streetAddress": {
            "title": "Street Address",
            "type": "string",
            "description": "Your business street address"
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "City name"
          },
          "state": {
            "title": "State",
            "type": "string",
            "description": "2-letter state code"
          },
          "zipCode": {
            "title": "ZIP Code",
            "type": "string",
            "description": "5-digit ZIP code"
          },
          "phone": {
            "title": "Phone Number",
            "type": "string",
            "description": "Primary business phone (will be formatted consistently)"
          },
          "website": {
            "title": "Website URL",
            "type": "string",
            "description": "Your business website (optional but recommended)"
          },
          "email": {
            "title": "Business Email",
            "type": "string",
            "description": "Contact email address (optional)"
          },
          "description": {
            "title": "Business Description",
            "type": "string",
            "description": "Brief description of your business (150-300 characters recommended)"
          },
          "categories": {
            "title": "Business Categories",
            "type": "array",
            "description": "Business categories — used for Yext taxonomy mapping and industry directory detection (e.g., 'Plumber', 'HVAC Contractor', 'Dentist', 'Attorney')",
            "items": {
              "type": "string"
            }
          },
          "industry": {
            "title": "Industry",
            "type": "string",
            "description": "Your industry — unlocks niche directories. Examples: 'home services' adds HomeAdvisor/Porch/Thumbtack/Houzz; 'legal' adds Avvo/FindLaw/Justia; 'healthcare' adds Healthgrades/Zocdoc/Vitals; 'real estate' adds Zillow/Realtor.com; 'restaurant' adds OpenTable/Zomato; 'auto' adds CarGurus/RepairPal."
          },
          "facebookUrl": {
            "title": "Facebook Page URL",
            "type": "string",
            "description": "Your Facebook business page URL"
          },
          "linkedinUrl": {
            "title": "LinkedIn Company URL",
            "type": "string",
            "description": "Your LinkedIn company page URL"
          },
          "twitterUrl": {
            "title": "Twitter/X URL",
            "type": "string",
            "description": "Your Twitter/X profile URL"
          },
          "instagramUrl": {
            "title": "Instagram URL",
            "type": "string",
            "description": "Your Instagram profile URL"
          },
          "verifyAfterSubmit": {
            "title": "Verify After Submit",
            "type": "boolean",
            "description": "After submitting to directories, re-audit them to confirm the listing went live. Most directories take 24-72h to index, so immediate verification may show 'not yet live'.",
            "default": false
          },
          "dryRun": {
            "title": "Dry Run (Legacy)",
            "type": "boolean",
            "description": "Legacy compatibility — setting this to true maps to mode='audit'. Use the 'mode' field instead.",
            "default": false
          },
          "directories": {
            "title": "Target Specific Directories",
            "type": "array",
            "description": "Only audit/submit these directories (leave empty for all 45+)",
            "items": {
              "type": "string"
            }
          },
          "skipDirectories": {
            "title": "Skip Directories",
            "type": "array",
            "description": "Skip these directories (e.g., 'BBB' if you're not a member)",
            "items": {
              "type": "string"
            }
          },
          "maxConcurrent": {
            "title": "Max Concurrent",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Number of directories to process simultaneously",
            "default": 3
          },
          "dataAxleApiKey": {
            "title": "Data Axle API Key (BYOK)",
            "type": "string",
            "description": "For Data Axle aggregator submission (full mode only). Uses /v3/places/claims endpoint to create/claim listings that feed YP, SuperPages, DexKnows + 100+ downstream directories."
          },
          "yextApiKey": {
            "title": "Yext API Key (BYOK)",
            "type": "string",
            "description": "For Yext Knowledge API entity creation (full mode only). Your categories are auto-mapped to Yext taxonomy IDs. Syncs to 200+ directories via PowerListings."
          },
          "brightLocalApiKey": {
            "title": "BrightLocal API Key (BYOK)",
            "type": "string",
            "description": "For BrightLocal Citation Builder campaign (full mode only). Creates a managed campaign — BrightLocal's team handles submissions within 5-7 business days."
          },
          "anthropicApiKey": {
            "title": "Anthropic API Key",
            "type": "string",
            "description": "Powers AI analysis: health scoring, correction suggestions, prioritized actions, estimated ranking impact. Uses Claude Sonnet for intelligent citation recommendations."
          },
          "firecrawlApiKey": {
            "title": "Firecrawl API Key",
            "type": "string",
            "description": "AI-powered extraction fallback. When CSS selectors fail (common on React SPAs like Healthgrades, Zocdoc, etc.), Firecrawl's AI extracts NAP data directly from page content."
          },
          "captchaSolverProvider": {
            "title": "CAPTCHA Solver Provider",
            "enum": [
              "capsolver",
              "2captcha",
              "anticaptcha"
            ],
            "type": "string",
            "description": "Which CAPTCHA solving service to use. All three support reCAPTCHA v2/v3, hCaptcha, and Turnstile. CapSolver also supports image CAPTCHAs. Requires captchaSolverApiKey."
          },
          "captchaSolverApiKey": {
            "title": "CAPTCHA Solver API Key",
            "type": "string",
            "description": "API key for your chosen CAPTCHA solver (CapSolver, 2Captcha, or Anti-Captcha). Without this, CAPTCHAs are screenshotted for manual completion."
          },
          "enableAiAnalysis": {
            "title": "Enable AI Analysis",
            "type": "boolean",
            "description": "Run Claude AI analysis on results for health scoring, correction suggestions, and impact estimates. Requires anthropicApiKey.",
            "default": true
          },
          "enableCrossValidation": {
            "title": "Enable Cross-Validation",
            "type": "boolean",
            "description": "Use weighted voting across directories to determine your canonical (most likely correct) NAP. Detects name/address/phone variations.",
            "default": true
          },
          "googlePlaceId": {
            "title": "Google Place ID",
            "type": "string",
            "description": "Your GBP Place ID. If provided, GBP is treated as source of truth (always correct) and all other citations are compared against it."
          },
          "businesses": {
            "title": "Batch Mode — Multiple Businesses",
            "type": "array",
            "description": "Array of businesses to audit in sequence. Each object needs: businessName, streetAddress, city, state, zipCode, phone. Optional: website, email, categories, industry."
          },
          "demoMode": {
            "title": "Demo Mode",
            "type": "boolean",
            "description": "Run in demo mode without real credentials. Returns sample v2 audit results for testing.",
            "default": true
          },
          "webhookUrl": {
            "title": "Webhook URL",
            "pattern": "^https?://.*",
            "type": "string",
            "description": "Optional URL to receive results via POST request when actor completes"
          },
          "proxy": {
            "title": "Proxy Configuration",
            "type": "object",
            "description": "Proxy settings for web requests"
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}