# SaaS Seat Waste Auditor (`afkdigital/saas-seat-waste-auditor`) Actor

Audit SaaS seats from CSV or XLSX. Flag inactive and unassigned licenses and estimate avoidable costs by currency and billing period.

- **URL**: https://apify.com/afkdigital/saas-seat-waste-auditor.md
- **Developed by:** [AFK Digital](https://apify.com/afkdigital) (community)
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$10.00 / 1,000 audited app-user pairs

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

## SaaS Seat Waste Auditor

Find SaaS seats that merit review using exported license, activity and pricing files. No SaaS admin access is required. The Actor reads your files and produces a report for human review.

### Run

Leave all three file fields empty for the free synthetic demo. For your audit, upload all three CSV or XLSX files using the file pickers. When using the API, pass Apify key-value store record URLs (filenames must end in .csv or .xlsx). Use private storage accessible to the run. Avoid links containing reusable credentials. Files are limited to 5 MiB, 20,000 data rows and 100 columns each. Use UTF-8 comma-delimited CSV or the first XLSX worksheet, with exact headers and values-only cells. Format identifiers with leading zeros as text. One license row represents one seat. App, plan and user IDs are matched case-insensitively.

| File | Required headers | Optional headers |
| --- | --- | --- |
| licensesFile | app, plan, user_id | seat_id, required_features, contract_status |
| usageFile | app, user_id, last_activity_at | |
| pricingFile | app, plan, unit_price, currency, billing_period | features, contract_status |

Set columnMapping to an object such as `{"licenses":{"app":"Application","user_id":"Account ID"}}` when headers differ. Unmapped fields use the canonical headers. Use blank user_id for an unassigned seat. Each assigned app/user pair must appear once in the license file. Multiple usage records are accepted, and the most recent valid timestamp on or before analysisDate is used. Use YYYY-MM-DD (UTC midnight) or an ISO timestamp with timezone. The default reference is today's UTC midnight. Set inactiveDays to a whole number from 1 to 3650. Inactivity begins at the threshold. exemptUsers is a list of user IDs exempt across all apps.

Use monthly or annual for billing_period and an uppercase three-letter currency code. Provide one price per app and plan. Express unit_price as a nonnegative decimal with up to four decimal places. Set pricing contract_status to reducible_now only when the current paid commitment can actually be reduced. Any other value goes to contract review. A seat-level contract_status can override reducible_now with prepaid, locked, or any other restriction. Missing prices are flagged without inventing a zero price. Cost totals stay in the supplied currency and billing period. The contract-review list price is exposure for review and is excluded from immediately avoidable estimates.

Provide pipe-separated required_features on a seat and features on both plans to enable a cheaper plan suggestion for an active user. The candidate must cover the supplied requirements and have a lower price in the same currency and billing period. Suggestions are excluded from avoidable totals pending feature and contract review.

### Output

The Dataset offers JSON and CSV findings. The SUMMARY record in the run's default key-value store groups estimates by currency and billing period. Evidence lists record numbers in CSV (including the header) or worksheet row numbers in XLSX. Embedded newlines inside one quoted CSV record count as part of that record. No user IDs, emails, source links or raw usage rows are emitted to application logs. Findings can contain supplied identifiers and the selected activity timestamp. Treat input storage and output as sensitive and prefer opaque IDs.

### Billing unit

A chargeable event is one successfully audited assigned app/user pair with usable activity, whether active or inactive. The same user audited in three apps counts as three. Multiple activity events in one app still count as one. Unassigned seats, exemptions, missing activity and the synthetic demo incur no audit events. The Actor checks the event budget before writing results.

### Demo result

Seven findings include one active user, two inactive app/user assignments, two unassigned seats, one exemption and one assignment with missing usage. The USD monthly estimate is USD 48. EUR 360 annual is subject to contract review. The active user has a separate USD 12/month plan candidate.

# Actor input Schema

## `licensesFile` (type: `string`):

Apify key-value store record URL ending in .csv or .xlsx.

## `usageFile` (type: `string`):

Apify key-value store record URL ending in .csv or .xlsx.

## `pricingFile` (type: `string`):

Apify key-value store record URL ending in .csv or .xlsx.

## `columnMapping` (type: `object`):

Optional nested mappings by licenses, usage, and pricing. Map canonical field names to exact file headers.

## `inactiveDays` (type: `integer`):

Elapsed UTC days. The threshold is inclusive.

## `analysisDate` (type: `string`):

YYYY-MM-DD (UTC midnight) or an ISO timestamp with offset. Defaults to today at UTC midnight.

## `exemptUsers` (type: `array`):

Case-insensitive user identifiers exempt across apps.

## Actor input object example

```json
{
  "inactiveDays": 30
}
```

# Actor output Schema

## `findingsJson` (type: `string`):

No description

## `findingsCsv` (type: `string`):

No description

## `summary` (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/saas-seat-waste-auditor").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/saas-seat-waste-auditor").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/saas-seat-waste-auditor --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,afkdigital/saas-seat-waste-auditor"
        }
    }
}
```

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/RjSfYsyGxBTGsO9CA/builds/gWFrMFQyNn47dLbxm/openapi.json
