# San Antonio 311 Service Calls Feed (`texas-data-feeds/san-antonio-311-feed`) Actor

San Antonio 311 service requests (code violations, overgrown yards, junk vehicles, bulky items, potholes, animals) filtered by category, ZIP, council district and recency, with lat/lon. City open data, CC-BY.

- **URL**: https://apify.com/texas-data-feeds/san-antonio-311-feed.md
- **Developed by:** [Texas Data Feeds](https://apify.com/texas-data-feeds) (community)
- **Categories:** Lead generation, Real estate, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 results

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

## San Antonio 311 Service Calls Feed

Get San Antonio, Texas 311 service requests as clean, filterable JSON/CSV: code-enforcement cases (overgrown yards, vacant properties, junk vehicles), bulky-item and solid-waste requests, animal calls, potholes, graffiti and more. Filter by **category, case-type keyword, ZIP code, City Council district, open/late status and recency**, and get **latitude/longitude** (converted from the City's State Plane coordinates), days open, and late-vs-SLA flags. The newest cases come first.

The City publishes one ~170 MB CSV of roughly 500,000 cases (a rolling 12-month window). This actor downloads it once per run, then filters and normalizes it, so you only pay for the rows you need.

**Who uses it:** lawn-care, junk-removal, pest-control and cleanup businesses (code-violation and bulky-item demand by ZIP), property managers and investors (code activity near a property), local reporters and researchers (service response times by district).

### What you get

| record_type | What it is | Key fields |
|---|---|---|
| `service_call` | One City 311 case | case_id, opened_at, closed_at, sla_due_at, status, is_late, days_open, category, department, reason, type, intake_channel, address, zip_code, council_district, latitude, longitude |
| `no_match` | Returned when no case matches your filters | note (includes how current the City data is) |

Every record carries `license`, `source_url`, `data_url` and `scraped_at`.

### Input

| Field | Meaning |
|---|---|
| `categories` | Exact City categories: Property Maintenance, Solid Waste Services, Animals, Streets & Infrastructure, Traffic Signals and Signs, Graffiti, Parks, Health_Sanitation, ... |
| `typeKeywords` | Keywords matched against case type/reason, e.g. `overgrown`, `junk vehicle`, `bulky`, `pothole`, `dead animal` |
| `departments`, `zipCodes`, `councilDistricts` | Optional extra filters |
| `openOnly`, `lateOnly` | Only open cases / only cases past the City's service-level target |
| `newSinceDays` | "New cases" mode: cases opened in the last N days of the City's latest export (default 7) |
| `dateFrom`, `dateTo` | Opened-date window (YYYY-MM-DD) |
| `maxItems` | Cap on results, newest first (default 1,000) |

Example (the past week's overgrown-yard cases):

```json
{"categories": ["Property Maintenance"], "typeKeywords": ["overgrown"], "newSinceDays": 7, "maxItems": 50}
```

### How current is the data?

The City refreshes the file periodically (it is not real-time). Each case includes `report_window_start` and `report_window_end`, and the run log shows the newest case date in the City's file. Schedule the actor daily to catch each refresh.

### Data source and credit

- **City of San Antonio Open Data Portal**: [311 Service Calls](https://data.sanantonio.gov/dataset/service-calls). The data is licensed **Creative Commons Attribution (CC-BY)**, and you can download the raw file free at that link. This actor charges only for the automation it adds: download, parsing, filtering, coordinate conversion, and scheduled delivery. If you republish the data, credit the City of San Antonio as the source.
- This actor is **not affiliated with or endorsed by the City of San Antonio**. No City logos are used.

### Pricing (pay-per-event)

- Actor start: $0.005 per run (at the default 1 GB memory)
- Result: $0.001 per case returned. A typical weekly ZIP or category watch returns 20–500 cases, so it costs about $0.03–$0.51. Filters reduce how many rows you pay for.

### Etiquette and compliance

One CSV download per run through the portal's public download link. The actor never calls the portal's `/api/` or `/datastore/` paths, which robots.txt disallows. It waits at least 10 s between requests, matching the robots.txt crawl-delay, sends a descriptive User-Agent, and backs off on 403/429 errors.

### Disclaimer

Data is provided "as is", with no warranty of accuracy, completeness or timeliness. It is not an official record; verify with the City of San Antonio (311 / Development Services) before acting on it. Addresses describe the location of the reported issue, not a person. The City's file contains no reporter names, and this actor adds no personal data. Use the data lawfully, and do not use it to harass residents or for any purpose covered by the FCRA (such as tenant, credit or employment screening).

# Actor input Schema

## `categories` (type: `array`):

Exact City categories, e.g. Property Maintenance, Solid Waste Services, Animals, Streets & Infrastructure, Graffiti, Parks, Traffic Signals and Signs, Health_Sanitation. Empty = all.

## `typeKeywords` (type: `array`):

Case-insensitive keywords matched against case type/reason, e.g. overgrown, junk vehicle, bulky, pothole, dead animal, graffiti. Empty = all.

## `departments` (type: `array`):

Exact department names, e.g. Development Services, Solid Waste Management, Animal Care Services, Public Works. Empty = all.

## `zipCodes` (type: `array`):

Only cases whose address is in these ZIP codes. Empty = all.

## `councilDistricts` (type: `array`):

City Council district numbers 1-10. Empty = all.

## `openOnly` (type: `boolean`):

Return only cases still OPEN.

## `lateOnly` (type: `boolean`):

Return only cases the City flagged late vs its service-level target.

## `newSinceDays` (type: `integer`):

Keep cases opened within N days before the newest case in the City's latest export (the City refreshes the file periodically, so this is the 'new cases' mode). 0 = no limit.

## `dateFrom` (type: `string`):

Optional earliest opened date.

## `dateTo` (type: `string`):

Optional latest opened date (inclusive).

## `maxItems` (type: `integer`):

Newest cases first. Caps cost; 0 = no limit (the full file is ~500,000 cases).

## `requestDelaySecs` (type: `integer`):

Polite delay; the portal's robots.txt asks for 10 s.

## Actor input object example

```json
{
  "categories": [
    "Property Maintenance"
  ],
  "typeKeywords": [
    "overgrown"
  ],
  "openOnly": false,
  "lateOnly": false,
  "newSinceDays": 7,
  "maxItems": 1000,
  "requestDelaySecs": 10
}
```

# Actor output Schema

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

Dataset with all output records

# 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 = {
    "categories": [
        "Property Maintenance"
    ],
    "typeKeywords": [
        "overgrown"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("texas-data-feeds/san-antonio-311-feed").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 = {
    "categories": ["Property Maintenance"],
    "typeKeywords": ["overgrown"],
}

# Run the Actor and wait for it to finish
run = client.actor("texas-data-feeds/san-antonio-311-feed").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 '{
  "categories": [
    "Property Maintenance"
  ],
  "typeKeywords": [
    "overgrown"
  ]
}' |
apify call texas-data-feeds/san-antonio-311-feed --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,texas-data-feeds/san-antonio-311-feed"
        }
    }
}
```

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/iynT1nhoYf2hgyf1u/builds/aehdJq0Js9kHyyK2x/openapi.json
