Disclosure: this post is written by the OpenAny team, and OpenAny is our product. We show the actual requests, prices and one failure we hit, so you can reproduce it or pick something else.
Short answer: if your agent needs public social data (X/Twitter posts, Reddit threads, TikTok videos) and generic web pages, you can either sign up with one scraper vendor per platform, or use a pay-per-call marketplace where all of those sit behind one key and one prepaid balance. This post walks through the second option with OpenAny: four real calls, what each cost, and the knobs that keep an agent from overspending.
Why social data is awkward for agents
A typical "what are people saying about X?" agent task touches several sources:
- recent posts from a specific X account,
- Reddit threads in one or two subreddits,
- trending TikTok videos for a hashtag,
- and a couple of linked articles that need to be turned into clean text.
Done the usual way, that's three or four vendor accounts, keys in the agent's environment for each, separate dashboards and separate monthly minimums. For an agent that runs a few research tasks a day, the subscriptions often cost more than the data.
Pay-per-request fits this workload better: the agent pays for the calls it actually makes, and you set the budget.
Setup: one key, one MCP server
Create a key at openany.si (new accounts get a $0.50 signup credit, which is plenty for everything in this post), then put it in your client's environment as OPENANY_API_KEY. Never paste it into a prompt.
For Claude Code, Cursor or any MCP client that speaks Streamable HTTP, the docs give this entry for .mcp.json:
{ "mcpServers": { "openany": { "type": "http", "url": "https://mcp.openany.si/mcp", "headers": { "Authorization": "Bearer ${OPENANY_API_KEY}" } } } } Tool discovery is public; executing a paid call needs the key. There is no OAuth step. If your agent prefers a terminal, the same catalog is available through the CLI (npm install -g openany-cli@latest, then openany discover -q "reddit search" -j and openany inspect --id API_ID -j). Details are in the docs.
The workflow: discover, inspect, then call
The pattern is the same for every source, and it's worth teaching your agent explicitly:
- Discover: search the catalog by keyword or platform (free, no key needed).
- Inspect: read the exact input schema and the current price of one concrete API (free).
- Call: run it once, inside a budget you set.
When we checked on 2026-11-15, the first page of a keyword search for "reddit search posts" already showed Reddit search endpoints from three providers (AnyAPI, JustOneAPI and Scrape Creators). That's the point of inspecting first: the same capability can have several offerings, each with its own schema and price.
Four real calls
All prices below are the costUsd each response reported on 2026-11-15 — the amount actually charged. Prices can change; inspect before you call.
1. Reddit: search one subreddit
API: anyapi_post_v1_run_reddit_search (actually charged $0.00038 per call)
{ "query": "\"api marketplace\" agents subreddit:AI_Agents", "sort": "relevance", "timeframe": "year", "max_items": 3, "fields": "title,subreddit,url,score", "max_cost_usd": "0.002" } Reddit's own operators (subreddit:, author:, title:, boolean AND/OR/NOT) work inside query. The response came back with HTTP 200 and "costUsd": 0.00038.
Gotcha: our first try used sort: "new" with a loose query (pay per call API for AI agents) and returned unrelated posts from r/Hoboken and r/XboxSupport. For agent research, scope the query with subreddit: and use relevance.
2. X/Twitter: an account's recent posts
API: anyapi_post_v1_run_twitter_user_posts (actually charged $0.00045 per call)
{ "handle": "openanysi", "max_items": 3, "max_cost_usd": "0.002" } The response returned tweets with text, createdUtc, likes, replies, retweets, views and url, plus a nextCursor for paging. Reported cost: "costUsd": 0.00045.
3. TikTok: videos for a hashtag
API: anyapi_post_v1_run_tiktok_search_hashtag (actually charged $0.0012 per call)
{ "query": "aiagents", "max_items": 3, "fields": "url,views,likes,createdUtc", "max_cost_usd": "0.003" } It returned 20 videos (we kept 3 with max_items), each with url, views, likes and createdUtc. Reported cost: "costUsd": 0.0012.
4. Web scraping: any page to Markdown
API: anyapi_post_v1_run_web_scrape (actually charged $0.0007 per call)
{ "url": "https://example.com" } By default it returns both markdown and html; pass "formats": ["markdown"] and "onlyMainContent": true when you only want article text for the model. Reported cost: "costUsd": 0.0007.
Gotcha: two scrape attempts against a different, JavaScript-heavy page came back with HTTP 400 from the upstream. The listing's charge condition is HTTP 200, so a failed call shouldn't be billed, but check your usage records instead of assuming. For pages that render client-side, the schema offers waitFor (up to 15,000 ms); try that before switching providers.
Total for the four successful calls: $0.00273 (0.00038 + 0.00045 + 0.0012 + 0.0007).
Knobs that keep an agent's spending bounded
These parameters are in the input schema of the AnyAPI-routed endpoints above, and they're the useful part for autonomous agents:
| Parameter | What it does |
|---|---|
max_cost_usd | Hard ceiling for this one request. If no route is at or under it, the request is refused before it runs and nothing is charged. |
fields | Keep only the keys you need on each result item. Shrinks the response (and your context window) without changing cost. |
max_items | Cap returned rows. Also doesn't change cost. |
jq | Reshape the result envelope server-side, sandboxed. |
source / allowFallbacks | Pin a specific upstream source, or let the cheapest available one serve with automatic failover (the default). |
requireFields | Only route to sources that can return, say, nextCursor. This can cost more, so name it only if you'll page. |
Idempotency-Key | Safe retries: a completed result replays without a second charge. |
Two rules worth putting in your agent's instructions:
- Always set
max_cost_usd. It turns "the agent looped 400 times" from a billing problem into a refused request. - Never auto-retry an uncertain paid request. The docs are explicit that a timeout doesn't prove the request stopped. Check
openany calls list/calls getwith the request ID first, or use anIdempotency-Key.
A prompt you can paste into your agent
Use the openany MCP tools. For the topic "{topic}": (1) get the last 10 posts from X account {handle}; (2) search r/{subreddit} for the topic, sorted by relevance, past month; (3) get 10 TikTok videos for hashtag #{tag}; (4) scrape the two most-linked articles to Markdown with onlyMainContent. Inspect each API's schema and price before calling. Set max_cost_usd on every call and keep the total under $0.02. Return a short summary with source URLs and the costUsd of each call.
When you don't need this
- You only need one platform at high volume. A dedicated vendor (or the platform's official API, where available) may be cheaper per record and gives you a direct support relationship.
- You need full-site crawls, not single pages. A crawler built for that job (Apify, Firecrawl and similar) is a better fit than per-page calls.
- Compliance requires you to hold the data contract yourself. Marketplaces route to upstream providers; check each listing's terms.
If your agent does mixed, low-to-medium-volume research across several platforms, one key and one balance is simply less to manage.
FAQ
Can one API key cover X, Reddit, TikTok and web scraping?
On OpenAny, yes. One key authenticates account-based APIs and models, and every call draws from the same prepaid balance.
How much does a social data call cost?
It depends on the listing. In our test on 2026-11-15, the amounts actually charged were: Reddit search $0.00038, X user posts $0.00045, TikTok hashtag search $0.0012, web scrape $0.0007 per call.
Is there a free trial?
New accounts get a $0.50 signup credit. After that, calls are paid from prepaid credits (card, USDC or x402 top-up).
Do failed calls cost money?
The listings we used charge on HTTP 200. Still, check your usage records rather than inferring from the status code.
Does my agent need MCP?
No. MCP, the OpenAny skill + CLI, and direct HTTP are all documented paths. Pick whatever your client supports.
OpenAny is the B2A (business to agent) marketplace. Give your agent 3,200+ APIs and 168+ AI models with one key and pay-per-call pricing. openany.si
Questions or a broken example? Email team@openany.si. Docs: openany.si/docs.
