# AI Agent Integration (/docs/ai-agents) AI Agent Integration [#ai-agent-integration] SocialCrawl is designed to be consumed by AI agents. When an endpoint supports a computed field and the required source inputs are present, its response includes that optional field for downstream reasoning. Depending on the endpoint, these fields can include `engagement_rate`, `language`, `content_category`, and `estimated_reach`. The entire 395-endpoint catalogue is published as machine-readable llms.txt and OpenAPI files. If you're using Claude Code, Cursor, Windsurf, Claude Desktop, or any other MCP-compatible client, install the [Skills or MCP package](/docs/skills-and-mcp.md) for a one-line setup — your agent gets local schema validation, zero-credit discovery tools, and direct access to every bundled endpoint without plumbing any HTTP yourself. For a full walkthrough of the tools and one-line install commands, see the [MCP server for social media data](/mcp-server) page. How do AI agents discover SocialCrawl? [#how-do-ai-agents-discover-socialcrawl] We provide machine-readable documentation at: * **[/llms.txt](/llms.txt)** — Compact overview of the API * **[/llms-full.txt](/llms-full.txt)** — Complete self-contained reference, including the `GET /v1/credits/balance` meta endpoint, idempotency semantics, `oneOf` parameter constraints, and all error codes * **[/llms.json](/llms.json)** — Machine-readable catalog (per-platform endpoint counts, auth, credit tiers, response envelope), generated from the live registry * **[/agents.txt](/agents.txt)** — AI agent access file: capabilities, quick start, and crawl guidance in one place Point your AI agent at `/llms-full.txt` for everything it needs to use the API. How do I read a docs page as Markdown? [#how-do-i-read-a-docs-page-as-markdown] Append `.md` to any docs URL (the DataFast / Fumadocs convention): * `/docs` → [`/docs.md`](/docs.md) * `/docs/quickstart` → [`/docs/quickstart.md`](/docs/quickstart.md) * `/docs/api-reference` → [`/docs/api-reference.md`](/docs/api-reference.md) You can also send `Accept: text/markdown` on the HTML URL. Every docs page has an "AI agent or LLM? Read this page as markdown" link that points at the same twin. Twins are `text/plain`, `X-Robots-Tag: noindex`, and listed in [`/sitemaps/llm.xml`](/sitemaps/llm.xml). How can agents use the OpenAPI specification? [#how-can-agents-use-the-openapi-specification] The full OpenAPI 3.1 specification is available at: * **[/v1/openapi.json](/v1/openapi.json)** — JSON format * **[/v1/openapi.yaml](/v1/openapi.yaml)** — YAML format What per-platform documentation is available? [#what-per-platform-documentation-is-available] Fetch only the endpoints you need — one file per platform, one per active platform on the API: | Platform | Reference File | | ---------------- | ---------------------------------------------------------- | | TikTok | [`/llms-tiktok.txt`](/llms-tiktok.txt) | | Instagram | [`/llms-instagram.txt`](/llms-instagram.txt) | | YouTube | [`/llms-youtube.txt`](/llms-youtube.txt) | | Facebook | [`/llms-facebook.txt`](/llms-facebook.txt) | | Twitter/X | [`/llms-twitter.txt`](/llms-twitter.txt) | | LinkedIn | [`/llms-linkedin.txt`](/llms-linkedin.txt) | | Reddit | [`/llms-reddit.txt`](/llms-reddit.txt) | | Threads | [`/llms-threads.txt`](/llms-threads.txt) | | Bluesky | [`/llms-bluesky.txt`](/llms-bluesky.txt) | | Pinterest | [`/llms-pinterest.txt`](/llms-pinterest.txt) | | Snapchat | [`/llms-snapchat.txt`](/llms-snapchat.txt) | | Truth Social | [`/llms-truthsocial.txt`](/llms-truthsocial.txt) | | Twitch | [`/llms-twitch.txt`](/llms-twitch.txt) | | Kick | [`/llms-kick.txt`](/llms-kick.txt) | | Rumble | [`/llms-rumble.txt`](/llms-rumble.txt) | | Kwai | [`/llms-kwai.txt`](/llms-kwai.txt) | | Spotify | [`/llms-spotify.txt`](/llms-spotify.txt) | | GitHub | [`/llms-github.txt`](/llms-github.txt) | | Hacker News | [`/llms-hackernews.txt`](/llms-hackernews.txt) | | Naver | [`/llms-naver.txt`](/llms-naver.txt) | | Polymarket | [`/llms-polymarket.txt`](/llms-polymarket.txt) | | Amazon | [`/llms-amazon.txt`](/llms-amazon.txt) | | Walmart | [`/llms-walmart.txt`](/llms-walmart.txt) | | Target | [`/llms-target.txt`](/llms-target.txt) | | eBay | [`/llms-ebay.txt`](/llms-ebay.txt) | | Home Depot | [`/llms-home_depot.txt`](/llms-home_depot.txt) | | TikTok Shop | [`/llms-tiktokshop.txt`](/llms-tiktokshop.txt) | | Google Shopping | [`/llms-google_shopping.txt`](/llms-google_shopping.txt) | | Google Play | [`/llms-google_play.txt`](/llms-google_play.txt) | | Apple App Store | [`/llms-app_store.txt`](/llms-app_store.txt) | | Trustpilot | [`/llms-trustpilot.txt`](/llms-trustpilot.txt) | | Tripadvisor | [`/llms-tripadvisor.txt`](/llms-tripadvisor.txt) | | Google | [`/llms-google.txt`](/llms-google.txt) | | Google News | [`/llms-google_news.txt`](/llms-google_news.txt) | | Google Finance | [`/llms-google_finance.txt`](/llms-google_finance.txt) | | Google Trends | [`/llms-google_trends.txt`](/llms-google_trends.txt) | | Perplexity | [`/llms-perplexity.txt`](/llms-perplexity.txt) | | Tavily | [`/llms-tavily.txt`](/llms-tavily.txt) | | Web Scraping | [`/llms-web.txt`](/llms-web.txt) | | Content Analysis | [`/llms-content_analysis.txt`](/llms-content_analysis.txt) | | Universal Search | [`/llms-search.txt`](/llms-search.txt) | | Prism composites | [`/llms-prism.txt`](/llms-prism.txt) | | Utility | [`/llms-utility.txt`](/llms-utility.txt) | | Linktree | [`/llms-linktree.txt`](/llms-linktree.txt) | | LinkBio | [`/llms-linkbio.txt`](/llms-linkbio.txt) | | LinkMe | [`/llms-linkme.txt`](/llms-linkme.txt) | | Komi | [`/llms-komi.txt`](/llms-komi.txt) | | Pillar | [`/llms-pillar.txt`](/llms-pillar.txt) | Each file contains only that platform's endpoints with parameters, descriptions, and curl examples. One file exists per active platform, and [`/llms.txt`](/llms.txt) links the current list — treat that as the source of truth if this table ever trails a new platform launch. How do I integrate SocialCrawl with my AI agent? [#how-do-i-integrate-socialcrawl-with-my-ai-agent] ```typescript const apiKey = process.env.SOCIALCRAWL_API_KEY; if (!apiKey) throw new Error("Set SOCIALCRAWL_API_KEY"); const response = await fetch( "https://www.socialcrawl.dev/v1/tiktok/profile?handle=charlidamelio", { headers: { "x-api-key": apiKey } }, ); const json = await response.json(); if (!json.success) { // Machine-readable failure: branch on error.type, follow error.doc_url. throw new Error(`${json.error.type}: ${json.error.message}`); } // json.data is structured and ready for AI reasoning ``` Never hand a raw `{ "success": false, ... }` envelope back to a model as if it were data — it will reason around the error instead of retrying or reporting it. Branch on `success` first, use `error.type` to decide what to do, and honour the `Retry-After` header on a `429` or `503`. The full list is on the [Errors](/docs/errors.md) page. Official AI Framework Documentation [#official-ai-framework-documentation] * [Anthropic Claude Tool Use](https://docs.anthropic.com/en/docs/build-with-claude/tool-use) * [OpenAI Function Calling](https://platform.openai.com/docs/guides/function-calling) * [Vercel AI SDK](https://sdk.vercel.ai/docs) * [LangChain](https://python.langchain.com/docs/introduction/) {/* FAQPage JSON-LD derived from the question-format H2 sections above — no new visible copy. */}