# 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:** 46 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/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

## 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(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 '{
  "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": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,excavator/teepublic-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/9TFuCkjfpFOnvaGcf/builds/78Mbhalv2iFQ1qHxZ/openapi.json
