Restaurant opening leads in Google Sheets (Apps Script)

A short Apps Script fetches new openings for your state and writes them to a sheet. Run it on a daily trigger and your territory list updates itself.

Get a free key
  1. Open Extensions → Apps Script and paste

    Set your key in Project Settings → Script properties as RESTOSIGNALS_KEY.

    function pullOpenings() {
      const key = PropertiesService.getScriptProperties().getProperty("RESTOSIGNALS_KEY");
      const url = "https://api.restosignals.com/v1/openings?state=TX&min_opening_score=60&limit=25";
      const res = UrlFetchApp.fetch(url, { headers: { "X-API-Key": key } });
      const rows = JSON.parse(res.getContentText()).openings || [];
      const sheet = SpreadsheetApp.getActive().getSheetByName("Openings")
        || SpreadsheetApp.getActive().insertSheet("Openings");
      if (sheet.getLastRow() === 0) sheet.appendRow(["id", "business_name", "city", "state", "opening_score", "status", "signals"]);
      const seen = new Set(sheet.getRange(1, 1, sheet.getLastRow(), 1).getValues().flat().map(String));
      rows.filter(r => !seen.has(String(r.id))).forEach(r =>
        sheet.appendRow([r.id, r.business_name, r.city, r.state, r.opening_score, r.status, (r.signal_types || []).join(", ")]));
    }
  2. Schedule it

    Triggers → Add trigger → pullOpenings → Time-driven → Day timer. Only venues not already in the sheet are added.

Use a key from restosignals.com/signup (100 free credits, no card). Every returned lead costs 1 credit; an empty result costs nothing, and calls stop at 0 credits instead of billing you. Keep limit small: each returned lead costs 1 credit, including ones already in your sheet.