# GSA Federal Lease Expiration Intelligence (`afkdigital/gsa-federal-lease-expiration-intelligence`) Actor

Official monthly GSA lease inventory: expiration, leased RSF and annual rent, unique lease records in JSON/CSV.

- **URL**: https://apify.com/afkdigital/gsa-federal-lease-expiration-intelligence.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Categories:** Business, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$8.00 / 1,000 unique gsa lease returneds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## GSA Federal Lease Expiration Intelligence

Current GSA monthly External Lease Inventory, one unique lease per result. Filter by state, city, end date, months remaining, and leased rentable area. Download JSON/CSV from the Apify dataset for Clay or n8n.

### Source and scope

The Actor discovers the latest dated **monthly** external file on [GSA's leasing page](https://www.gsa.gov/real-estate/realty-and-lease-acquisition), validates its period is no more than 65 days old, and downloads the official XLSX. On 2026-11-03 the file is **October 2026**, last modified on GSA's server 2026-11-02. GSA says its inventory is published after the first of each month and sensitive fields may be redacted. Government dataset access is public; see [GSA real property reports](https://www.gsa.gov/reference/reports/real-property-reports). Source records remain subject to correction and lag.

Columns: Lease Num identifies the lease; Location Code identifies the building (several leases can share one building); Address, City, State, ZipCode describe location; Lease Effective and Lease Expiration describe current lease term; Lease Agreement RSF is **rentable square feet**, not a building-wide area; Current Annual Rent is annual USD for the lease. Missing values become null. The source has no tenant agency column; `agency` is null, and specifying an agency filter produces a clear error. The GSA Field Office Name is not a tenant agency. Duplicates by Lease Num are suppressed before billing. Data in different leases within one building stay distinct. `inventory_period` gives the publication month (YYYY-MM), while `source_updated_at` is the GSA file's HTTP Last-Modified timestamp if provided. Neither is a verification date for each lease.

**Interpretation:** An expiration date is the end of the listed current contract term. Renewal options, termination rights, subsequent amendments, cancellations, and actual occupancy decisions are not inferred. A lease expiration is neither a public solicitation nor a confirmed relocation opportunity. Check official GSA leasing notices for open opportunities.

### Input

`state` (two-letter code), `city`, `expirationDateFrom` and `expirationDateTo` (YYYY-MM-DD, inclusive), `monthsRemainingMax` (signed whole months; negative for past dates), `minLeasedArea` (RSF), `maxResults` (1–1000, default 10), and optional `maxCostUsd` ($0.008–$8; caps delivered rows at floor(budget / $0.008)). `agency` is reserved and rejected when set because the source does not provide it. No filter means the first ten leases in the official file, and finishes in under five minutes under normal source availability. Dates use UTC run date; incomplete months are rounded down.

### Billing and limits

Pay per event: **$0.008 per delivered unique lease**, or $8 per 1,000, plus any platform usage if the Store settings explicitly say so. One `lease-returned` event per dataset row, and no fee for duplicates or zero results. The Apify run charge limit may stop output early. Download is capped at 5 MB; requests use 20-second timeouts and up to three attempts. Source age and required columns fail closed. Official data can be unavailable or edited without notice.

# Actor input Schema

## `state` (type: `string`):

Two-letter state code such as CT.

## `city` (type: `string`):

Filter using the official GSA monthly lease inventory: city

## `agency` (type: `string`):

The source has no tenant agency field; if provided, the Actor returns a clear error.

## `expirationDateFrom` (type: `string`):

YYYY-MM-DD inclusive

## `expirationDateTo` (type: `string`):

YYYY-MM-DD inclusive

## `monthsRemainingMax` (type: `integer`):

Filter using the official GSA monthly lease inventory: monthsRemainingMax

## `minLeasedArea` (type: `number`):

Filter using the official GSA monthly lease inventory: minLeasedArea

## `maxResults` (type: `integer`):

Filter using the official GSA monthly lease inventory: maxResults

## `maxCostUsd` (type: `number`):

Optional local maximum charge for delivered rows, $0.008 each. Apify run charge limit also applies.

## Actor input object example

```json
{
  "maxResults": 10
}
```

# Actor output Schema

## `leasesJson` (type: `string`):

No description

## `leasesCsv` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {};

// Run the Actor and wait for it to finish
const run = await client.actor("afkdigital/gsa-federal-lease-expiration-intelligence").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {}

# Run the Actor and wait for it to finish
run = client.actor("afkdigital/gsa-federal-lease-expiration-intelligence").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{}' |
apify call afkdigital/gsa-federal-lease-expiration-intelligence --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/gsa-federal-lease-expiration-intelligence"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/amhALiQ4L4d3TUBwG/builds/28ZXYfbjXCEUSAGun/openapi.json
