Integrations
Dify Social Media Integration
Feed read-only public profiles, posts, comments, search hits, and YouTube transcripts directly into Dify Workflows, Chatflows, and Agents without installing a marketplace plugin. Connect over Dify's native HTTP Request node, single-operation OpenAPI Custom Tools, or remote Streamable HTTP MCP on both Dify Cloud and self-hosted Docker deployments.
- Read-only social intelligence — retrieves public JSON from Instagram, TikTok, YouTube, Reddit, X, and LinkedIn; does not publish or schedule posts.
- Three native connection paths — HTTP Request node for deterministic flows, scoped
/api-reference/{op}.openapi.jsonCustom Tools, or remote MCP athttps://socialmediascraper.org/mcp. - No Dify Marketplace plugin needed — works across Dify Cloud and self-hosted instances using standard outbound HTTPS requests.
- Flat $0.003 (3 credits) standard rate — pay per API request on one-time
$5,$20, or$50USD packs with zero recurring subscriptions.

instagram.profileMany Dify plugins focus on outbound publishing or require connecting your own brand accounts via Make or Zapier. Social Media Scraper handles the research side instead: structured, read-only public social records delivered directly to Dify LLM nodes, Code nodes, and Agent tools without a marketplace plugin.
- Verify your key with a profile lookup
- Store credentials in Dify Environment Variables
- Parse normalized JSON into your LLM node
Public Data Retrieval vs Dify Social Publishing Plugins
When Dify builders search for a social media integration, they usually want one of two opposite capabilities: scheduling outbound posts to owned brand accounts, or gathering live public social evidence for research, competitive briefs, and audience analysis. Mixing both inside a single credentialed plugin increases operational risk.
Social Media Scraper is strictly read-only. Your Dify app cannot accidentally publish a draft, send a direct message, delete a comment, or expose an Instagram Business OAuth session. Every call fetches normalized public JSON over HTTPS—giving LLM nodes concrete follower counts, captions, Reddit threads, or YouTube transcripts without adding Zapier or Make hops in between.
Because there is no published Dify Marketplace plugin to wait on or audit, you stay on standard Dify primitives that survive Dify version upgrades and work identically behind corporate firewalls on self-hosted Docker stacks.
Three Ways to Connect Dify Without a Marketplace Plugin
Pick the connection mode that matches your Dify app type—Chatflow/Workflow for deterministic pipelines, or Agent apps when an LLM decides which lookup to call.
| Dify connection path | Best Dify app type | Auth & schema pattern | Cost & reliability control |
|---|---|---|---|
| Native HTTP Request node | Workflow & Chatflow | x-api-key from Dify env vars + Idempotency-Key from a preceding Code node | Highest control; fixed call counts, explicit IF/ELSE status branching, works on every Dify release |
| Custom Tool (OpenAPI import) | Agent & Chatflow tools | Import one focused /api-reference/{platform}.{op}.openapi.json with API Key Header auth | Keeps tool schemas small so the LLM selects parameters accurately and cannot trigger unintended paid operations |
| Remote Streamable HTTP MCP | MCP-capable Dify versions | Point Dify Tools → MCP to https://socialmediascraper.org/mcp with Bearer token or OAuth | Exposes search_operations, get_operation quoting, and query with required max_price_usd |
For production customer-facing Chatflows, start with the HTTP Request node or a single-operation Custom Tool rather than giving an unconstrained Agent access to the full OpenAPI catalog. Scoped schemas cut prompt token overhead and stop agents from wandering into higher-rate endpoints.
Verified Social Operations for Dify Workflows
Every endpoint below runs at the standard $0.003 (3 credits) per request rate and returns normalized JSON that Dify's Code node or Parameter Extractor can parse cleanly. Each operation also publishes its own single-endpoint OpenAPI file for clean Custom Tool imports.
| Operation | Method & primary input | Scoped OpenAPI URL path | Dify workflow use |
|---|---|---|---|
| instagram.profile | GET · handle | /api-reference/instagram.profile.openapi.json | Creator bio, verification, and follower snapshot |
| instagram.posts | GET · handle, next_max_id | /api-reference/instagram.posts.openapi.json | Recent public post captions and engagement metrics |
| tiktok.profile | GET · handle or user_id | /api-reference/tiktok.profile.openapi.json | Account enrichment inside influencer intake apps |
| tiktok.comments | GET · url, cursor | /api-reference/tiktok.comments.openapi.json | Audience reactions and recurring product questions |
| youtube.transcript | GET · url, language | /api-reference/youtube.transcript.openapi.json | Full caption text for summary and Q&A Chatflows |
| reddit.search | GET · query, sort, after | /api-reference/reddit.search.openapi.json | Find public discussions mentioning a category or brand |
| reddit.post_comments_post | POST JSON · url, sort | /api-reference/reddit.post_comments_post.openapi.json | Pull structured comment threads via JSON body |
| linkedin.company | GET · url | /api-reference/linkedin.company.openapi.json | Company description and public profile lookup |
| twitter.search | GET · query, cursor | /api-reference/twitter.search.openapi.json | Recent public posts matching a topic or product query |
Step-by-Step Setup for Dify Social Media Workflows
Confirm your API key works against a single lightweight endpoint first, then transfer the exact headers into a Dify Workflow node or Custom Tool.
Step 1: Verify your key with a profile lookup
Run the starter cURL command below against
GET /v1/instagram/profilewithSOCIALSCRAPER_API_KEYset in your terminal. In production Dify nodes, pairx-api-keywith a per-requestIdempotency-Keyheader (8–128 ASCII characters) generated by a small Python or JavaScript Code node right before the HTTP Request.Step 2: Store credentials in Dify Environment Variables
Create a secret environment variable named
SOCIALSCRAPER_API_KEYin your Dify Workflow (or configure API Key Header auth with header namex-api-keywhen importing a single-operation Custom Tool OpenAPI JSON). Never hardcode keys inside prompt templates, system instructions, or visible Start inputs.Step 3: Parse normalized JSON into your LLM node
Check the HTTP status code with an
IF/ELSEbranch (status_code == 200), extract only the fields your prompt needs inside a Code node—keepingnullmetrics asnullrather than0—and pass the sanitized JSON snippet into the downstream LLM node wrapped in clear data delimiters.
curl --get "https://socialmediascraper.org/v1/instagram/profile" \
--header "x-api-key: $SOCIALSCRAPER_API_KEY" \
--data-urlencode "handle=jane"
Three Dify Workflow Blueprints You Can Assemble Today
Competitor Brief Chatflow
Accept a public Instagram handle in the Start node, generate two UUID keys in a Code node, call instagram.profile and instagram.posts in parallel HTTP Request nodes, and let an LLM node produce a positioning brief citing exact post URLs and non-null metrics.
YouTube Transcript Summarizer
Take a public watch URL, call youtube.transcript with cache_max_age=7d, branch on whether data.text is non-empty, and pass the caption string to a structured-output LLM node that returns key arguments, caveats, and a link to data.source_url.
Reddit Customer Voice Workflow
Run reddit.search for a product keyword, slice the top 3 thread URLs in a Code node, iterate over those URLs with POST /v1/reddit/post_comments_post, and summarize recurring user pain points with direct thread citations.
Self-Hosted Dify Networking, Budgets, and Prompt Safety
Self-hosted Docker and outbound HTTPS
Self-hosted Dify requires zero inbound webhooks or public ingress to use Social Media Scraper. Only outbound HTTPS access to socialmediascraper.org is needed—if your Docker deployment runs ssrf_proxy with strict allowlists, permit socialmediascraper.org on port 443.
Budget guardrails inside Iteration nodes
Always slice arrays before a Dify Iteration node so an unexpected 100-item search response never triggers 100 downstream calls. Generate a fresh Idempotency-Key per loop item, turn off blind retries on HTTP 400/401/402, poll GET /v1/requests/{request_id} on 202, and respect Retry-After on 429.
Defending Dify prompts against injection
Public bios, captions, and Reddit comments are untrusted user-generated strings that can contain hostile instructions. Isolate scraped fields inside <social_data>...</social_data> tags and instruct the LLM node to analyze the block passively without executing embedded directives.
Teams That Get the Most from Dify Plus REST Social Data
Internal AI app builders
Ship self-service creator vetting or brand research tools inside Dify Studio without building a custom frontend or managing headless scrapers.
Competitive intelligence analysts
Standardize weekly account and thread reviews across Instagram, TikTok, LinkedIn, and Reddit inside repeatable Dify Workflows with clear per-run costs.
Voice-of-customer product teams
Extract real buyer questions from TikTok comments, YouTube transcripts, and Reddit threads to inform roadmap and documentation priorities.
Per-Request Cost Planning for Dify Applications
Billing is strictly per API request—each HTTP Request node execution or paginated cursor fetch counts as one request, separate from your Dify LLM token costs.
| Dify workflow run | Requests consumed | API spend (USD) |
|---|---|---|
Competitor Brief (instagram.profile + instagram.posts) | 2 standard requests | $0.006 |
50-video YouTube summary batch (youtube.transcript) | 50 standard requests | $0.15 |
| 100 Reddit searches + 300 comment threads | 400 standard requests | $1.20 |
| 1,000 standard Chatflow lookups | 1,000 standard requests | $3.00 |
Note that a few specialized operations carry higher per-request prices—for example instagram.post and tiktok.post at $0.028 (28 credits) and tiktok.user_audience at $0.073 (73 credits; 1,000 credits = $1)—so check live pricing before exposing an operation to an autonomous Agent. Signups include 100 starter credits ($0.10, ~33 standard calls), and you can top up via one-time $5 (5,000 credits, ~1,666 standard calls), $20 (20,000 credits, ~6,666), or $50 (50,000 credits, ~16,666) USD packs with no recurring billing.
Platform Limits and Compliance Checklist
- No write actions: The API never posts content, replies to comments, sends messages, or edits social profiles.
- Public records only: Private profiles, login-walled groups, and deleted posts are unavailable; missing metrics appear as
null. - Account pacing: Default limits allow 60 accepted requests per minute and 5 concurrent in-flight calls; inspect live quotas before running wide parallel Dify branches.
- Verification and legal scope: Check service status and API documentation ahead of production rollout, and comply with source platform terms, copyright, and privacy rules for any retained outputs.
Dify Social Media Integration Questions
Is there a Social Media Scraper plugin in the Dify Marketplace?
No. You connect directly using Dify's built-in HTTP Request node, a Custom Tool created from a per-operation OpenAPI URL such as /api-reference/instagram.profile.openapi.json, or remote Streamable HTTP MCP at https://socialmediascraper.org/mcp on Dify versions that support it.
Can this Dify integration publish or schedule social media posts?
No. Social Media Scraper is read-only public data infrastructure. If your workflow also needs outbound posting, pair a dedicated publishing tool for write actions while keeping research lookups isolated on read-only credentials.
Should I use a Dify Agent app or a Chatflow/Workflow for social data?
Use a Workflow or Chatflow with HTTP Request nodes whenever the lookup sequence is known (such as profile + recent posts, or video URL → transcript → summary) because request counts, retries, and spend remain deterministic. Use a Dify Agent only when user questions span unpredictable platforms—and attach scoped single-operation tools or MCP with max_price_usd limits.
Does Social Media Scraper work with self-hosted Dify?
Yes. Self-hosted Docker and Kubernetes deployments connect over standard outbound HTTPS to https://socialmediascraper.org with no inbound webhook configuration. If you enforce egress filtering via ssrf_proxy, whitelist socialmediascraper.org.
Why import a single-operation OpenAPI file instead of the full openapi.json into Dify Custom Tools?
Importing one focused spec (like /api-reference/youtube.transcript.openapi.json) keeps the LLM tool definition compact, improves parameter selection accuracy, and guarantees the agent cannot accidentally invoke unrelated or higher-priced endpoints.
How do I generate an Idempotency-Key inside a Dify Workflow?
Add a lightweight Python Code node immediately upstream of the HTTP Request node that returns {'idempotency_key': str(uuid.uuid4())} (or a deterministic slug per workflow run + target ID), then bind that output variable to the Idempotency-Key request header.
Can Dify connect to Social Media Scraper through MCP?
On Dify releases that support remote Streamable HTTP MCP servers, configure https://socialmediascraper.org/mcp under Tools → MCP with Bearer token or OAuth authentication. For older Dify versions or strict step-by-step pipelines, REST HTTP Request nodes and OpenAPI Custom Tools work universally. See the MCP connection guide for full details.
Where should I store my API key in Dify?
Save SOCIALSCRAPER_API_KEY as a secret Environment Variable inside your Dify Workflow, or inside Custom Tool Header Authentication (x-api-key). Never paste keys into prompt text, Start form defaults, or shared chat logs.
What happens if a Dify Iteration node hits HTTP 429 or HTTP 202?
HTTP 429 indicates rate-limit throttling (default 60 req/min, 5 concurrent)—read the Retry-After header before retrying with the same Idempotency-Key. HTTP 202 means the lookup is still resolving; inspect GET /v1/requests/{request_id} rather than immediately firing a duplicate paid request.
How much does a typical Dify social research Chatflow cost?
Most lookups cost $0.003 (3 credits) per request ($3.00 per 1,000 requests). A Chatflow that fetches one profile plus one page of recent posts spends $0.006 per user run—meaning a $5 prepaid pack (5,000 credits) covers ~833 two-step runs.
How do I stop scraped comments or bios from hijacking my Dify LLM prompt?
Treat every field returned from social platforms as untrusted text. Wrap retrieved JSON or caption blocks inside explicit XML tags in your prompt template and instruct the model to ignore any commands or role changes appearing inside those tags.