# TikTok Shop Label (`excavator/tiktok-shop-label`) Actor

TikTok Shop order label link is only available for 2 hours. This Actor will help you store that label on our server forever and give you a download link that has never expired

- **URL**: https://apify.com/excavator/tiktok-shop-label.md
- **Developed by:** [Excavator](https://apify.com/excavator) (community)
- **Categories:** Automation, Developer tools, E-commerce
- **Features:** Full permissions
- **Stats:** 29 total users, 2 monthly users, 100.0% runs succeeded, 2 bookmarks
- **User rating**: No ratings yet

## Pricing

$5.00 / 1,000 urls

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

## TikTok Shop Product Crawler

TikTok Shop order label link is only available for 2 hours. This Actor will help you store that label on our server forever and give you a download link that has never expired.

### Features

- **Simple Input**: Provide a list of TikTok Shop order label URLs.
- **Detailed Output**: Return id of order, input url, and uploaded url.
- **Durable and Trustworthy**: The first and only service on Apify specifically designed for TikTok Shop product label uploading, ensuring reliability and robustness.

### Input Format

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

Example:

```json
{
  "urls": [
    "https://seller-us.tiktok.com/wsos_v2/oec_fulfillment_doc_tts/object/wsos6770a0fb692e0b2e?expire=1735520907&skipCookie=true&timeStamp=1735434507&sign=3928a1d01aaccfc974a749daf5022f1b5d7f42410941481629a9f8eeb7af8d5f"
  ]
}
```

### Output Format

The output is a JSON array with the extracted order id, including the input url and uploaded URLs.

Example:

```json
[
  {
    "id": "wsos6770a0fb692e0b2e",
    "input": "https://seller-us.tiktok.com/wsos_v2/oec_fulfillment_doc_tts/object/wsos6770a0fb692e0b2e?expire=1735520907&skipCookie=true&timeStamp=1735434507&sign=3928a1d01aaccfc974a749daf5022f1b5d7f42410941481629a9f8eeb7af8d5f",
    "output": "https://tiktok-label.s3.us-east-1.amazonaws.com/wsos6770a0fb692e0b2e.pdf"
  }
]
```

### Key Benefits

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

### Getting Started

1. Prepare a JSON file containing the TikTok Shop orders URLs you want to upload.
2. Use the service to process your input and extract product data.
3. Receive a JSON array containing the uploaded URLs.

### Use Cases

- Order processing: Process order to other system.
- Store label for long term: Store your label to forever and pay only once.
- Data Enrichment: Enhance your existing product database with TikTok Shop product details.

### Why Choose This Service?

This is the most durable and trustworthy service for TikTok Shop data crawling on Apify. Backed by a robust architecture, it ensures accurate and efficient data extraction.

# Actor input Schema

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

The URLs of orders label you would like to upload.

## Actor input object example

```json
{
  "urls": [
    "https://seller-us.tiktok.com/wsos_v2/oec_fulfillment_doc_tts/object/wsos6770a0fb692e0b2e?expire=1735520907&skipCookie=true&timeStamp=1735434507&sign=3928a1d01aaccfc974a749daf5022f1b5d7f42410941481629a9f8eeb7af8d5f"
  ]
}
```

# 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://seller-us.tiktok.com/wsos_v2/oec_fulfillment_doc_tts/object/wsos6770a0fb692e0b2e?expire=1735520907&skipCookie=true&timeStamp=1735434507&sign=3928a1d01aaccfc974a749daf5022f1b5d7f42410941481629a9f8eeb7af8d5f"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("excavator/tiktok-shop-label").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://seller-us.tiktok.com/wsos_v2/oec_fulfillment_doc_tts/object/wsos6770a0fb692e0b2e?expire=1735520907&skipCookie=true&timeStamp=1735434507&sign=3928a1d01aaccfc974a749daf5022f1b5d7f42410941481629a9f8eeb7af8d5f"] }

# Run the Actor and wait for it to finish
run = client.actor("excavator/tiktok-shop-label").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://seller-us.tiktok.com/wsos_v2/oec_fulfillment_doc_tts/object/wsos6770a0fb692e0b2e?expire=1735520907&skipCookie=true&timeStamp=1735434507&sign=3928a1d01aaccfc974a749daf5022f1b5d7f42410941481629a9f8eeb7af8d5f"
  ]
}' |
apify call excavator/tiktok-shop-label --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,excavator/tiktok-shop-label"
        }
    }
}
```

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/fKeqFIZaqF50gMtZc/builds/4NaDgwbCN6isoH3Pu/openapi.json
