# Ringtone Maker  Get Ringtone (`mahidhar/ringtone-maker`) Actor

Search any song and get metadata, direct audio links, and trimmed 30-second ringtone files (MP3 / iPhone M4R).

- **URL**: https://apify.com/mahidhar/ringtone-maker.md
- **Developed by:** [Makers](https://apify.com/mahidhar) (community)
- **Categories:** Developer tools, Automation, Other
- **Stats:** 3 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: 5.00 out of 5 stars

## Pricing

Pay per usage

This Actor is paid per platform usage. The Actor is free to use, and you only pay for the Apify platform usage, which gets cheaper the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-usage

## 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

## Ringtone Maker — Song to Ringtone

Turn any song into a ringtone in seconds. Search by song name (or paste a
supported song/album/playlist URL) and get rich metadata, direct audio links,
and — optionally — a ready-to-use **30-second ringtone file** with fade in/out,
in **MP3** or **M4R (iPhone)** format, downloadable via a direct link.

No browser, no login, no app install. Runs in seconds and is priced per event,
so you only pay for what you actually generate.

### Features

- 🔔 **Ready ringtone URL with every result** — an official ~30s tune MP3,
  no processing needed, even in the cheapest mode
- 🔎 **Song search** — top matches for any song name, in many languages
- 🎧 **Direct audio links** — high (320 kbps), low (160 kbps), or preview quality
- ✂️ **Ringtone clips** — choose start point, length (5–45s), and fades
- 📱 **iPhone-ready M4R** output, plus universal MP3
- 🖼️ **Metadata** — title, artists, album, year, language, duration, 500×500 artwork
- 📜 **Lyrics** (optional)
- 📦 **Batch mode** — process a whole list of songs in one run
- ⚡ **Cached clips** — repeated requests for the same ringtone return instantly

### Input

```json
{
    "query": "Believer",
    "mode": "clip",
    "clipStart": 60,
    "clipLength": 30,
    "fadeIn": 1,
    "fadeOut": 2,
    "format": "m4r",
    "bitrate": "high"
}
```

Use `"mode": "links"` (the default) if you only need metadata and audio URLs —
it's faster and cheaper. Add `"queries": ["song 1", "song 2", ...]` to batch
many songs into a single run.

### Output

One dataset item per song:

```json
{
    "id": "AbCdEfGh",
    "title": "Believer",
    "artists": "Imagine Dragons",
    "album": "Evolve",
    "year": "2017",
    "language": "english",
    "duration": 204,
    "image": "https://.../500x500.jpg",
    "mediaUrl": "https://.../..._320.mp4",
    "ringtoneUrl": "https://.../....mp3",
    "ringtoneSource": "catalog-tune",
    "hasLyrics": true
}
```

`ringtoneUrl` is a direct, ready-to-use ringtone MP3 (~30s):

- In **links** mode it's the song's official tune clip — instant, no processing.
- In **clip** mode it's your custom-trimmed file (your start point, length,
  fades, MP3/M4R) with `"ringtoneSource": "custom-clip"` plus
  `ringtoneFormat` and `ringtoneLength` fields.

### Pricing (pay per event)

| Event | Price |
|---|---|
| Actor start | $0.005 / run |
| Song resolved (links mode) | $0.005 / song |
| Ringtone clip generated | $0.025 / clip |
| Lyrics | $0.002 / song |

Example: searching a song and generating one iPhone ringtone costs about
**$0.03**. A links-only lookup of 5 songs costs about **$0.03** total.

### Tips for the cheapest runs

- Keep the default `links` mode unless you need the actual clip file.
- Batch songs with `queries` — one run start instead of many.
- 256 MB memory is enough for `links` mode; use 512 MB+ for `clip` mode.
- Leave the proxy off (default) — it's only a fallback.

### API usage

Like any Apify Actor, you can run it via the API and read the dataset items
from the run — see the **API** tab above for ready-made snippets in
JavaScript, Python, and curl.

### Disclaimer

Audio content belongs to its respective rights holders. This Actor is a
technical tool intended for **personal use** (e.g., setting a ringtone from
music you have the right to use). You are responsible for complying with
applicable laws and terms of the content's rights holders.

# Actor input Schema

## `query` (type: `string`):

Song name to search for, or a supported song/album/playlist URL.

## `queries` (type: `array`):

Optional list of additional songs or URLs to process in the same run. Batching is cheaper than one run per song.

## `maxResults` (type: `integer`):

How many songs to resolve per query (search returns the top matches; albums/playlists are truncated to this count).

## `mode` (type: `string`):

`links` returns metadata + direct audio links only (fastest, cheapest). `clip` additionally generates a trimmed ringtone file with a download link.

## `bitrate` (type: `string`):

Quality of the resolved audio link (and clip source).

## `includeLyrics` (type: `boolean`):

Fetch lyrics when available (charged as a separate event).

## `clipStart` (type: `integer`):

Where in the song the ringtone starts.

## `clipLength` (type: `integer`):

Ringtone duration.

## `fadeIn` (type: `integer`):

Fade-in duration at the start of the clip. 0 disables it.

## `fadeOut` (type: `integer`):

Fade-out duration at the end of the clip. 0 disables it.

## `format` (type: `string`):

MP3 works everywhere; M4R is the iPhone ringtone format.

## `proxy` (type: `object`):

Only enable if audio resolution fails from datacenter IPs. Off by default to keep runs cheap.

## Actor input object example

```json
{
  "query": "Believer",
  "maxResults": 5,
  "mode": "links",
  "bitrate": "high",
  "includeLyrics": false,
  "clipStart": 0,
  "clipLength": 30,
  "fadeIn": 1,
  "fadeOut": 2,
  "format": "mp3",
  "proxy": {
    "useApifyProxy": false
  }
}
```

# 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 = {
    "query": "Believer"
};

// Run the Actor and wait for it to finish
const run = await client.actor("mahidhar/ringtone-maker").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 = { "query": "Believer" }

# Run the Actor and wait for it to finish
run = client.actor("mahidhar/ringtone-maker").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 '{
  "query": "Believer"
}' |
apify call mahidhar/ringtone-maker --silent --output-dataset

```

## MCP server setup

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

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/Qr7DoGJW5SNpH7gec/builds/UODcdktbcKwQoNMA4/openapi.json
