{
  "openapi": "3.0.1",
  "info": {
    "title": "Sección Amarilla Mexico Business Scraper",
    "description": "Scrape Sección Amarilla (seccionamarilla.com.mx), Mexico's yellow pages: business name, category, full address, GPS, phone, WhatsApp, website, hours and payment methods. Search by keyword and city or state. Pay per result.",
    "version": "0.1",
    "x-build-id": "2bdKA5A2k9vHwli9w"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/hexadatalabs~seccion-amarilla-business-scraper/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-hexadatalabs-seccion-amarilla-business-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/hexadatalabs~seccion-amarilla-business-scraper/runs": {
      "post": {
        "operationId": "runs-sync-hexadatalabs-seccion-amarilla-business-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/hexadatalabs~seccion-amarilla-business-scraper/run-sync": {
      "post": {
        "operationId": "run-sync-hexadatalabs-seccion-amarilla-business-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",
        "properties": {
          "searchQueries": {
            "title": "Categories or keywords",
            "type": "array",
            "description": "Business categories or free keywords to search for, one per line, as written on seccionamarilla.com.mx (for example \"restaurantes\", \"ferreterias\", \"hoteles\", \"talleres mecanicos\"). Each one becomes a separate search.",
            "items": {
              "type": "string"
            }
          },
          "city": {
            "title": "City (optional)",
            "type": "string",
            "description": "City or municipality, for example \"ciudad de mexico\", \"guadalajara\", \"monterrey\", \"puebla\", \"cancun\". Leave empty to search all of Mexico. Results for a big city include its metro area."
          },
          "state": {
            "title": "State (optional)",
            "type": "string",
            "description": "Mexican state, for example \"jalisco\", \"nuevo leon\", \"estado de mexico\". Combine with a city (state + city) or use it alone for a whole state. The site also lists some businesses from other states; strictLocation drops them."
          },
          "startUrls": {
            "title": "Custom listing URLs (optional)",
            "type": "array",
            "description": "Full Sección Amarilla results URLs to scrape instead of (or in addition to) the queries above, for example https://www.seccionamarilla.com.mx/resultados/dentistas/guadalajara/1 or https://www.seccionamarilla.com.mx/resultados/ferreterias/jalisco/guadalajara/1. A text file with one URL per line is accepted too. Custom URLs are not filtered by city / state.",
            "items": {
              "type": "object",
              "required": [
                "url"
              ],
              "properties": {
                "url": {
                  "type": "string",
                  "title": "URL of a web page",
                  "format": "uri"
                }
              }
            }
          },
          "maxResults": {
            "title": "Maximum results",
            "minimum": 1,
            "maximum": 100000,
            "type": "integer",
            "description": "Stop after this many businesses in total (across all queries). You are charged per result, so this caps the cost.",
            "default": 100
          },
          "scrapeDetails": {
            "title": "Scrape business details",
            "type": "boolean",
            "description": "Open each business page to get the description, opening hours, payment methods, product/service tags, additional phone lines, branches, the logo/ad image and the official website. One extra request per business. Turn it off for a cheaper, listing-only run (name, category, address, coordinates, phone, WhatsApp, website).",
            "default": true
          },
          "strictLocation": {
            "title": "Only businesses in the requested state",
            "type": "boolean",
            "description": "The site pads city and state searches with businesses from other states (about 1 in 4 rows in a Monterrey, Nuevo León hotel test). When enabled, rows whose state is not the requested one (the state given, or the state of the city / metro area) are skipped before they count towards maxResults. Turn it off to keep every row the site returns.",
            "default": true
          },
          "onlyWithWebsite": {
            "title": "Only businesses with a website",
            "type": "boolean",
            "description": "Skip listings that do not publish any website (useful for lead generation).",
            "default": false
          },
          "includeIndividuals": {
            "title": "Include professionals listed under a personal name",
            "type": "boolean",
            "description": "Some categories (dentists, doctors, lawyers...) contain professionals listed under their own name. By default those records are skipped. When enabled they are kept with publisherType \"possible_individual\" and WITHOUT phone, WhatsApp or email. Make sure you have a legal basis before enabling this.",
            "default": false
          },
          "includeEmail": {
            "title": "Include business email",
            "type": "boolean",
            "description": "Add the contact email published on the listing (business records only). Off by default; enable only if you need it and comply with the applicable data-protection and anti-spam laws.",
            "default": false
          },
          "proxyConfiguration": {
            "title": "Proxy configuration",
            "type": "object",
            "description": "Proxy to use. Apify proxies are recommended for reliable runs.",
            "default": {
              "useApifyProxy": true
            }
          },
          "maxConcurrency": {
            "title": "Max concurrency",
            "minimum": 1,
            "maximum": 10,
            "type": "integer",
            "description": "Maximum parallel requests. Keep it low (2–5) to stay polite with the site.",
            "default": 3
          }
        }
      },
      "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
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}