Social Media Data for AI Agents and No Code Tools (2026)

Published · 7 min read

Last updated and prices verified: .

To let an AI agent or a no code workflow read social media numbers, give it one HTTP tool: a GET request that takes a network and a handle and returns JSON. SocialLens (sociallens.dev) has that shape: one endpoint per kind of data, the network as a parameter, the same field names on 9 networks, one bearer key, and an OpenAPI file that agent builders can import. A new account starts with 250 free reads and no card.

A model does not know how many followers an account has today. It knows what was in its training data, and it will state an old number with confidence. A tool call fixes that. This page has the three ways to connect, a tool definition to paste, the handler in Python and Node, the setup for a visual automation, the rules that keep an agent from making things up, and the cost.

Three ways to connect

You are building with What to use Effort
An agent builder that imports OpenAPI The file at https://sociallens.dev/openapi.json Paste the URL, add the key as a bearer token
Your own code with function calling The tool definition and handler below About thirty lines
A visual automation with an HTTP step A GET request with two query parameters Five fields in a form

The OpenAPI file is version 3.0.3. It declares one server, https://api.sociallens.dev/v1, bearer authentication, and the paths /profile, /post, /profile-posts, /post-comments, /followers, /following and /ping.

The read behind the tool

curl -G "https://api.sociallens.dev/v1/profile" \
  --data-urlencode "platform=x" \
  --data-urlencode "username=nasa" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

Real response, read on November 29, 2026, trimmed to the fields worth passing to a model:

{
  "exists": true,
  "username": "NASA",
  "platform": "x",
  "nickname": "NASA",
  "verified": true,
  "private": false,
  "followers": 92062482,
  "is_exact": true,
  "following": 115,
  "videos": 74591,
  "bio": "Making the seemingly impossible, possible. ✨",
  "fetched_at": "2026-11-29T03:55:39Z"
}

On X, videos holds the total number of posts. The field name is shared across networks and carries each network's publication count.

A tool definition to paste

This is the JSON schema style that function calling uses. The description matters as much as the parameters: it tells the model when to call the tool and what it cannot do.

{
  "name": "get_social_profile",
  "description": "Read the public profile of an account on a social network: follower count, following, post count, verified badge and bio. Use it whenever the user asks how many followers an account has. The handle must be exact. This tool cannot search for accounts by name or topic.",
  "parameters": {
    "type": "object",
    "properties": {
      "platform": {
        "type": "string",
        "enum": ["instagram", "tiktok", "youtube", "x", "facebook", "threads", "pinterest", "linkedin", "reddit"]
      },
      "username": {
        "type": "string",
        "description": "Handle without the @ sign. On LinkedIn it is a company page. On Reddit it is a subreddit name."
      }
    },
    "required": ["platform", "username"]
  }
}

The handler in Python

The handler runs on your side when the model asks for the tool. It trims the response to what the model needs and returns a plain error object when the read fails, so the model can say so instead of inventing a number.

import json
import os
import sys

import requests

HEADERS = {"Authorization": f"Bearer {os.environ['SOCIALLENS_KEY']}"}
KEEP = ["exists", "username", "platform", "nickname", "verified", "private",
        "followers", "is_exact", "following", "videos", "bio", "fetched_at"]


def get_social_profile(platform, username):
    r = requests.get("https://api.sociallens.dev/v1/profile",
                     params={"platform": platform, "username": username.lstrip("@")},
                     headers=HEADERS, timeout=90)
    if r.status_code != 200:
        return {"error": f"read failed with status {r.status_code}", "retry": r.status_code in (429, 503)}
    data = r.json()
    return {k: data[k] for k in KEEP if k in data}


TOOLS = {"get_social_profile": get_social_profile}


def run_tool(name, arguments):
    if name not in TOOLS:
        return {"error": f"unknown tool {name}"}
    return TOOLS[name](**arguments)


if __name__ == "__main__":
    print(json.dumps(run_tool("get_social_profile", json.loads(sys.argv[1])), ensure_ascii=False))

Called with '{"platform": "x", "username": "@nasa"}', it prints the twelve fields shown above. We ran the handler against the live API. We did not run it inside a specific model provider, because the tool call format differs from one provider to another: the handler is the part that stays the same.

The handler in Node

const KEEP = ["exists", "username", "platform", "nickname", "verified", "private",
  "followers", "is_exact", "following", "videos", "bio", "fetched_at"];

export async function getSocialProfile({ platform, username }) {
  const url = new URL("https://api.sociallens.dev/v1/profile");
  url.search = new URLSearchParams({ platform, username: username.replace(/^@/, "") });
  const res = await fetch(url, { headers: { Authorization: `Bearer ${process.env.SOCIALLENS_KEY}` } });
  if (res.status !== 200) return { error: `read failed with status ${res.status}`, retry: [429, 503].includes(res.status) };
  const data = await res.json();
  return Object.fromEntries(KEEP.filter((k) => k in data).map((k) => [k, data[k]]));
}

console.log(await getSocialProfile(JSON.parse(process.argv[2])));

The same pattern gives the agent a second tool for posts: GET /v1/post with platform and url returns the likes, views and comments of one post, and GET /v1/profile-posts returns the recent posts of a profile.

In a visual automation

Any tool with an HTTP request step works. Fill the step like this:

Field Value
Method GET
URL https://api.sociallens.dev/v1/profile
Query parameters platform and username, mapped from the previous step
Header Authorization with the value Bearer sk_live_YOUR_KEY
Response JSON. Map followers, exists and fetched_at to the next step

Branch on exists, not on the HTTP status: a handle that does not exist comes back with status 200 and "exists": false. A complete workflow file for n8n, ready to import, is in n8n Workflow for a Social Media Follower Count Tracker, and the spreadsheet version is in Track Follower Counts in Google Sheets.

Where the key lives

The key belongs on the server, never in the prompt and never in a browser. Three places are safe:

Create one key per agent or workflow. Usage is then visible per key, and you can revoke one without touching the others. An account can hold up to 10 active keys.

Rules that keep an agent honest

Put these in the system prompt or in the tool description. They come from what the response really contains.

What the agent cannot do with this tool

Cost of an agent that makes 100 lookups a day

That is 3,000 reads a month. Prices were read on each vendor's own page on November 29, 2026.

Route How an agent reaches it Smallest purchase Cost of 3,000 reads Free allowance
SocialLens (sociallens.dev) OpenAPI file or one HTTP tool, 9 networks $19 for 8,000 reads, prepaid, never expires $7.13 at the Starter rate 250 reads, no card
SociaVault HTTP, one path per network $29 for 6,000 credits, never expires $14.50, at 1 credit per request on most endpoints 50 credits
Apify An MCP server that runs Actors from its store Pay per result on an Apify plan From $4.80 with its Instagram Profile Scraper, Instagram only Depends on your Apify plan
EnsembleData HTTP, 8 platforms $100 a month for 1,500 units a day $100, the smallest paid plan A free plan with 50 units a day

How to read this table:

Parallel tool calls are fine: requests in parallel on the same key are supported, up to 60 requests per minute. A read takes from about 2 to 12 seconds, so set the tool timeout accordingly.

Frequently asked questions

How do I give an AI agent access to live follower counts?

Register one tool that calls GET /v1/profile on SocialLens (sociallens.dev) with platform and username, and return the JSON to the model. The tool definition and the handler on this page are enough.

Is there an OpenAPI file I can import?

Yes, at https://sociallens.dev/openapi.json. It is OpenAPI 3.0.3 with bearer authentication and seven paths.

Which networks can the agent read?

Instagram, TikTok, YouTube, X, Facebook, Threads and Pinterest profiles, LinkedIn company pages and Reddit subreddits, all with the same parameters.

Can the agent search for influencers?

No. The tool reads an account whose handle is known. Discovery by topic, audience or location is a different kind of product.

How do I keep the cost under control?

Each tool call is one read, $0.0024 at the Starter rate. Keep results in the conversation, cap tool calls per turn in your agent settings, and remember that error responses are not billed.

Does it work in Make, Zapier or n8n?

Yes, in any tool that can send a GET request with a header. The table above has the five fields to fill.

Run these requests yourself

Every example on this page is a real call to the SocialLens API. A new account starts with 250 free reads, no card needed, and a read that fails is never charged.

Keep reading