# ArcGIS Export with Completeness Audit (`htvllc/arcgis-complete-export`) Actor

Export public ArcGIS FeatureServer and MapServer layers with an ID-based coverage report. Detect missing, duplicate and unexpected records, preserve large object IDs, and clearly flag capped exports. No API key or proxy required.

- **URL**: https://apify.com/htvllc/arcgis-complete-export.md
- **Developed by:** [High Top Ventures LLC](https://apify.com/htvllc) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 exported features

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?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## ArcGIS Export with Completeness Audit

Export records from a public ArcGIS FeatureServer or MapServer layer, and check the delivered IDs against the IDs reported by the source. Get a dataset plus a separate coverage report so a capped or incomplete export is visible before you use it in a pipeline.

Useful for GIS analysts and developers who need repeatable exports of public infrastructure, boundary, asset or planning layers. This tool does not supply a proprietary database; you choose the source and remain responsible for its access and reuse permissions.

### Quick start

1. Paste a public HTTPS layer URL ending in `FeatureServer/<number>` or `MapServer/<number>`.
2. Optionally choose a WHERE filter, fields and record cap.
3. Run, then open the dataset and **EXPORT-REPORT** in the run's storage.

An example using Esri's public sample service:

```json
{
  "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2",
  "where": "1=1",
  "outFields": "objectid,state_name",
  "maxRecords": 100,
  "batchSize": 20
}
```

### What you receive

Each dataset row contains `attributes` (the source fields), `geometry` (ArcGIS JSON, or null) and `export` (source URL and ID-enumeration time). These are separate objects so source field names are preserved. Integers beyond JavaScript's exact numeric range are represented as decimal strings. Geometry is not converted to GeoJSON or reprojected.

Use JSON to retain nested geometry and exact string IDs. Apify also offers CSV and spreadsheet exports; flatten the attributes fields you need, and check your spreadsheet's numeric import settings.

The coverage report includes expected, selected and delivered counts; missing, duplicate and unexpected IDs; request counts; limits; and these completion flags:

| Flag | Meaning |
| --- | --- |
| `selectionComplete` | All selected source IDs were retrieved, with no unexpected IDs. |
| `deliveryComplete` | All selected rows were acknowledged as delivered to the dataset. |
| `complete` | The entire enumerated matching ID set was delivered without duplicate-ID warnings. |
| `truncated` | The matching source contains more records than the selected cap. |

Records are selected in ascending object-ID order. Missing IDs are retried once. Duplicate rows are deduplicated and reported. If selected source coverage cannot be verified, the run fails before any feature charges. If delivery later fails, partial rows can exist; consult the report and run status. The tool does not claim that a changing service is an atomic snapshot.

### Pricing

The intended launch price is **$0.02 per run start plus $0.001 per delivered feature** ($1 per 1,000 features). The pricing panel in Apify is authoritative. A 1,000-feature run is $1.02 at these rates, before applicable taxes. The start charge applies even if a run returns no records or fails. Set a spending limit before running. A limit can reduce the selected count or stop delivery; inspect the report.

No proxy subscription, external API key or language-model account is needed.

### Scope and limits

- Public HTTPS on port 443 only. No authentication tokens, redirects, private-network destinations or IPv6-only hosts.
- At most 10,000 selected records and 200,000 enumerated source IDs.
- At most 100 source requests, 15 seconds per request and 120 seconds of extraction time.
- At most 8 MiB per response and 20 MiB of total source responses. Large geometries may reach these limits; use a smaller filter.
- No attachments, historical snapshots, incremental monitoring, joins, related tables or completeness claims about records the source omits from its ID response.

The source must support ArcGIS layer queries and object IDs. Some services reject batch requests or change while a run is in progress. A failed run is visible and should not be treated as a complete export.

For support, open an issue on this Actor with the run ID and a public example URL. Do not include access tokens or private records.

# Actor input Schema

## `url` (type: `string`):

HTTPS URL ending in /FeatureServer/0 or /MapServer/0 (use the actual layer number). Public layers only; do not include credentials or tokens.

## `where` (type: `string`):

Optional ArcGIS WHERE expression. 1=1 selects all matching records.

## `outFields` (type: `string`):

Comma-separated field names or \*. The source object-ID field is always included.

## `maxRecords` (type: `integer`):

Hard cap. The report explicitly identifies a capped export; it is never described as the entire layer.

## `batchSize` (type: `integer`):

Smaller batches can help services with tight transfer limits.

## Actor input object example

```json
{
  "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2",
  "where": "1=1",
  "outFields": "*",
  "maxRecords": 1000,
  "batchSize": 100
}
```

# Actor output Schema

## `dataset` (type: `string`):

No description

## `report` (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 = {
    "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2"
};

// Run the Actor and wait for it to finish
const run = await client.actor("htvllc/arcgis-complete-export").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 = { "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2" }

# Run the Actor and wait for it to finish
run = client.actor("htvllc/arcgis-complete-export").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 '{
  "url": "https://sampleserver6.arcgisonline.com/arcgis/rest/services/USA/MapServer/2"
}' |
apify call htvllc/arcgis-complete-export --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,htvllc/arcgis-complete-export"
        }
    }
}
```

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/uYpFpiNePGm12tFca/builds/PYydZUQNWewF5PoSh/openapi.json
