{
  "openapi": "3.0.1",
  "info": {
    "title": "SeccionAmarilla Mexico Business Directory Scraper",
    "description": "Scrape SeccionAmarilla.com.mx, Mexico's leading business directory. Search by category/keyword and state/city, or fetch specific listings by URL. Get name, address, phone, category, opening hours, website, products/services and more - no login required.",
    "version": "1.0",
    "x-build-id": "VaVIgmC0V1yXFhrW2"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/crawlerbros~seccion-amarilla-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-crawlerbros-seccion-amarilla-scraper",
        "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/crawlerbros~seccion-amarilla-scraper/runs": {
      "post": {
        "operationId": "runs-sync-crawlerbros-seccion-amarilla-scraper",
        "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/crawlerbros~seccion-amarilla-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-crawlerbros-seccion-amarilla-scraper",
        "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": [
          "mode"
        ],
        "properties": {
          "mode": {
            "title": "Mode",
            "enum": [
              "search",
              "byCategory",
              "byUrl"
            ],
            "type": "string",
            "description": "What to fetch.",
            "default": "search"
          },
          "searchQuery": {
            "title": "Search query (mode=search)",
            "type": "string",
            "description": "Free-text keyword — a business name, trade/service, or city, e.g. `restaurantes`, `plomero de emergencia`, `guadalajara`.",
            "default": "restaurantes"
          },
          "category": {
            "title": "Category (mode=byCategory)",
            "type": "string",
            "description": "A SeccionAmarilla category slug. Type any category you find while browsing the site, or copy one of the curated examples below into the field.\n\nCurated examples:\n`restaurantes` (Restaurantes), `hoteles` (Hoteles), `farmacias` (Farmacias), `abogados` (Abogados), `dentistas` (Dentistas), `medicos-veterinarios-zootecnistas` (Veterinarios), `ferreterias` (Ferreterías), `gimnasios` (Gimnasios), `panaderias` (Panaderías), `joyerias` (Joyerías), `zapaterias` (Zapaterías), `mueblerias` (Mueblerías), `tintorerias-planchadurias-y-lavanderias` (Tintorerías y lavanderías), `bancos` (Bancos), `notarios` (Notarías), `contadores-auditores-y-asuntos-fiscales` (Contadores), `arquitectos` (Arquitectos), `guarderias-infantiles` (Guarderías infantiles), `universidades` (Universidades), `escuelas` (Escuelas), `clinicas-de-rehabilitacion-fisica` (Clínicas de rehabilitación), `opticas` (Ópticas), `funerarias` (Funerarias), `gasolineras` (Gasolineras), `cafeterias` (Cafeterías), `tacos` (Taquerías), `hamburguesas` (Hamburguesas), `pizzas` (Pizzerías), `salones-para-fiestas` (Salones para fiestas), `talleres-mecanicos` (Talleres mecánicos), `agencias-de-viajes` (Agencias de viajes), `renta-de-autos` (Renta de autos), `seguridad-privada` (Seguridad privada), `fletes-y-mudanzas` (Mudanzas), `plomerias-y-articulos-para` (Plomería), `peluquerias` (Peluquerías), `estetica-femenina-clinicas-de` (Clínicas de estética), `medicina-estetica` (Medicina estética), `laboratorios-de-diagnostico-clinico` (Laboratorios clínicos), `inmobiliarias` (Inmobiliarias), `papelerias` (Papelerías), `spa-salud-por-agua` (Spa), `seguros-companias-de` (Compañías de seguros), `carnicerias` (Carnicerías), `electrodomesticos` (Electrodomésticos)",
            "default": "restaurantes"
          },
          "state": {
            "title": "State (all modes except byUrl)",
            "enum": [
              "",
              "aguascalientes",
              "baja-california",
              "baja-california-sur",
              "campeche",
              "chiapas",
              "chihuahua",
              "coahuila",
              "colima",
              "distrito-federal",
              "durango",
              "guanajuato",
              "guerrero",
              "hidalgo",
              "jalisco",
              "mexico",
              "michoacan",
              "morelos",
              "nayarit",
              "nuevo-leon",
              "oaxaca",
              "puebla",
              "queretaro",
              "quintana-roo",
              "san-luis-potosi",
              "sinaloa",
              "sonora",
              "tabasco",
              "tamaulipas",
              "tlaxcala",
              "veracruz",
              "yucatan",
              "zacatecas"
            ],
            "type": "string",
            "description": "Restrict results to one of Mexico's 32 states. Leave empty for nationwide.",
            "default": ""
          },
          "city": {
            "title": "City (all modes except byUrl)",
            "type": "string",
            "description": "Restrict results to a specific city/municipality, e.g. `guadalajara`, `monterrey`, `merida`. Used both to scope the SeccionAmarilla search URL and as a safety-net text filter on the returned address.",
            "default": ""
          },
          "urls": {
            "title": "Business listing URLs (mode=byUrl)",
            "type": "array",
            "description": "Full SeccionAmarilla `/informacion/...` listing URLs, e.g. `https://www.seccionamarilla.com.mx/informacion/casa-bariachi/restaurantes/jalisco/guadalajara/guadalajara-centro/3183459`.",
            "default": [],
            "items": {
              "type": "string"
            }
          },
          "sortOrder": {
            "title": "Sort order (mode=search, byCategory)",
            "enum": [
              "",
              "az",
              "za"
            ],
            "type": "string",
            "description": "Result order for search/byCategory modes, matching the site's own \"Ordenar por\" control. Leave as Relevance for the site's default ranking.",
            "default": ""
          },
          "keyword": {
            "title": "Keyword filter",
            "type": "string",
            "description": "Only keep results whose name, description, category, or products/services list contains this text (case- and accent-insensitive)."
          },
          "openNowOnly": {
            "title": "Open now only",
            "type": "boolean",
            "description": "Only emit businesses currently marked as open on SeccionAmarilla.",
            "default": false
          },
          "hasWebsiteOnly": {
            "title": "Has website only",
            "type": "boolean",
            "description": "Only emit businesses that have a website listed.",
            "default": false
          },
          "whatsappOnly": {
            "title": "Has WhatsApp only",
            "type": "boolean",
            "description": "Only emit businesses with WhatsApp contact available, matching the site's own \"Whatsapp\" results filter. Requires `fetchDetails: true` (or mode=byUrl) — WhatsApp availability is only known from each business's own listing page.",
            "default": false
          },
          "fetchDetails": {
            "title": "Fetch full detail page per business",
            "type": "boolean",
            "description": "For search/byCategory modes: visit each business's own listing page to also collect email, all phone numbers, postal code, payment methods accepted, products/services tags, social links, WhatsApp availability, and full per-day opening hours. Slower (1 extra request per business). Always on for mode=byUrl.",
            "default": false
          },
          "maxItems": {
            "title": "Max items",
            "minimum": 1,
            "maximum": 500,
            "type": "integer",
            "description": "Hard cap on emitted records.",
            "default": 30
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Optional proxy settings. Leave empty to use no proxy — SeccionAmarilla is publicly accessible without one. The actor automatically escalates to the free AUTO datacenter proxy group if it hits a 403/429."
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}