# Remove Characters (`danng/remove-characters`) Actor

- **URL**: https://apify.com/danng/remove-characters.md
- **Developed by:** [Daniel Georgiev](https://apify.com/danng) (community)
- **Categories:** Automation
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## Actor docs

Does what the title and description say

### How to run

#### cmd.exe

```
echo {"input":"hi"} | apify call danng/replace-with-actor-name -so --input-file -
```

```
C:\Users\danng>echo {"input":"hi"} | apify call danng/replace-with-actor-name -so --input-file -
[{
  "input": "hi"
}]
```

#### PowerShell

```
'{ "input": "hi" }' | apify call danng/replace-with-actor-name -so --input-file -
```

```
PS C:\Users\danng> '{ "input": "hi" }' | apify call danng/replace-with-actor-name -so --input-file -
[{
  "input": "hi"
}]
```

### To get the JSON

#### cmd

```
echo {"input":"hi"} | apify call danng/replace-with-actor-name -so -i - | jq -c ".[0]"
```

```
C:\Users\danielng01>echo {"input":"hi"} | apify call danng/replace-with-actor-name -so -i - | jq -c ".[0]"
{"input":"hi"}
```

#### PowerShell

```
(('{ "input": "hi" }' | apify call danng/replace-with-actor-name -so -i - | ConvertFrom-Json)[0] | ConvertTo-Json -Compress)
{"input":"hi"}
```

```
PS C:\Users\danielng01> (('{ "input": "hi" }' | apify call danng/replace-with-actor-name -so -i - | ConvertFrom-Json)[0] | ConvertTo-Json -Compress)
{"input":"hi"}
```

### Build time

Build time is improved to 0.8sec

```
2026-08-05T12:55:02.286Z ACTOR: Selected directory: .
2026-08-05T12:55:02.289Z ACTOR: Extracting Actor documentation from README.md
2026-08-05T12:55:02.291Z ACTOR: Found input schema at default location .actor/INPUT_SCHEMA.json
2026-08-05T12:55:02.722Z ACTOR: Building container image (cache enabled).
2026-08-05T12:55:02.963Z #1 [internal] load build definition from Dockerfile
2026-08-05T12:55:02.965Z #1 transferring dockerfile: 1.29kB done
2026-08-05T12:55:02.967Z #1 DONE 0.0s
2026-08-05T12:55:02.969Z #2 [auth] apify/actor-python:pull token for registry-1.docker.io
2026-08-05T12:55:02.971Z #2 DONE 0.0s
2026-08-05T12:55:02.973Z #3 [internal] load metadata for docker.io/apify/actor-python:3.14
2026-08-05T12:55:02.975Z #3 DONE 0.1s
2026-08-05T12:55:03.063Z #4 [internal] load .dockerignore
2026-08-05T12:55:03.066Z #4 transferring context: 2.98kB done
2026-08-05T12:55:03.068Z #4 DONE 0.0s
2026-08-05T12:55:03.070Z #5 [1/4] FROM docker.io/apify/actor-python:3.14@sha256:...
2026-08-05T12:55:03.071Z #5 resolve docker.io/apify/actor-python:3.14@sha256:... 0.0s done
2026-08-05T12:55:03.073Z #5 DONE 0.0s
2026-08-05T12:55:03.075Z #6 importing cache manifest from s3:8888392737511599217
2026-08-05T12:55:03.077Z #6 DONE 0.0s
2026-08-05T12:55:03.079Z #7 [internal] load build context
2026-08-05T12:55:03.081Z #7 transferring context: 9.93kB done
2026-08-05T12:55:03.082Z #7 DONE 0.0s
2026-08-05T12:55:03.084Z #8 [2/4] COPY --chown=myuser:myuser requirements.txt ./
2026-08-05T12:55:03.086Z #8 CACHED
2026-08-05T12:55:03.087Z #9 [3/4] RUN echo "Python version:"  && python --version  && echo "Pip version:"  && pip --version  && echo "Installing dependencies:"  && pip install -r requirements.txt
2026-08-05T12:55:03.089Z #9 CACHED
2026-08-05T12:55:03.216Z #9 [3/4] RUN echo "Python version:"  && python --version  && echo "Pip version:"  && pip --version  && echo "Installing dependencies:"  && pip install -r requirements.txt
2026-08-05T12:55:03.225Z #9 sha256:... 4.19MB / 18.28MB 0.2s
2026-08-05T12:55:03.378Z #9 sha256:... 13.63MB / 18.28MB 0.3s
2026-08-05T12:55:03.487Z #9 sha256:... 18.28MB / 18.28MB 0.4s done
2026-08-05T12:55:03.490Z #9 extracting sha256:..
2026-08-05T12:55:04.023Z #9 extracting sha256:.. 0.5s done
2026-08-05T12:55:04.025Z #9 DONE 1.0s
2026-08-05T12:55:04.176Z #10 [4/4] COPY --chown=myuser:myuser . ./
2026-08-05T12:55:04.284Z #10 DONE 0.3s
2026-08-05T12:55:04.384Z ACTOR: Pushing container image to repository.
2026-08-05T12:55:04.386Z #11 exporting to image
2026-08-05T12:55:04.388Z #11 exporting layers 0.1s done
2026-08-05T12:55:04.390Z #11 exporting manifest sha256:... 0.0s done
2026-08-05T12:55:04.392Z #11 exporting config sha256:...
2026-08-05T12:55:04.528Z #11 ...
2026-08-05T12:55:04.530Z #12 [auth] sharing credentials for 031263542130.dkr.ecr.us-east-1.amazonaws.com
2026-08-05T12:55:04.532Z #12 DONE 0.0s
2026-08-05T12:55:04.534Z #11 exporting to image
2026-08-05T12:55:04.536Z #11 exporting config sha256:... 0.0s done
2026-08-05T12:55:04.537Z #11 pushing layers
2026-08-05T12:55:04.711Z #11 ...
2026-08-05T12:55:04.713Z #13 exporting cache to Amazon S3
2026-08-05T12:55:04.715Z #13 preparing build cache for export 0.0s done
2026-08-05T12:55:04.717Z #13 sending cache export 0.1s done
2026-08-05T12:55:04.718Z #13 writing layer sha256:bc0a806...4....66985af730f6c0 0.0s done
2026-08-05T12:55:04.720Z #13 DONE 0.2s
2026-08-05T12:55:04.800Z #11 exporting to image
2026-08-05T12:55:04.802Z #11 pushing layers 0.4s done
2026-08-05T12:55:05.052Z #11 DONE 0.8s
2026-08-05T12:55:05.157Z ACTOR: Build finished.
```

# Actor input Schema

## `input1` (type: `string`):

The original string.

## `input2` (type: `string`):

Character(s) to remove from the input string.

## Actor input object example

```json
{
  "input1": "+359 (888) 123-456",
  "input2": "() -"
}
```

# 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("danng/remove-characters").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("danng/remove-characters").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 danng/remove-characters --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,danng/remove-characters"
        }
    }
}
```

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/5mRQOX8tiaforJFq0/builds/Bl1BhLri4PaQW0o8w/openapi.json
