# Teepublic Scraper (`excavator/teepublic-scraper`) Actor

This is the Actor for crawling data from the Teepublic product URLs.

- **URL**: https://apify.com/excavator/teepublic-scraper.md
- **Developed by:** [Excavator](https://apify.com/excavator) (community)
- **Categories:** E-commerce, Developer tools
- **Stats:** 40 total users, 0 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: 2.41 out of 5 stars

## Pricing

$5.00 / 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/platform/actors/running/actors-in-store#pay-per-event

## What's an Apify Actor?

Actors are web data automations that power AI and operations. They run on the Apify platform to scrape websites, process data, connect APIs, and automate workflows.
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.
Actors are written with capital "A".

## 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.
The best way to integrate Actors is as follows.

- **AI agents and MCP clients** — the [Apify MCP server](https://docs.apify.com/integrations/mcp.md) at `https://mcp.apify.com` (remote, streamable HTTP, OAuth on first use).
- **Agentic workflows and local Actor development** — [Agent Skills](https://apify.com/.well-known/agent-skills/index.json) with the [Apify CLI](https://docs.apify.com/cli/docs.md): `npm install -g apify-cli`, then `apify login`.
- **JavaScript/TypeScript projects** — the official [JS/TS client](https://docs.apify.com/api/client/js/docs.md): `npm install apify-client`.
- **Python projects** — the official [Python client](https://docs.apify.com/api/client/python/docs.md): `pip install apify-client`.
- **Any other language** — the [REST API](https://docs.apify.com/api/v2.md).

For usage examples, see the [API](#api) section below.

For more details, see Apify documentation as [Markdown index](https://docs.apify.com/llms.txt) and [Markdown full-text](https://docs.apify.com/llms-full.txt).

# README

## Teepublic Scraper

**Teepublic Scraper** is a lightweight and efficient service designed to extract product data from Teepublic URLs. This service is perfect for developers, marketers, and businesses seeking to automate data collection from Teepublic for analysis, inventory management, or market research.

### Features

- **Simple Input**: Provide a list of Teepublic product URLs to scrape.
- **Detailed Output**: Extracts product titles, prices, and all associated images.
- **Durable and Trustworthy**: The first and only service on Apify specifically designed for Teepublic product data scraping, ensuring reliability and robustness.

### Input Format

The input is a JSON object containing a list of Teepublic product URLs.

#### Example:

```json
{
  "urls": [
    "https://www.teepublic.com/t-shirt/12345678"
  ]
}
```

### Output Format

The output is a JSON array with the extracted product information, including the product title, image URLs, and price.
If you need additional data fields, please get in touch, and I will update the service accordingly.

#### Example:

```json
[
  {
    "title": "Funny Cat Meme T-Shirt - Perfect Gift for Cat Lovers",
    "images": [
      "https://images.teepublic.com/t-shirt-12345678-1.jpg",
      "https://images.teepublic.com/t-shirt-12345678-2.jpg",
      // Additional images here
    ],
    "price": "$20.00"
  }
]
```

### Better Memory Performance

By default, the service uses 4GB of memory. You can enable higher memory usage by adding a query parameter to the API URL.
For example, to increase the maximum to 32GB:

```
https://api.apify.com/v2/acts/excavator~teepublic-scraper/runs?token=<TOKEN>&memory=32768
```

By default, up to 10 URLs are processed simultaneously. You can increase this limit for faster processing, but it may require more memory. The chunk setting divides the list of URLs into smaller groups for processing. Larger chunks allow more URLs to be processed in parallel, but they can increase memory usage and risk slowdowns.

#### Example Configuration:

```json
{
  "urls": [
    "https://www.teepublic.com/t-shirt/12345678"
  ],
  "concurrency": 20,
  "chunk": 200
}
```

- `chunk`: 200 — The input URLs are divided into chunks of 200 URLs each, processed by multiple threads.
- `concurrency`: 20 — Within each chunk, up to 20 URLs are processed simultaneously.

#### Default Performance Metrics:

Processing 1,000 URLs typically takes ~60 seconds and uses ~4.4GB of memory. To handle more URLs at a time, you may need to increase your available RAM.

### Key Benefits

- Unique Solution: The first and only service on Apify dedicated to Teepublic product scraping.
- Highly Reliable: Built for durability and consistent performance.
- Easy to Use: Supports simple JSON input and output for seamless integration with your applications.

### Getting Started

- Prepare a JSON file containing the Teepublic product URLs you want to scrape.
- Use the service to process your input and extract product data.
- Receive a JSON array containing product titles, image URLs, and prices.

### Use Cases

- Market Research: Analyze trending products on Teepublic.
- Inventory Management: Automate data collection for your business needs.
- Data Enrichment: Enhance your existing product database with Teepublic product details

### Why Choose This Service?

Teepublic Scraper is the most durable and trustworthy service for Teepublic data scraping on Apify. Its robust architecture ensures accurate and efficient data extraction, making it the best solution for your scraping needs.

# Actor input Schema

## `urls` (type: `array`):

A list of website URLs from which data will be retrieved.

## `chunk` (type: `integer`):

The number of input items to divide into chunks for processing across multiple threads.

## `concurrency` (type: `integer`):

The maximum number of URLs processed simultaneously within a single chunk.

## Actor input object example

```json
{
  "urls": [
    "https://www.teepublic.com/t-shirt/59717992-i-love-sucking-dicks-with-my-butthole-black-funny"
  ],
  "chunk": 100,
  "concurrency": 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 = {
    "urls": [
        "https://www.teepublic.com/t-shirt/59717992-i-love-sucking-dicks-with-my-butthole-black-funny"
    ],
    "chunk": 100,
    "concurrency": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("excavator/teepublic-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 = {
    "urls": ["https://www.teepublic.com/t-shirt/59717992-i-love-sucking-dicks-with-my-butthole-black-funny"],
    "chunk": 100,
    "concurrency": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("excavator/teepublic-scraper").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print("💾 Check your data here: https://console.apify.com/storage/datasets/" + run["defaultDatasetId"])
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "urls": [
    "https://www.teepublic.com/t-shirt/59717992-i-love-sucking-dicks-with-my-butthole-black-funny"
  ],
  "chunk": 100,
  "concurrency": 10
}' |
apify call excavator/teepublic-scraper --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://mcp.apify.com/?tools=excavator/teepublic-scraper",
                "--header",
                "Authorization: Bearer <YOUR_API_TOKEN>"
            ]
        }
    }
}

```

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/9TFuCkjfpFOnvaGcf/builds/78Mbhalv2iFQ1qHxZ/openapi.json
