# Threads API

> Teaches AI assistants Meta's Threads API: write, review and debug integration code, post/reply/pull insights on your own account, and embed Threads posts.

Threads API is a free AI agent skill on Agensi by 天蠍喵喵, in APIs & Backend. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: Free
- Creator: [天蠍喵喵](https://www.agensi.io/creators/scorpio-meow)
- Category: [APIs & Backend](https://www.agensi.io/skills/apis-backend)
- Uses: 7
- Version: 1.7
- Last updated: 2026-11-27
- Security: scan passed (2026-11-27); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/threads-api
- Tags: api, social-media, automation, coding, meta, oembed

## About this skill

Playbook for Meta's Threads API, distilled from the official docs (changelog through 2026-08-18), with some behavior checked against the live API. It covers three jobs:

- **Build**: write, review and debug code that calls the Threads API, following your project's existing stack (Node/TypeScript, Python, C#, Go and more).
- **Operate**: post, reply, repost, delete, hide replies and pull insights on your own Threads account. Anything public or destructive waits for your explicit yes.
- **Embed**: show Threads posts on a website with oEmbed and embed.js, keep pages with many embeds from getting rate-limited, and add "share to Threads" buttons with Web Intents.

### What it gets right

- The two-step publish flow (create a container, wait for `FINISHED`, then publish), container IDs vs media IDs, and the 24-hour container expiry
- Write vs read enums (`TEXT` vs `TEXT_POST`, `reply_control` vs `reply_audience`)
- Local checks before spending quota: the 500-character limit with emoji counted as UTF-8 bytes, the 5-link limit, and ghost-post and poll conflicts
- OAuth, long-lived token refresh and the 90-day permission grant, plus checking what a user granted with `debug_token` and your app token (no tester needed)
- Quotas, webhooks (including repeat deliveries of the same event), and the official doc examples that are broken and shouldn't be copied
- Statements come from Meta's docs unless tagged *(practice)* or *(observed)*

### Tested

In round 7 of the benchmark (all 10 tasks, same model, no web access for either setup), the answers with the skill passed all 77 checklist items; without it, the average pass rate was 77%. Rounds 8–10 focused on embedding (tasks 6, 11, 12 and 13) after section 11 was rewritten for 1.5: with the skill every check passed (24/24, 27/27 and 17/17); without it, the average pass rates were 42%, 41% and 54%. Each task ran once per setup, so read the numbers as a direction, not proof. Details: https://github.com/Scorpio-meow/Threads-skill/blob/main/evals/BENCHMARK_en.md

### Requirements

- Build and Embed: nothing beyond your agent.
- Operate: Python 3.8+ (standard library only), HTTPS access to graph.threads.net, and a Threads user access token in `THREADS_ACCESS_TOKEN` or a `.env` file. Installed from Agensi, the bundled client isn't saved to your machine; your agent fetches `scripts/threads_client.py` and runs it from standard input.

Open source under MIT: https://github.com/Scorpio-meow/Threads-skill
Project site with the benchmark and an in-browser "check before you send" tool: https://scorpio-meow.github.io/Threads-skill/

Not an official Meta project.

## Requires

- Optional: Python 3.8+

Python is only for Operate mode and needs just the standard library.

## Known limitations

- The bundled client has been tested against a mock API only; it hasn't posted to a real account yet.
- Benchmarks were run on Claude only. Other SKILL.md agents should follow the same flow, but that isn't verified.
- Operate mode needs an agent that can run terminal commands with network access to graph.threads.net. Sandboxes that only reach package registries (such as the Claude apps by default) get a ready-to-run command to execute on your own machine instead.
- Installed from Agensi, the bundled client isn't on disk, so the agent fetches `scripts/threads_client.py` and feeds it to Python on standard input. That path hasn't been benchmarked yet; for regular Operate use, install from GitHub instead.
- Where Meta's docs contradict themselves or are unclear (location search `q` vs `query`, how ghost posts treat unsupported features, whether webhooks need App Review), the skill says so instead of guessing.
- embed.js behavior (3 embeds at a time, `instgrm.Embeds.process()`, `data-theme`) is undocumented, observed in October 2026, and may change.
- Docs snapshot: changelog through 2026-08-18. Threads ads (Marketing API) are out of scope.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the Threads API skill from Agensi" and describe your task.
3. Your agent loads the skill from Agensi when it needs it. Nothing is downloaded.

## Frequently asked questions

### What does Threads API do?

Teaches AI assistants Meta's Threads API: write, review and debug integration code, post/reply/pull insights on your own account, and embed Threads posts.

### Which AI agents support Threads API?

This skill uses the open SKILL.md standard. Use it through an MCP-compatible agent connected to Agensi, and check the compatibility information on this page for confirmed agents and required capabilities.

### How do I use Threads API?

Connect your AI agent to Agensi through MCP, then ask it to use Threads API on your task. Your agent loads the latest approved version each time. Paid skills require a purchase or active subscription. Skill files are not available for download; your licence does not allow you to save, copy or export any part of a skill.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
