{
  "openapi": "3.0.1",
  "info": {
    "title": "Retail Location Intelligence Bundle",
    "description": "Monitor store footprints, store locator scraper outputs, openings, closures, competitor locations, and expansion signals in one scored AI-ready retail location dataset.",
    "version": "0.1",
    "x-build-id": "ObQp2ytIluekP0ill"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/runtime~retail-location-intelligence-bundle/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-runtime-retail-location-intelligence-bundle",
        "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/runtime~retail-location-intelligence-bundle/runs": {
      "post": {
        "operationId": "runs-sync-runtime-retail-location-intelligence-bundle",
        "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/runtime~retail-location-intelligence-bundle/run-sync": {
      "post": {
        "operationId": "run-sync-runtime-retail-location-intelligence-bundle",
        "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": {
          "mockMode": {
            "title": "Mock mode",
            "type": "boolean",
            "description": "Return deterministic sample records for smoke tests without external requests.",
            "default": false
          },
          "workflow": {
            "title": "Workflow",
            "enum": [
              "store-footprint-watch",
              "competitor-location-watch",
              "retail-expansion-monitor",
              "store-locator-normalizer"
            ],
            "type": "string",
            "description": "Monitoring workflow to run.",
            "default": "store-footprint-watch"
          },
          "brand": {
            "title": "Brand",
            "type": "string",
            "description": "Primary brand to monitor."
          },
          "brands": {
            "title": "Brands",
            "type": "array",
            "description": "Brands to monitor.",
            "items": {
              "type": "string"
            }
          },
          "competitor": {
            "title": "Competitor",
            "type": "string",
            "description": "Primary competitor to monitor."
          },
          "competitors": {
            "title": "Competitors",
            "type": "array",
            "description": "Competitors to monitor.",
            "items": {
              "type": "string"
            }
          },
          "market": {
            "title": "Market",
            "type": "string",
            "description": "Primary market, city, region, or country to monitor.",
            "default": "Paris"
          },
          "markets": {
            "title": "Markets",
            "type": "array",
            "description": "Markets, cities, regions, or countries to monitor.",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City",
            "type": "string",
            "description": "Default city for manual records."
          },
          "country": {
            "title": "Country",
            "type": "string",
            "description": "Default country for manual records."
          },
          "includeManualLocations": {
            "title": "Include manual locations",
            "type": "boolean",
            "description": "Normalize manualLocations and sourceItems when provided.",
            "default": true
          },
          "manualLocations": {
            "title": "Manual locations",
            "type": "array",
            "description": "Known locations, store locator rows, or retail announcements to normalize.",
            "items": {
              "type": "object",
              "properties": {
                "brand": {
                  "title": "Brand",
                  "type": "string",
                  "description": "Brand name."
                },
                "competitor": {
                  "title": "Competitor",
                  "type": "string",
                  "description": "Competitor name."
                },
                "locationName": {
                  "title": "Location name",
                  "type": "string",
                  "description": "Store or location name."
                },
                "address": {
                  "title": "Address",
                  "type": "string",
                  "description": "Street address."
                },
                "city": {
                  "title": "City",
                  "type": "string",
                  "description": "City."
                },
                "region": {
                  "title": "Region",
                  "type": "string",
                  "description": "Region or state."
                },
                "country": {
                  "title": "Country",
                  "type": "string",
                  "description": "Country."
                },
                "postalCode": {
                  "title": "Postal code",
                  "type": "string",
                  "description": "Postal code."
                },
                "latitude": {
                  "title": "Latitude",
                  "type": "number",
                  "description": "Latitude."
                },
                "longitude": {
                  "title": "Longitude",
                  "type": "number",
                  "description": "Longitude."
                },
                "url": {
                  "title": "URL",
                  "type": "string",
                  "description": "Store or source URL."
                },
                "phone": {
                  "title": "Phone",
                  "type": "string",
                  "description": "Phone number."
                },
                "openingHours": {
                  "title": "Opening hours",
                  "type": "string",
                  "description": "Opening hours."
                },
                "summary": {
                  "title": "Summary",
                  "type": "string",
                  "description": "Source summary or note."
                },
                "publishedAt": {
                  "title": "Published at",
                  "type": "string",
                  "description": "Publication or observation date."
                },
                "signalType": {
                  "title": "Signal type",
                  "type": "string",
                  "description": "Optional signal type override."
                }
              }
            }
          },
          "sourceItems": {
            "title": "Source items",
            "type": "array",
            "description": "Alias for manualLocations, useful for bundle pipelines.",
            "items": {
              "type": "object"
            }
          },
          "includeWebDiscovery": {
            "title": "Include web discovery",
            "type": "boolean",
            "description": "Run direct web search for store locators, openings, closures, and expansion signals.",
            "default": true
          },
          "searchQueries": {
            "title": "Search queries",
            "type": "array",
            "description": "Optional exact search queries. Generated queries are used when this is empty.",
            "items": {
              "type": "string"
            }
          },
          "searchProviders": {
            "title": "Search providers",
            "type": "array",
            "description": "Search providers to use for direct discovery.",
            "items": {
              "type": "string",
              "enum": [
                "duckduckgo",
                "brave"
              ]
            },
            "default": [
              "duckduckgo"
            ]
          },
          "searchMode": {
            "title": "Search mode",
            "enum": [
              "default",
              "news"
            ],
            "type": "string",
            "description": "DuckDuckGo search mode.",
            "default": "default"
          },
          "braveApiKey": {
            "title": "Brave Search API key",
            "type": "string",
            "description": "Optional Brave Search API key. You can also set BRAVE_SEARCH_API_KEY in Apify secrets."
          },
          "maxResults": {
            "title": "Max results",
            "minimum": 1,
            "maximum": 1000,
            "type": "integer",
            "description": "Maximum normalized records to save.",
            "default": 25
          },
          "maxWebResults": {
            "title": "Max web results",
            "minimum": 0,
            "maximum": 500,
            "type": "integer",
            "description": "Maximum web discovery results to normalize.",
            "default": 25
          },
          "maxWebQueries": {
            "title": "Max web queries",
            "minimum": 0,
            "maximum": 100,
            "type": "integer",
            "description": "Maximum generated or provided web queries to run.",
            "default": 10
          },
          "requestTimeoutSecs": {
            "title": "Request timeout seconds",
            "minimum": 5,
            "maximum": 120,
            "type": "integer",
            "description": "Timeout for each external discovery request.",
            "default": 20
          },
          "useApifyProxy": {
            "title": "Use Apify Proxy",
            "type": "boolean",
            "description": "Use Apify Proxy for web discovery requests.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Advanced Apify proxy configuration."
          },
          "failOnNoResults": {
            "title": "Fail on no results",
            "type": "boolean",
            "description": "Fail the run when no records are produced.",
            "default": true
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}