# Mamikos Kos Scraper (`hvd20xx/mamikos-kos-scraper`) Actor

Scrape kos (boarding house) listings from Mamikos, Indonesia's kos marketplace: monthly price in IDR, kos type (putra/putri/campur), city and area, facilities, bathroom type, photo, rating and reviews. Uses Mamikos' public per-city sitemaps. Kos only.

- **URL**: https://apify.com/hvd20xx/mamikos-kos-scraper.md
- **Developed by:** [Nur Hadhi Sucipto](https://apify.com/hvd20xx) (community)
- **Features:** Limited permissions
- **Stats:** 3 total users, 2 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$2.50 / 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

## Mamikos Kos Scraper

Scrape kos (boarding house) listings from [Mamikos](https://mamikos.com), an
Indonesian kos marketplace. For each listing you get the monthly rent in IDR,
the kos type (putra / putri / campur), city and area, facilities, bathroom
type, main photo, rating, and review count, delivered as a clean dataset.

Typical uses: tracking kos prices per city or campus area, comparing listings
before renting, and building local datasets of the Indonesian boarding-house
market.

### How it works

Mamikos does not offer a public search API, so this Actor uses the public
routes that exist:

1. It reads listing URLs from Mamikos' official per-city sitemaps
   (`sitemap-room-kost-<city>-<n>.xml`).
2. It opens each listing page with plain HTTP requests (no headless browser),
   one at a time with a short delay, and retries failed pages up to 3 times.
3. It parses the structured listing data embedded in each page and pushes one
   record per listing to the dataset.

### Input

| Field | Type | Default | Description |
|---|---|---|---|
| `city` | string (enum) | `depok` | City whose sitemap is scraped: bali, balikpapan, bandung, bekasi, bogor, depok, jakarta, jogja, makassar, medan, other, padang, palembang, solo, surabaya, tangerang. Ignored when `startUrls` is set. |
| `maxResults` | integer | `100` | Maximum number of listings to return (1–5000). Listings are collected in sitemap order. |
| `kosType` | string (enum) | `all` | Filter by kos type: `all`, `putra` (male), `putri` (female), `campur` (mixed). |
| `minPriceIdr` | integer | – | Optional. Only return listings with monthly price at or above this amount (IDR). |
| `maxPriceIdr` | integer | – | Optional. Only return listings with monthly price at or below this amount (IDR). |
| `startUrls` | array | – | Optional. Specific Mamikos room URLs to scrape instead of a city sitemap. |

With filters on, the Actor may scan more pages than the number of results
returned, because filtering happens after a page is parsed.

### Output

One dataset item per listing:

| Field | Type | Description |
|---|---|---|
| `listing_id` | integer | Mamikos listing ID. |
| `slug` | string | Listing slug (last part of the URL). |
| `name` | string | Listing title, e.g. "Kost Cinere Inn Jl. Cinere Raya Depok". |
| `url` | string | Listing page URL. |
| `price_idr_per_month` | integer | Headline monthly rent in IDR, taken from the listing's structured monthly price field (separate from its daily/weekly/yearly prices). |
| `kos_type` | string | `putra` (male), `putri` (female), or `campur` (mixed). |
| `city` | string | City as listed by Mamikos, e.g. "Kota Depok". |
| `area` | string | Subdistrict / area, e.g. "Cinere". |
| `address` | string | Coarse address, usually subdistrict level (see Limitations). |
| `facilities` | array of strings | Facilities in Indonesian as listed by Mamikos (room, shared, bathroom, and parking facilities merged). |
| `bathroom` | string | `inside` (private bathroom) or `outside` (shared bathroom), when listed. |
| `main_photo_url` | string | URL of the listing's main photo. |
| `rating` | number or null | Average rating. `null` when the listing has no reviews yet. |
| `review_count` | integer | Number of reviews. |
| `scraped_at` | string | ISO 8601 timestamp of when the listing was scraped. |

#### Example output

```json
{
  "listing_id": 78349172,
  "slug": "kost-depok-kost-campur-eksklusif-kost-cinere-inn-jl-cinere-raya-depok-1",
  "name": "Kost Cinere Inn Jl. Cinere Raya Depok",
  "url": "https://mamikos.com/room/kost-depok-kost-campur-eksklusif-kost-cinere-inn-jl-cinere-raya-depok-1",
  "price_idr_per_month": 2100000,
  "kos_type": "campur",
  "city": "Kota Depok",
  "area": "Cinere",
  "address": "Cinere, Kota Depok, Indonesia",
  "facilities": ["Kasur", "Lemari / Storage", "TV", "AC", "Meja", "Kursi", "Kulkas", "WiFi", "Dapur", "CCTV", "K. Mandi Dalam", "Shower", "Parkir Mobil", "Parkir Motor"],
  "bathroom": "inside",
  "main_photo_url": "https://static.mamikos.com/uploads/cache/data/style/2017-07-25/NjWrk5z5-540x720.jpg",
  "rating": null,
  "review_count": 0,
  "scraped_at": "2026-11-18T15:12:58.577337+00:00"
}
```

(Facilities list shortened in this example; the real record carries the full
list. This listing has no reviews yet, so `rating` is null.)

### Pricing

This Actor is priced pay-per-event: **$0.0025 per result** — one result is
one listing pushed to the dataset, so 1,000 results cost $2.50, plus Apify
platform usage where applicable. The price is configured in the Apify Console
(Monetization tab) as an event named `result`; it is not set by any file in
this repository.

### Limitations

- **Coarse address.** Mamikos does not publish a full street address for most
  listings. The `address` field is usually only at subdistrict level, e.g.
  "Cinere, Kota Depok, Indonesia". Use `city` + `area` for grouping, not the
  address for navigation.
- **Headline price only.** `price_idr_per_month` is the listing's structured
  monthly price. Some listings mention variant prices in free text (for
  example a different price per floor); those variants are not captured.
- **Kos only.** Apartment listings on Mamikos are not covered.
- **Coverage follows the sitemaps.** Only cities present in Mamikos' kost
  sitemap index are available (see the `city` input). Listing order is
  sitemap order, not sorted by price or rating.
- **Data can change.** Prices, availability, and ratings are whatever Mamikos
  shows at scrape time.

# Actor input Schema

## `city` (type: `string`):

City whose Mamikos sitemap is scraped. Ignored when startUrls is provided.

## `kosType` (type: `string`):

Filter by kos type: all, putra (male), putri (female), or campur (mixed).

## `maxPriceIdr` (type: `integer`):

Optional. Only return listings whose monthly price is at most this amount, e.g. 2000000. Leave empty for no maximum.

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

Maximum number of listings to return. Listings are collected in sitemap order; with filters on, more pages may be scanned than results returned.

## `minPriceIdr` (type: `integer`):

Optional. Only return listings whose monthly price is at least this amount, e.g. 1000000. Leave empty for no minimum.

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

Optional list of specific Mamikos room URLs to scrape. When provided, the city sitemap is not used.

## Actor input object example

```json
{
  "city": "depok",
  "kosType": "all",
  "maxResults": 100,
  "startUrls": []
}
```

# Actor output Schema

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

Dataset containing all scraped kos listings

# 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": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("hvd20xx/mamikos-kos-scraper").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": [] }

# Run the Actor and wait for it to finish
run = client.actor("hvd20xx/mamikos-kos-scraper").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": []
}' |
apify call hvd20xx/mamikos-kos-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hvd20xx/mamikos-kos-scraper"
        }
    }
}
```

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/WhwGBWA5747chdOHw/builds/WxbeIrump6wmwBnAf/openapi.json
