# Letgo.com Scraper - Products & Categories (`voyn/letgo-scraper`) Actor

Scrape Letgo product or category pages. Auto-detects URL type, infinite-scrolls lists, and extracts title, price (TL), description, posted date, location, gallery images, seller info, and specs.

- **URL**: https://apify.com/voyn/letgo-scraper.md
- **Developed by:** [Voyn Software](https://apify.com/voyn) (community)
- **Categories:** E-commerce, Automation, Other
- **Security:** Full permissions
- **Stats:** 4 total users, 0 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 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

## Letgo.com Scraper (Apify + Playwright)

A production-ready **Letgo.com scraper** that extracts listing details from **Letgo** product pages and search/category pages. This Actor does **not** rely on any official **Letgo API** (none is publicly provided); instead, it automates a headless browser to collect data reliably. Throughout this README we’ll refer to it generically as a **Letgo scraper / Letgo.com scraper** and sometimes “Letgo API” or “Letgo.com API” as shorthand for the data the Actor produces.

***

### What it does

- Accepts **either**:
  - **Product URL** (e.g., `https://www.letgo.com/item/...`) → scrapes that single item
  - **List/Search/Category URL** (e.g., `https://www.letgo.com/telefon_c15000?...`) → opens the page, **infinite-scrolls**, collects product links, then visits each one (up to `maxItems`)
- Extracts **clean, structured data**:
  - `title`
  - `url` (product page link)
  - `price` (numeric)
  - `priceText` (original text, e.g. `39.500 TL`)
  - `currency` (always `"TL"`)
  - `description` (from JSON-LD or inline page data)
  - `location`
  - `postedAt` (e.g., `10 Eki 2025`)
  - `images` (from product thumbnail gallery only)
  - `sellerName` (from the visible seller section)
  - `sellerProfileUrl` (absolute URL)
  - **İlan Özellikleri**:
    - `ilanOzellikleri` (object with label → value)
    - **Flattened columns** with `attr_` prefix, e.g. `attr_ilan_no`, `attr_model`, `attr_hafiza`, `attr_renk`, `attr_pil_sagligi_pct`, `attr_garanti`, `attr_durum`

> The Actor includes **Unicode normalization** and forced **Turkish language headers** so characters like `Ç, Ş, İ, ğ, ü` are preserved (avoids “??” corruption when exporting).

***

### Example Input

```json
{
  "title": "Letgo Scraper",
  "type": "object",
  "schemaVersion": 1,
  "properties": {
    "startUrls": {
      "title": "Start URLs (list or product)",
      "type": "array",
      "description": "List of Letgo URLs to start from. Each URL can be a search/category page or a direct product page.",
      "editor": "requestListSources",
      "prefill": [
        { "url": "https://www.letgo.com/telefon_c15000?son=24-saat" }
      ]
    },
    "maxItems": {
      "title": "Max items",
      "type": "integer",
      "description": "Maximum number of products to scrape across all pages.",
      "minimum": 1,
      "default": 50
    },
    "proxyConfiguration": {
      "title": "Proxy configuration",
      "type": "object",
      "description": "Proxy settings if you want to run via Apify Proxy or your own proxy.",
      "editor": "proxy"
    }
  },
  "required": ["startUrls"]
}
```

### Example Output

```json
    {
    "title": "İphone 14 Pro Max 256 GB - 15 Ay Garantili TR Cihazı | Türkiye'deki İkinci El Eşyaları Al & Sat - Letgo",
    "url": "https://www.letgo.com/item/iphone-14-pro-max-256-gb---15-ay-garantili-tr-cihaz-iid-1718301401",
    "price": 44500,
    "priceText": "44.500 TL",
    "currency": "TL",
    "categoryPath": "Telefon,iPhone iOS Telefon",
    "description": "⭐ O5O1 535 69 O2 ⭐ Cihaz Tertemiz - Tamir Görmemiş - Çalışmayan Bir Akşamı Yok - Teknosa'dan Alınmış 15 Ay Daha Garantisş Var - TAKAS YOK",
    "location": "İstanbul, Türkiye",
    "postedAt": "10 Eki 2025",
    "images": [
      "https://imvm.letgo.com/v1/files/f42f1b89126e4-OLXAUTOTR/image;s=100x100",
      "https://imvm.letgo.com/v1/files/28ace67c28414-OLXAUTOTR/image;s=100x100"
    ],
    "sellerName": "XXXX XXXX",
    "sellerProfileUrl": "https://www.letgo.com/profil/00000000",
    "ilanOzellikleri": {
      "İlan No": "1718301401",
      "Model": "iPhone 14 Pro Max",
      "Hafıza": "256 GB",
      "Renk": "Mor",
      "Pil Sağlığı (%)": "%100 - %90 (Çok İyi)",
      "Garanti": "Distribütör Garantili",
      "Durum": "Yeni"
    },
    "attr_ilan_no": "1718301401",
    "attr_model": "iPhone 14 Pro Max",
    "attr_hafiza": "256 GB",
    "attr_renk": "Mor",
    "attr_pil_sagligi_pct": "%100 - %90 (Çok İyi)",
    "attr_garanti": "Distribütör Garantili",
    "attr_durum": "Yeni"
  }
```

# Actor input Schema

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

List of Letgo URLs to start from. Each URL can be a search/category page or a direct product page.

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

Maximum number of products to scrape across all pages.

## `proxyConfiguration` (type: `object`):

Proxy settings (only used if Use Apify Proxy is enabled).

## Actor input object example

```json
{
  "startUrls": [
    {
      "url": "https://www.letgo.com/telefon_c15000?son=24-saat"
    }
  ],
  "maxItems": 10
}
```

# 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://www.letgo.com/telefon_c15000?son=24-saat"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("voyn/letgo-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": [{ "url": "https://www.letgo.com/telefon_c15000?son=24-saat" }] }

# Run the Actor and wait for it to finish
run = client.actor("voyn/letgo-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": [
    {
      "url": "https://www.letgo.com/telefon_c15000?son=24-saat"
    }
  ]
}' |
apify call voyn/letgo-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,voyn/letgo-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/vK7GA0NwP1ChtYjOt/builds/2X8IrI78WmvyTrYXd/openapi.json
