Skip to content
Anchor Social
Anchor SocialSign up

Troubleshooting

How do you check backlinks by API when the rows look wrong

A symptom-first table for the moments when an anchors pull returns fewer rows than expected, costs more than planned or disagrees with last month.

Check these three things first

Most odd pulls trace back to one of three causes. The key, the credit balance, or the snapshot date.

Every authenticated response carries ok and a _credits object with the cost and the remaining balance, so the first move is always to print those two fields. If ok is false, nothing about the rows matters yet.

Then check the month. Our index refreshes roughly once a month, and a link added last week may simply not be in it, which is not a bug.

One more habit. Keep a log line per call with the action, the page number and the remaining balance from _credits; it makes a missing 7 credits easy to trace later instead of a mystery at month end.

Symptom, cause, fix

SymptomLikely causeFix
HTTP 401Missing or wrong keySend key=sk_... or Authorization: Bearer sk_...; recopy it from the account page
HTTP 402Credit has run outTop up in USDT (TRC-20) from the account page and retry
Fewer rows than the total suggestsOne call returns up to 1,000 rowsAdd page=2, page=3; deep pagination stops at 50,000 rows
Cost looks higher than 2 creditsA different action was calledanchors is 2 credits; keyword and search are 3; check the action value
Total differs from last monthThe index refreshedCompare snapshots only within the same tool and month cadence
A new link is missingLink appeared after the last refreshWait for the next monthly refresh; do not re-pull to chase it
Brand share suddenly jumpsSitewide links added many rowsRecompute by linking domain, see the runbook
Different numbers from Ahrefs or SemrushDifferent crawls and refresh datesPick one source for trends; use the other for spot checks

Reading a short result correctly

A small domain may just have few anchors. Not every short list is a failure.

Compare the row count with the free overview figures for the same domain: if overview reports thousands of backlinks and anchors returns forty rows on page one, you probably need page two, not a support ticket. If overview itself reports a handful, the domain is young or small and the pull is correct.

The reverse also happens. Huge domains hit the 50,000-row pagination ceiling, so sort by the column you care about and take the top slice, or call anchor_cloud first to see which terms dominate before paging through everything.

Print the billing fields before anything else

A three-line guard you can paste into a cron script.

bash
R=$(curl -s "https://anchorsocial.org/api.php?action=anchors&q=example.com&per=1000&key=$KEY")
echo "$R" | jq '{ok, _credits}'
[ "$(echo "$R" | jq -r .ok)" = "true" ] || exit 1

If the table did not solve it

  • Run a free action such as overview for the same domain; if that works, the problem is the key
  • Confirm you typed the bare domain in q, without a path
  • Save the raw JSON before changing anything
  • Check the balance in the dashboard against _credits
  • Contact us from your account page with the action and a timestamp

Quick answers

Does a failed call cost credits?

A 401 or 402 returns before any rows are served. Each successful call is billed once, whatever the row count up to 1,000 rows. Check _credits in the response to confirm what a given call cost.

Why would two pulls on the same day differ?

They should not, because the index only changes at its monthly refresh. If they do, compare the sort and page parameters first, then your key and the action. The free checker page covers what the keyless calls return.