Building localized business datasets for regional markets often runs into severe data sparsity. Global business directories frequently lack coverage outside major urban centers in Latin America, missing key local service providers, regional distributors, and small-to-medium enterprises. In Mexico, the primary central repository for localized commercial listings across all 32 states remains Sección Amarilla.
The SeccionAmarilla Mexico Business Directory Scraper provides programmatic extraction from seccionamarilla.com.mx without requiring user authentication, session cookies, or API keys. It handles search queries, category navigation, deep detail extraction, and geographic scoping down to specific municipalities.
Extraction Modes and Query Architecture
The scraper operates via three distinct execution strategies defined by the mode parameter:
-
search: Executes a free-text search across Sección Amarilla using thesearchQuerystring (for example,restaurantesorplomeros). -
byCategory: Accepts a specific directory category slug (such ashotelesorlaboratorios-de-diagnostico-clinico). The actor includes safety checks against Sección Amarilla’s search behavior, filtering out unrelated businesses that merely mention the category term in their metadata. -
byUrl: Accepts a direct list of/informacion/...URLs in theurlsarray to fetch exact business profiles.
Geographic filtering operates via the state enum (covering all 32 Mexican states) and an optional city string (such as guadalajara or monterrey). Because the site occasionally pads narrow queries with listings from adjacent municipalities, the actor applies a post-fetch safety-net check to discard results outside the target city.
Standard Search vs. Deep Detail Enrichment
By default (fetchDetails: false), the scraper processes search and category result index pages. This returns baseline directory data quickly:
-
businessIdandsourceUrl -
nameandcategory -
street,colonia,city,state,stateCode, andfullAddress -
latitude,longitude, and generatedmapUrl - Primary
phoneandwebsite -
openNowstatus flag andopeningHoursSummary
When you set fetchDetails: true (or use mode: byUrl), the actor executes an extra HTTP request to each business's dedicated listing page. This surfaces fields that do not exist on the main search index:
postalCode- Full telephone array (
phones[]) andemail -
productsAndServices[]taxonomy tags -
paymentMethods[](e.g., credit cards, cash, bank transfer) - Structured
openingHours[]objects containing day-by-day breakdowns ({day, dayEn, hours}) -
whatsappAvailableboolean flag andsocialLinks[]
Empty fields are omitted from the output JSON records rather than populated with null values, keeping downstream payloads clean.
Execution Walkthrough
You can configure and invoke the scraper using the Apify API or Python client.
1. Define the Run Configuration
Set your targeting parameters in your input payload. The following example targets automotive mechanics in Monterrey, Nuevo León, requesting full profile enrichment and filtering for businesses with an active WhatsApp channel:
{
"mode": "search",
"searchQuery": "talleres mecanicos",
"state": "nuevo-leon",
"city": "monterrey",
"fetchDetails": true,
"whatsappOnly": true,
"maxItems": 100
}
2. Execute via Python
Use the official client to trigger the run and stream output items directly into your data pipeline:
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run_input = {
"mode": "search",
"searchQuery": "dentistas",
"state": "jalisco",
"city": "guadalajara",
"fetchDetails": True,
"maxItems": 50,
}
run = client.actor("crawlerbros/seccion-amarilla-scraper").call(
run_input=run_input
)
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(
f"{item.get('name')} | Phone: {item.get('phone')} | Lat/Lng: {item.get('latitude')},{item.get('longitude')}"
)
Result Schema Example
A detail-enriched output record from a successful run contains structured geographic and contact points:
{
"businessId": "3183459",
"sourceUrl": "https://www.seccionamarilla.com.mx/informacion/casa-bariachi/restaurantes/jalisco/guadalajara/guadalajara-centro/3183459",
"name": "Casa Bariachi",
"category": "Restaurantes-Cocina Mexicana",
"street": "Av. Vallarta 2221",
"colonia": "Arcos Vallarta",
"city": "Guadalajara",
"state": "Jalisco",
"stateCode": "JAL",
"postalCode": "44130",
"fullAddress": "Av. Vallarta 2221, Arcos Vallarta, 44130 Guadalajara, Jal.",
"latitude": 20.6748,
"longitude": -103.3762,
"mapUrl": "https://maps.google.com/?q=20.6748,-103.3762",
"phone": "3336150029",
"phones": ["3336150029", "3336162260"],
"email": "contacto@casabariachi.com",
"website": "https://www.casabariachi.com",
"whatsappAvailable": true,
"paymentMethods": ["Efectivo", "Mastercard", "Visa"],
"productsAndServices": ["Comida Mexicana", "Musica de Mariachi"],
"openNow": true,
"openingHoursSummary": "Abierto hoy de 13:00 a 01:00",
"recordType": "business",
"scrapedAt": "2025-02-20T14:22:18.000Z"
}
Pricing and Cost Structure
This actor uses an event-based pricing model (PAY_PER_EVENT). Charges are applied strictly per event rather than tracking server uptimes:
- Actor Start: $0.005 per GB of memory allocated to the run (charged once upon initiation).
- Result Dataset Item: $0.005 per result emitted on the FREE volume tier. Discounted volume tiers apply at scale: BRONZE at $0.00433, SILVER at $0.00367, and GOLD, PLATINUM, and DIAMOND tiers at $0.003 per result.
Extracting 1,000 baseline or detail-enriched business listings on the FREE tier equates to $5.00 in result charges plus the single start event cost.
Source Boundaries and Limitations
This data source does not publish customer review scores or aggregate rating counts in its public listings or structured schema, meaning the actor cannot output star ratings or review volume metrics. For use cases requiring sentiment analysis or reputation metrics, pairing this output with dedicated mapping and review indexes is necessary.
Source for the runs in this article: SeccionAmarilla Mexico Business Directory Scraper. The input schema there is authoritative; treat anything in this post that contradicts it as out of date.
Prices quoted above are this Actor's published pay-per-event rates on the Apify Store, read from the Apify platform API on 2026-09-19. Check the Actor page for the current rates.
Top comments (0)