Download SEACE Open Business Data as Excel

Site prod4.seace.gob.peTask download-seace-open-business-data-excelVersion v4Updated Aug 5, 2026Category data-export

Download the complete or optionally description-filtered SEACE Open Business Excel export, then optionally filter the workbook locally by Fecha de la convocatoria. This skill was captured from a live agent session on prod4.seace.gob.pe and publishes here verbatim, exactly as an agent receives it.

NoteSelectors and URL schemes drift as sites change. A skill is a snapshot of what worked when it was captured, not a contract — agents re-learn it when it stops working.

Purpose

Download the data exposed by SEACE's Open Business interface in Excel format. By default, export the complete unfiltered dataset; optional description filtering can be applied in the site UI, and date filtering can be applied locally to the downloaded workbook.

When to Use

Use when the caller asks to export or download data shown by the SEACE Open Business search screen as Excel. Leave the site search unfiltered unless a description filter is explicitly requested. After downloading, use the local date filter when the caller specifies one or more Fecha de la convocatoria dates.

Workflow

  1. Navigate directly to https://prod4.seace.gob.pe/openegocio/#/buscar; the application uses an Angular hash route, so no homepage navigation or search-box setup is needed.
  2. Wait for the Angular-rendered control #cdk-accordion-child-2 button, then click that button to expand the search/data panel.
  3. If a description filter is requested, locate the visible input whose placeholder or accessibility label contains descripción, set it to {description}, dispatch input, change, and blur events, click the visible Buscar button, and wait for the results to refresh. If no description filter is requested, do not enter a term or submit a search; export the complete available dataset.
  4. After the results are ready, initiate the Excel export with this page-local evaluator, selecting only a visible control explicitly labeled Excel/XLS/XLSX:
(() => {
  const visible = (el) => {
    if (!el) return false;
    const s = getComputedStyle(el),
      r = el.getBoundingClientRect();
    return (
      s.display !== "none" &&
      s.visibility !== "hidden" &&
      r.width > 0 &&
      r.height > 0
    );
  };
  const controls = [...document.querySelectorAll('button, a, [role="button"]')];
  const control = controls.find((el) => {
    const text = [
      el.innerText,
      el.getAttribute("aria-label"),
      el.getAttribute("title"),
    ]
      .filter(Boolean)
      .join(" ")
      .trim();
    return /excel|xlsx|xls/i.test(text) && visible(el);
  });
  if (!control)
    return { downloaded: false, reason: "No visible Excel control found" };
  control.click();
  return {
    downloaded: true,
    label: (
      control.innerText ||
      control.getAttribute("aria-label") ||
      control.getAttribute("title") ||
      ""
    ).trim(),
  };
})();
  1. Confirm that a .xls or .xlsx file was downloaded. When a local Fecha de la convocatoria range or date list is requested, filter this downloaded workbook locally rather than narrowing the SEACE query.
  2. For a local inclusive date range from {start-date} through {end-date}, retain every row whose Fecha de la convocatoria falls within that range, preserving all columns and writing a new workbook. This Python example handles Excel date cells and Spanish day-first date strings:
from pathlib import Path
from datetime import datetime, date
import pandas as pd

input_path = Path("{downloaded-file}")
output_path = Path("{filtered-output-file}")
start = pd.Timestamp("{start-date}")
end = pd.Timestamp("{end-date}")

engine = "xlrd" if input_path.suffix.lower() == ".xls" else "openpyxl"
df = pd.read_excel(input_path, engine=engine)
column = next((c for c in df.columns if str(c).strip().casefold() == "fecha de la convocatoria".casefold()), None)
if column is None:
    raise KeyError("Column 'Fecha de la convocatoria' was not found")
parsed = pd.to_datetime(df[column], errors="coerce", dayfirst=True)
keep = parsed.dt.normalize().between(start.normalize(), end.normalize(), inclusive="both")
df.loc[keep].to_excel(output_path, index=False, engine="openpyxl")
print({"input_rows": len(df), "matched_rows": int(keep.sum()), "output": str(output_path)})

For a non-contiguous set of requested dates, replace the between(...) expression with parsed.dt.normalize().isin(pd.to_datetime({date-list}, dayfirst=True).normalize()).

Site-Specific Gotchas

  • The functional search screen is the hash route #/buscar, not the bare /openegocio/ URL.
  • The relevant controls are initially behind the accordion represented by #cdk-accordion-child-2; expand it before applying filters or looking for the export control.
  • The optional description search input is identifiable through a placeholder or accessibility label containing descripción; the submit button is visibly labeled Buscar.
  • Wait for Angular-rendered controls and refreshed results before looking for the export control; the observed deployment needed several seconds after navigation and search submission.
  • Match the Excel control by its visible label or accessibility metadata rather than assuming a stable generated Angular class.
  • If an optional description filter is not requested, export the currently displayed data without entering a search term; this is the path for obtaining the complete unfiltered export.
  • Apply Fecha de la convocatoria filtering after download so the original complete workbook remains available. Confirm the exact column header before processing.
  • Excel date cells may be true date values or localized day-first strings. Parse both forms and verify the matched-row count before retaining the filtered workbook.
  • Use openpyxl for .xlsx; .xls input generally requires the xlrd package with .xls support.

Expected Output

A downloaded .xls or .xlsx workbook containing the complete data shown by the SEACE Open Business screen, optionally filtered by description. When requested, also produce a separate workbook containing all columns and only rows whose Fecha de la convocatoria matches the requested date range or date list, together with input and matched row counts.

Call it

GET https://production-sfo.browserless.io/skills?token=TOKEN-HERE&domain=prod4.seace.gob.pe&task=download-seace-open-business-data-excel