# TurkStat Turkey Statistics Scraper (`acquistion-automation/turkstat-turkey-statistics-scraper`) Actor

Collects official statistical datasets from the Turkish Statistical Institute (TÜİK) by category ID. Returns each dataset as a flat row in Turkish or English.

- **URL**: https://apify.com/acquistion-automation/turkstat-turkey-statistics-scraper.md
- **Developed by:** [Acquisition Automation Co.](https://apify.com/acquistion-automation) (community)
- **Categories:** Automation, Integrations
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $7.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.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

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

### TurkStat Turkey Statistics Scraper

**Scrape official Turkish statistics from TurkStat, the national data institute.** Collect datasets by category, in Turkish or English, with a single API call. Export structured tables to CSV, JSON, Excel, or XML.

TurkStat publishes Turkey's official economic, demographic, and social data, but its web portal requires manual browsing and downloads. This Actor reads the public data API directly, letting you pull any statistical dataset by its category ID. You get the raw numbers in a clean, flat schema without clicking through menus or writing custom parsers.

| Who uses it | What they scrape TurkStat for |
|---|---|
| Economists | Pull inflation, GDP, and employment figures for reports and models. |
| Market researchers | Gather demographic and household consumption data for market sizing. |
| Data journalists | Obtain official population, health, or education statistics for news stories. |
| Academic researchers | Collect longitudinal datasets for social science and policy analysis. |

### What it does

This Actor collects statistical datasets from the Turkish Statistical Institute by category ID and returns each dataset as a structured row.

- 🌐 **Bilingual output:** fetch data in Turkish or English with one language selector.
- 📂 **Category-driven:** provide a numeric category ID to target a specific statistical domain, or leave it empty to list all available categories.
- 📊 **Scalable collection:** set a maximum number of datasets per run, from a single table up to one million.

Results export to CSV, JSON, Excel, or XML, or straight from the API.

### What you can do with TurkStat data

**📈 Monitor economic indicators.**

An economist runs the Actor daily on the inflation and trade balance categories to feed a forecasting dashboard.

**🏘️ Size a consumer market.**

A market researcher pulls regional population and income statistics to estimate the addressable market for a new product launch.

**📰 Fact-check a story with official data.**

A journalist scrapes the latest employment and education figures to back a feature on youth unemployment trends.

**🎓 Build a research dataset.**

A PhD candidate collects ten years of agricultural production data by province for a panel regression study.

### Why choose this scraper

|  | What you get |
|---|---|
| **Official source** | Data comes directly from the Turkish Statistical Institute, the country's primary data authority. |
| **No manual downloads** | Skip the web portal. Get datasets programmatically in one fixed schema. |
| **Bilingual access** | Retrieve table labels and metadata in Turkish or English. |
| **Structured output** | Every dataset arrives as a flat row, ready for analysis or storage. |

### How it compares

No other Store actor targets TurkStat the same way, so the honest comparison is with the alternatives teams actually weigh.

| | TurkStat Turkey Statistics Scraper | Build it in-house | By hand |
|---|---|---|---|
| Setup | Run it now, zero config | Days of engineering | None, but hours per pull |
| When TurkStat changes | Maintained for you | You fix it | You re-learn the page |
| Proxies, retries, anti-bot | Built in | Your problem | Browser only |
| Output | Fixed JSON schema, CSV/Excel export | Whatever you build | Copy-paste |
| Cost | Pay per result | Engineering time | Analyst hours |

### Configure the run

Drive the Actor with a TurkStat category ID and a language choice. The max items limit caps how many datasets are returned in one run. The Input tab lists every parameter.

A first run with the defaults:

```json
{
  "language": "en",
  "maxItems": 10
}
```

A larger pull:

```json
{
  "language": "en",
  "maxItems": 200
}
```

### Pricing

Pay-per-result: **$0.0085 per result** collected. You pay only for the results written to your dataset.

| Results collected | Approximate cost |
|---|---|
| 100 results | $0.85 |
| 1,000 results | $8.50 |
| 10,000 results | $85.00 |

New Apify accounts start with $5 in free credit.

### Free users

Free-plan runs return up to 10 results as a preview. [Upgrade your Apify plan](https://console.apify.com/sign-up) to collect up to 1,000,000 results per run.

### Run it

1. [Create a free Apify account with $5 in credit](https://console.apify.com/sign-up).
2. Open the [TurkStat Turkey Statistics Scraper](https://apify.com/acquistion-automation/turkstat-turkey-statistics-scraper).
3. Set your inputs and any filters, then click **Start**.
4. Export the results as CSV, Excel, JSON, or XML from the **Dataset** tab.

Run it programmatically through the [Apify API](https://docs.apify.com/api/v2) (`run-sync-get-dataset-items`) or the [ApifyClient](https://docs.apify.com/api/client/js) for JavaScript and Python.

### Use with AI agents (MCP)

Give an AI agent live access to TurkStat through the Model Context Protocol. Add the Actor to Claude, Cursor, or any MCP client:

```bash
claude mcp add --transport http apify "https://mcp.apify.com?tools=acquistion-automation/turkstat-turkey-statistics-scraper"
```

Then prompt it in plain language to run the scraper and read back the results.

### Troubleshooting

**Why am I getting no results?**

First, run the Actor without a category ID to get the current category tree. Verify your target category ID exists and is spelled correctly. Also check that maxItems is set to a number greater than zero.

**The data is in Turkish but I selected English.**

Not all datasets have full English translations. The Actor requests English metadata, but TurkStat may fall back to Turkish for some tables. Try a different category or check the raw response.

**I hit the maxItems limit but I need more data.**

Increase the maxItems input up to 1,000,000. If you need more, run the Actor multiple times with different category IDs or use Apify's incremental runs.

**The run times out or takes too long.**

Large categories with many sub-tables can take time. Lower maxItems to fetch fewer datasets per run, or target a more specific sub-category ID.

**I don't know which category ID to use.**

Run the Actor once with no category ID. The output will be a list of all top-level categories and their IDs. You can then drill down by using a returned ID as the input for the next run.

### FAQ

| Question | Answer |
|---|---|
| Do I need an API key from TurkStat? | No. This Actor reads the same public endpoints the TurkStat website uses, so no registration or key is required. |
| How do I find the right category ID? | Run the Actor once without a category ID. It will return the full category tree with names and IDs so you can pick the one you need. |
| Can I get the data in English? | Yes. Set the language input to 'en'. The dataset labels and metadata will be returned in English when available. |
| What format is the output? | The Actor returns each dataset as a flat row. You can export the full run to CSV, JSON, Excel, or XML from the Apify dataset tab. |
| Is historical data available? | The Actor returns whatever datasets TurkStat currently serves for a given category. Many categories include multi-year time series. |
| How many datasets can I collect in one run? | You control this with the maxItems setting. The default is 10, and the upper limit is one million per run. |
| Does this cover all TurkStat data? | It covers every statistical domain that TurkStat exposes through its public data API, which includes the vast majority of their published tables. |
| Can I schedule this to run automatically? | Yes. Use Apify's scheduler to run the Actor daily, weekly, or monthly and keep your datasets up to date. |
| What if a category returns no data? | Some categories may be empty or deprecated. Try the category tree first to confirm the ID is current and contains datasets. |

🆘 **Need help?** Open an issue in the Issues tab of this Actor with your run ID, your input, and what you expected.

⚠️ **Disclaimer.** This Actor is unofficial and is not affiliated with, endorsed by, or sponsored by Turkish Statistical Institute. It collects only publicly available data. You are responsible for using the collected data in compliance with the source's terms of service and applicable data-protection laws, including GDPR, CCPA, and PIPL. Do not use it to collect personal data unlawfully.

# Actor input Schema

## `categoryId` (type: `integer`):

TurkStat category ID. Leave empty to fetch the top-level category tree.

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

Language code for the response.

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

Maximum number of datasets to collect per run.

## Actor input object example

```json
{
  "language": "en",
  "maxItems": 10
}
```

# 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 = {
    "language": "en",
    "maxItems": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("acquistion-automation/turkstat-turkey-statistics-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 = {
    "language": "en",
    "maxItems": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("acquistion-automation/turkstat-turkey-statistics-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 '{
  "language": "en",
  "maxItems": 10
}' |
apify call acquistion-automation/turkstat-turkey-statistics-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,acquistion-automation/turkstat-turkey-statistics-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/BhJfv5dK7Ia4KnJc5/builds/7SHYQH5PFnk7TL37f/openapi.json
