[KongchangAI]
· 3 min read· 1,591 words

Dify Plugin TubeText: Connect TikTok Shop and AliExpress Data

Dify Plugin TubeText: Connect TikTok Shop and AliExpress Data

TubeText fills Dify's e-commerce data and video transcription gap with four Apify-powered tools.

TubeText is an open-source Dify plugin that bridges LLM orchestration and real data entry points. It uses your own Apify token to power four tools: scraping US-site TikTok Shop product prices and inventory, keyword-searching AliExpress, transcribing YouTube and TikTok videos (with optional Whisper AI), and paginating long-task results via run ID. Setup takes three steps, the plugin only calls api.apify.com, and long tasks run async via Max Wait plus run ID. Pricing is pay-per-result; a full test round cost about $0.007.

Title

Dify Plugin TubeText: Connect TikTok Shop and AliExpress Data

Meta Description

Open-source Dify plugin TubeText brings TikTok Shop product data, AliExpress search, and video transcription—four tools in total—into your workflows. Built on Apify with pay-per-result pricing, it supports async long-running tasks and Agent invocation.

Article Content

Dify is mature when it comes to LLM orchestration, but the place where workflows actually stall out is often the data entry point: a product's real sales volume and inventory, AliExpress's live prices, what a video actually says. The open-source plugin TubeText, released by developer LMSlay, was built to fill exactly this gap—it wires four data tools into Dify, each running the corresponding Actor through your own Apify token and returning structured JSON.

Dify plugin TubeText integrates TikTok Shop, AliExpress, and video transcription tools

What the Four Tools Solve

TubeText provides four independently callable tools, covering two main tracks: e-commerce data and content transcription.

  • TikTok Shop Products: Input a product, shop, or category link (US site only) to get price, discounts, units sold, ratings, per-SKU inventory, and shop statistics.
  • AliExpress Search: Input up to 20 keywords to get price, sales volume, ratings, shipping country, Choice and promotional tags.
  • Video Transcript: Mixed input of YouTube and TikTok links, returning subtitles for each; with Whisper AI enabled, it can transcribe videos with no subtitles.
  • Get Run Results: Input a run ID to paginate the final results of longer-running tasks.

All four tools are powered by Apify Actors. The plugin itself only calls api.apify.com—it never logs into TikTok, AliExpress, or YouTube accounts, which is friendlier for teams concerned about account security.

What Apify and Actors Are

Apify is a cloud-based web scraping and automation platform where developers can package scraping logic for a given site into reusable "Actors" and publish them to the Apify store for others to invoke on a per-use basis. Each Actor encapsulates selectors, pagination, anti-bot bypass, and field cleanup details—callers only need to supply input parameters to get structured JSON output. TubeText is essentially an adapter layer: it translates Dify tool calls into the corresponding Actor requests, then formats the returned results into something Dify can consume. As a result, the plugin's scraping capability, field coverage, and stability actually depend on how well the underlying Actors are maintained, not the plugin itself. Using your own Apify token means quotas, billing, and call records all belong to your own account, and it's easier to troubleshoot the raw logs of a given run in the console.

Configuration in Two Minutes

The setup process is compressed into three steps: copy the API token from Settings → API & Integrations in the Apify console; install TubeText from the Dify Marketplace; paste the token in Tools → TubeText → Authorize. An incorrect token is rejected on the spot with a clear message, saving you from having to reverse-engineer configuration problems from subsequent call failures.

Why Use an API Token Instead of Account Login

An Apify token is a key bound to your account, used to authenticate on api.apify.com and trigger Actor runs. TubeText only ever communicates with this official API—it doesn't simulate logging into TikTok, AliExpress, or YouTube, so there's no need to store account passwords, handle two-factor verification, or trigger platform risk controls. For data scraping scenarios, this architecture narrows the risk surface down to a single thing: token leakage. As long as the token isn't exposed, the account itself won't be implicated. Conversely, it's worth noting that a token is effectively an operational credential for the account; once pasted into Dify, it should be managed as sensitive information. If you suspect a leak, you can reset it directly in the Apify console, and the old token becomes invalid immediately.

Practical Workflow 1: Break Down Any Video's Hook

The minimal viable workflow has only three nodes. Start receives a video_url input; TubeText → Video Transcript maps that variable to the Links field; the LLM node directly consumes the tool's returned text field—for example, with a prompt like "This is a short video transcript. Quote the opening sentence as the hook, list the selling points, and suggest a stronger hook."

The tool returns two parts of data: text is the plain text of all transcriptions concatenated, ready to feed directly to the LLM; json preserves structured entries, counts, and the ID and URL of each Apify run. In testing, a single call with one YouTube link and one TikTok link took 26 seconds, with the plugin splitting the links across the YouTube and TikTok Actors to run in parallel.

Practical Workflow 2: AliExpress Price Monitoring by Market

Add an AliExpress Search node, specify keywords, shipping country, and currency, and you're set. The original author tested with Germany / EUR, sorted by order volume, taking 3 results—one row per product, containing the price in that currency, sales volume, ratings, and shipping origin. This data can flow onward to an LLM node to generate a "price range and best-sellers" summary, or to a code node to filter products below a target price.

One detail is crucial for price research: AliExpress displays a lot of new-user-only discounts that ordinary buyers can't actually get. The tool flags these discounts and sponsored results and supports skipping them, preventing researchers from mistaking inflated discounts for market price.

How to Use It in Agent Applications

Once TubeText's tools are enabled in an agent application, each tool comes with its own description to help the model decide when to call it. Typical prompts the author lists include "Get the transcript of this TikTok and tell me what the hook is: [link]", "Find yoga mats between $5 and $20 on AliExpress, sorted by order volume", and "How many units did this TikTok Shop product sell, and which variant has the most inventory? [link]". It should be noted that the author only tested workflow mode on self-hosted Dify; agent mode hasn't been actually validated with model runs, so that's a single-source experience.

Long Tasks Don't Block Workflows

Each call waits up to 240 seconds (Max Wait) by default. If a task exceeds that limit—say, scraping an entire YouTube channel—the task keeps running on Apify, and the tool immediately returns a run ID. You then use the Get Run Results node to retrieve the data, with support for offset and limit pagination. The author validated with a 3-second Max Wait: the tool returned a RUNNING status and a run ID, and subsequently Get Run Results successfully retrieved the completed data. This async mechanism keeps long tasks from dragging down the entire workflow.

The Basic Pattern of Async Calls

Web scraping is highly unpredictable in duration: a product page might return in two seconds, or it might drag on for minutes due to retries or human verification. If a workflow waits synchronously, the whole chain gets stuck on a single slow task, and it might even hit Dify's timeout limit. The pattern TubeText uses is "downgrade to async on timeout"—if it finishes within Max Wait, it returns data on the spot; otherwise it immediately returns a run ID as a credential, leaving the time-consuming part running on Apify's cloud. The caller then polls for results using that ID, retrieving them in batches with offset and limit. This is a common approach for scraping-type integrations: trade one extra round trip for a stable response time in the workflow, at the cost of having to arrange the "fetch later" step yourself.

Cost Structure

The plugin is free and open source, with pay-per-result pricing through your own Apify account (the following are Apify free plan prices):

  • YouTube transcription $4 / 1,000 items, TikTok transcription $3 / 1,000 items, AI transcription $0.006 / minute and only billed when manually enabled
  • TikTok Shop: $4 / 1,000 products with full details
  • AliExpress: $2.50 / 1,000 products

Failed items aren't billed, and neither are delisted products or music-only TikToks. The Apify free plan comes with a monthly quota, and the author's entire round of testing all four tools cost roughly $0.007.

Boundaries to Know in Advance

There are three limitations worth noting before use: TikTok Shop only accepts links or product IDs, doesn't support keyword search, and covers only the US site; AliExpress returns search result data, not product detail page information or shop names; the plugin only communicates with the Apify API and doesn't involve logging into any platform account.

The source code and issue reporting entry point is at github.com/LMSlay/dify-plugin-tubetext. For developers who want to add real e-commerce data and video content to Dify workflows, this is a low-configuration-barrier, pay-as-you-go supplement.

One-line Summary

TubeText fills Dify's e-commerce data and video transcription gap with four Apify-powered tools.

Paragraph Summary

TubeText is an open-source plugin developed for Dify that bridges the gap between LLM orchestration and real data entry points. It uses your own Apify token to power four tools: scraping US-site TikTok Shop product prices and inventory, searching AliExpress products by keyword, transcribing YouTube and TikTok videos (with optional Whisper AI for content without subtitles), and paginating long-task results via run ID. Configuration takes just three steps, and the plugin only calls api.apify.com without logging into any target platform accounts. In testing, a single transcription mixing YouTube and TikTok links took 26 seconds, with two Actors running in parallel; long tasks are made async via Max Wait plus run ID without blocking the workflow. Pricing is pay-per-result, failed items and delisted products aren't billed, and a full round of testing all four tools cost about $0.007.

#Dify plugin#TubeText#TikTok Shop data#AliExpress search#video transcription#Apify Actors#LLM workflow
Share:

Related articles