Answers / Bluesky
How can I prevent an AI agent from overspending on social data API calls?
Set max_price_usd on each PostToData REST or MCP call, or X-Max-Price on REST requests. The server compares the current list price before contacting the source or reserving balance and returns 412 price_limit_exceeded when it is higher. A price cap limits one call; a total task budget also requires a maximum number of calls and no unapproved retries or pagination.
Bluesky · search posts · $0.001 a call · one verified website trial · updated 2026-11-13
Connect and check access for free
- In a supported Claude or ChatGPT client, add https://posttodata.com/mcp as a custom connector. Sign in with Google and approve the PostToData consent screen. Availability depends on the client, plan and workspace permissions.
- For Claude Code, Codex, Cursor or a custom application, follow the integration guide and supply your own API key through local configuration or an environment variable. Never paste it into a public prompt, repository or screenshot.
- Ask the connected client to call list_platforms and get_account. These checks are free. Confirm the account balance and the supported actions before requesting data.
- Review /prices.json or a REST request with dry_run=1 before executing a paid workflow. Each additional page, comment lookup or profile lookup is another call.
Use three different limits together
Example: two calls priced at $0.003 each have a maximum list-price total of $0.006. Give each call max_price_usd="0.003" and authorize exactly two calls. Passing max_price_usd="0.006" to each would allow a total of $0.012 instead.
- Per-call ceiling: pass the approved decimal string as max_price_usd. A price change above that ceiling is rejected with 412 before fetching.
- Task budget: fix the list of calls and sum their prices. Do not let an agent add follow-up detail, comment, pagination or retry calls automatically.
- Account exposure: use prepaid credit and inspect get_account or the usage history after a run. The server reserves upstream costs atomically. Test and free-use budgets are separate from prepaid customer capacity; paid sources also have a cost guard.
Stop safely when a limit is reached
On 412, do not raise the price cap automatically. Inspect the latest price and obtain a new spending decision. On 402, check the prepaid balance. On 429, wait for the relevant rate or daily budget window; do not rotate accounts or keys.
An API timeout is not a reason for an unlimited retry loop. Retain request IDs and inspect usage before repeating a call when settlement is pending. Model-provider charges are separate from PostToData data-call costs.
Limits and failures
This is read-only access to publicly visible content. Supported actions and available fields differ by platform; inspect meta.unavailable instead of assuming every metric exists. Source URLs are included when the upstream platform provides them.
Video transcripts retrieve available caption tracks. They are not speech recognition for arbitrary videos without captions. Search results and captions do not establish what appears in the video footage.
A 402 insufficient_balance response means this call was not charged: check get_account and add credit if needed. Verification or trial limits are not reset by signing in or creating another account. Upstream errors and timeouts are not charged; do not retry indefinitely.
Eligible new accounts receive $0.05 once, limited to one grant per network. Shared networks may already have claimed it. There is no recurring free credit.
Run it live
Calls run only when you press Run. Opening this page does not spend credit.
Loading…
Your results will appear here. Choose a platform and action, then press Run.
Real API calls require verification for one trial, or a signed-in account with prepaid credit.
From code
curl "https://posttodata.com/v1/bluesky/search?query=coffee&limit=5" -H "Authorization: Bearer YOUR_API_KEY"import requests
r = requests.get(
"https://posttodata.com/v1/bluesky/search",
headers={"Authorization": "Bearer YOUR_API_KEY"},
params={"query": "coffee", "limit": 5},
)
for item in r.json()["data"]["items"]:
print(item["url"], item.get("text") or item.get("title"))From your AI
Claude and ChatGPT clients that support OAuth can sign in without pasting a key. Follow the client setup guide. The command below is the API-key option for Claude Code.
claude mcp add --transport http posttodata https://posttodata.com/mcp --header "Authorization: Bearer YOUR_API_KEY"Then ask
“Use PostToData to search Bluesky once for coffee. Check the price first, set max_price_usd to that price, fetch at most 3 results, and stop on any error. Do not retry or paginate.”
The model calls search_posts with platform bluesky.
Good to know
- Use decimal strings with at most six digits after the decimal point. Zero explicitly refuses any positive-priced call.
- When both a parameter and X-Max-Price header are present, both limits apply. A higher value cannot override a lower one.
- dry_run=1 checks prices without a paid fetch. A quote is not a reservation: carry the approved price into the real request.
- Website workflows pin every step to its previewed price and stop at the first failed step. Already completed steps remain charged.
Full reference in the docs. All Bluesky endpoints are on the Bluesky API page.
More answers