# AI Alt Text Generator (Find & Fix Missing Image Alt Text) (`bewitching_rebec_jvu/ai-alt-text-generator`) Actor

Crawl your website, find every image missing alt text, and get accessible, SEO-friendly alt text written by Claude AI, with a ready-to-paste HTML snippet. Or paste image URLs directly. Helps with WCAG/ADA accessibility and image SEO.

- **URL**: https://apify.com/bewitching_rebec_jvu/ai-alt-text-generator.md
- **Developed by:** [first last](https://apify.com/bewitching_rebec_jvu) (community)
- **Categories:** SEO tools, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$6.00 / 1,000 alt text generateds

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

## AI Alt Text Generator: Find and Fix Missing Image Alt Text

Find every image on your website that has no alt text, and get clear, accessible alt text for each one, written by Claude AI. Enter your site's URL and click **Start**. You get a table of images with new alt text and an HTML snippet you can paste.

Missing alt text is one of the most common accessibility failures (WCAG 1.1.1). It also costs you image search traffic. This Actor fixes both in one run.

### What it does

1. **Scans your site:** crawls your pages politely, respecting robots.txt, and collects every `<img>`.
2. **Finds the gaps:** by default, it keeps only images with missing or empty alt text.
3. **Writes alt text:** Claude looks at each image and writes a description under 125 characters. It includes any important text in the image.
4. **Flags decorative images:** spacers and background textures get `decorative: true` and an empty alt, which is what WCAG recommends.

You can also skip the crawl and paste image URLs directly.

### Output (one row per image)

- `imageUrl`, `pageUrl`, and `pageTitle`
- `existingAlt`: what the page has now, if anything
- `altText`: the new alt text
- `decorative`: true when the image should have `alt=""`
- `htmlSnippet`: a ready-to-paste `<img>` tag
- `error`: why an image couldn't be described, for example if it failed to load

```json
{
  "imageUrl": "https://books.toscrape.com/media/cache/2c/da/2cdad67c44b002e7ead0cc35693c0e8b.jpg",
  "pageUrl": "https://books.toscrape.com/",
  "existingAlt": null,
  "altText": "Book cover of A Light in the Attic by Shel Silverstein, with a child sitting on a roof edge",
  "decorative": false,
  "length": 87,
  "htmlSnippet": "<img src=\"https://books.toscrape.com/media/cache/2c/da/...jpg\" alt=\"Book cover of A Light in the Attic...\">"
}
```

### Who it's for

- **Site owners and marketers** fixing accessibility and SEO audit findings
- **Agencies** handling WCAG and ADA remediation for clients
- **Ecommerce stores** with thousands of product photos
- **Developers** who need alt text for a CMS import

### How to use it

1. Add your website URL, or paste image URLs.
2. Set **Max images** to cap your cost.
3. Click **Start**, then export to CSV, Excel, or JSON.

### Pricing

You pay per alt text generated. Crawling, skipped images, and failed images are free. **Max images** caps your cost.

### Notes

- Supports JPEG, PNG, GIF, and WebP. SVG icons and inline `data:` images are skipped.
- Images must be publicly reachable. Pages behind a login are not scanned.
- Review the alt text before you publish it, especially for charts and complex diagrams.

# Actor input Schema

## `startUrls` (type: `array`):

Pages of your website to scan for images. The crawler stays on the same site and respects robots.txt.

## `imageUrls` (type: `array`):

Optional: image URLs to describe directly (JPEG, PNG, GIF, or WebP), one per line.

## `onlyMissingAlt` (type: `boolean`):

Skip images that already have alt text. Turn off to rewrite alt text for every image.

## `maxImages` (type: `integer`):

Maximum number of images to describe. You are charged per alt text generated.

## `maxPages` (type: `integer`):

Maximum number of pages to crawl when looking for images. Crawling is not charged.

## `language` (type: `string`):

Language for the alt text, for example English, Spanish, or German.

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/"
    }
  ],
  "onlyMissingAlt": true,
  "maxImages": 100,
  "maxPages": 50,
  "language": "English"
}
```

# Actor output Schema

## `results` (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 = {
    "startUrls": [
        {
            "url": "https://books.toscrape.com/"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("bewitching_rebec_jvu/ai-alt-text-generator").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 = { "startUrls": [{ "url": "https://books.toscrape.com/" }] }

# Run the Actor and wait for it to finish
run = client.actor("bewitching_rebec_jvu/ai-alt-text-generator").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 '{
  "startUrls": [
    {
      "url": "https://books.toscrape.com/"
    }
  ]
}' |
apify call bewitching_rebec_jvu/ai-alt-text-generator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,bewitching_rebec_jvu/ai-alt-text-generator"
        }
    }
}
```

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/3A2KhpJkJ4HoMg3tx/builds/Xmn0BOh8kiq3MQcXo/openapi.json
