Developers

REST API reference

The Varf REST API is the JSON API behind the Varf app. Anything you can do in the app, you can do with it: list workspaces, read search performance, decide recommendations, follow results, manage keywords and publish content.

Overview

Base address: https://api.varf.io. Endpoints sit at the root, with no version segment.

Requests with a body send Content-Type: application/json, up to 1 MB. Responses are JSON; 204 responses have no body.

Times are ISO 8601 in UTC; calendar dates are YYYY-MM-DD. Daily and monthly quotas follow the Türkiye calendar (Europe/Istanbul).

Most endpoints live under /workspaces/:ws, where :ws is the workspace’s short name (slug) from GET /workspaces.

Browsers may call the API only from app.varf.io. Call it from your server or your scripts.

Authentication

The API uses the same session as the Varf app: a signed cookie set when you sign in. There are no API keys. To connect an AI assistant, use the MCP server, which signs in with OAuth.

  1. Sign in with POST /api/auth/sign-in/email and your email and password. The account’s email must be verified.
  2. Keep the session cookie from Set-Cookie exactly as it is (a cookie jar does this) and send it with every request.
  3. Sign out with POST /api/auth/sign-out.
Sign in, call the API, sign out
curl -c varf.jar -H 'content-type: application/json' -H 'origin: https://app.varf.io' \
  -d '{"email":"you@example.com","password":"…"}' \
  https://api.varf.io/api/auth/sign-in/email

curl -b varf.jar https://api.varf.io/workspaces

curl -b varf.jar -X POST -H 'origin: https://app.varf.io' https://api.varf.io/api/auth/sign-out

Calls to /api/auth/* that send the cookie and change something, such as signing out, need the header Origin: https://app.varf.io; the example sends it with every call. Varf’s own endpoints don’t check it.

A session lasts 7 days and is extended while you use it. Changing your password ends every session.

Errors

An error returns a code, and sometimes parameters, but no sentence: your code decides what to show.

Error body
HTTP/1.1 402 Payment Required
content-type: application/json

{ "code": "quota.exceeded", "params": { "resource": "keywords", "limit": 250, "used": 250 } }

Validation errors return 400 with the code of the first problem, or request.invalid. Malformed JSON, bodies over 1 MB and unknown routes return the framework’s standard body with statusCode and message.

StatusMeaningExample codes
400The request is invalid.request.invalid, domain.invalid, reason.required
401You aren’t signed in, or the session has expired.auth.required
402The plan has expired, or a quota is used up.plan.expired, quota.exceeded
403Your role doesn’t allow it.role.view_only, role.manager_only, owner.only
404Not found, or you aren’t a member of the workspace.workspace.not_found, rec.not_found
409It conflicts with the current state.rec.conflict, gsc.not_connected, crawl.running
422The publishing target refused the request.connector.auth_failed, connector.rejected
429Too many requests, or a daily limit is reached.quota.exceeded, crawl.too_soon
503Something Varf depends on is temporarily unavailable.connector.unreachable, keywords.unavailable

Roles and access

Every workspace member has a role. The endpoint tables show the minimum role each endpoint needs.

RoleCan
viewRead everything in the workspace.
editAlso decide recommendations, have Varf write fixes, start crawls and manage tracked keywords, competitors, content and Glas questions.
manageAlso change the workspace’s settings and autonomy, connect Search Console, manage the team and the publishing connector, and delete the workspace.

The owner is the admin whose plan the workspace uses. Only the owner can transfer ownership.

A workspace you aren’t a member of returns 404 workspace.not_found, so its existence isn’t revealed.

When the owner’s plan has expired, the workspace is read-only: GET and DELETE still work, other methods return 402 plan.expired.

Limits

Sign-in endpoints are rate-limited per IP: 5 sign-ins and 3 sign-ups a minute. Going over returns 429 with an X-Retry-After header.

Varf’s own endpoints have no request-rate limit; your plan’s quotas apply instead: workspaces, members, tracked keywords, AI questions, monthly drafts, monthly written fixes and daily keyword lookups. GET /workspaces/:ws/usage shows what is used and what is left.

Lists come whole or capped, for example the top 200 queries. Only crawl findings are paged, 50 per page.

Endpoints

Paths are relative to https://api.varf.io. Role is the minimum workspace role; session means any signed-in user, and public needs no sign-in.

Workspaces

MethodPathRoleWhat it does
GET/workspacessessionYour workspaces, including those you were invited to, oldest first.
POST/workspacessessionCreate a workspace for a domain. You become its owner, and the first crawl starts.
GET/workspaces/:wsviewOne workspace: name, domain, your role, Search Console property, autonomy and plan access.
PATCH/workspaces/:wsmanageChange the name, the domain or the autonomy level.
DELETE/workspaces/:ws?confirm=:wsmanageDelete the workspace and all its data. Irreversible; confirm with the slug.

Search Console

MethodPathRoleWhat it does
GET/workspaces/:ws/gsc/sitesviewSearch Console properties your linked Google accounts can see, matching ones first.
PUT/workspaces/:ws/gscmanageConnect a property and start the first sync.
DELETE/workspaces/:ws/gscmanageDisconnect Search Console and remove its cached data.
GET/workspaces/:ws/syncviewState of the sync: queued, running, done or failed, and the current step.

Performance and pages

MethodPathRoleWhat it does
GET/workspaces/:ws/performance?range=28|90viewTotals and daily series for both periods, rising and falling pages, position groups, devices, countries and the top 200 queries.
GET/workspaces/:ws/pages?range=28|90viewThe top 1,000 pages by clicks, each with its top query.
GET/workspaces/:ws/page?url=&range=viewOne page: its daily series and up to 1,000 queries.

Keywords and competitors

MethodPathRoleWhat it does
GET/workspaces/:ws/keywordsviewKeywords the site ranks for: the top 200 by estimated traffic, with position, change and monthly searches.
GET/workspaces/:ws/keyword-ideas?seed=viewUp to 100 keyword ideas for a seed, with monthly searches, difficulty and intent. Uses the daily keyword quota.
GET/workspaces/:ws/tracked-keywordsviewTracked keywords with the latest position, the previous one and the change.
POST/workspaces/:ws/tracked-keywordseditTrack up to 100 keywords at once, optionally with a target page.
DELETE/workspaces/:ws/tracked-keywords?keyword=editStop tracking a keyword. Its history is kept.
GET/workspaces/:ws/tracked-keywords/detail?keyword=viewOne keyword: 90 days of positions and the latest results page.
GET/workspaces/:ws/competitorsviewSaved competitors, up to 10.
POST/workspaces/:ws/competitorseditSave a competitor’s domain.
DELETE/workspaces/:ws/competitors/:domaineditRemove a competitor.
GET/workspaces/:ws/competitors/overviewviewSaved and suggested competitors with shared keywords, traffic and average position.
GET/workspaces/:ws/competitors/:domain/keywords?type=gap|sharedviewKeywords a competitor ranks for and you don’t (gap), or both of you do (shared).

Recommendations

MethodPathRoleWhat it does
GET/workspaces/:ws/recommendations?tab=&type=viewRecommendations in a tab (pending, snoozed, applied or rejected), with counts per tab and type.
GET/workspaces/:ws/recommendations/:idviewOne recommendation with its facts, score and risk.
GET/workspaces/:ws/recommendations/:id/fixviewA recommendation’s fix: what the site has now and what it should have, part by part. Computed parts come from the crawl, robots.txt and Search Console; text parts appear once written.
POST/workspaces/:ws/recommendations/:id/fixeditHave Varf write the fix’s text: title and description options, headings and an FAQ, or a new page’s outline. Each call uses one of the month’s written fixes.
POST/workspaces/:ws/recommendations/:id/decisioneditApprove, snooze, reject with a reason, or reopen. Every decision restarts the measurement.

Results and Today

MethodPathRoleWhat it does
GET/workspaces/:ws/resultsviewEvery approved page change and speed fix with its measurement, and a summary of verdicts.
GET/workspaces/:ws/results/:idviewOne result: before and after, expected clicks, the verdict and the early reading.
GET/workspaces/:ws/todayviewThe Today screen: 28-day totals, pages losing clicks, top recommendations, recent results and the sync state.

Site health

MethodPathRoleWhat it does
GET/workspaces/:ws/crawlviewState of the latest crawl.
POST/workspaces/:ws/crawleditStart a crawl now, at the earliest 30 minutes after the last one.
GET/workspaces/:ws/crawl/summaryviewHealth score, issue counts per rule, sitemaps and bot access from the latest crawl.
GET/workspaces/:ws/crawl/speedviewPage speed from the latest check: Chrome UX Report for the site and its key pages, with the weekly trend, or a lab test. null until the first check.
GET/workspaces/:ws/crawl/findings?severity=&rule=&diff=&page=viewIssues found, filtered by severity, rule or change, 50 per page.
GET/workspaces/:ws/crawl/page?url=viewOne crawled page with its details and issues.

Content and topics

MethodPathRoleWhat it does
GET/workspaces/:ws/topics?seed=viewTopic plans: seed keywords and their topic clusters.
POST/workspaces/:ws/topicseditPlan or refresh the topics for a seed keyword. Uses the daily keyword quota.
DELETE/workspaces/:ws/topics?seed=editDelete a seed keyword’s topic plan.
POST/workspaces/:ws/topics/:id/ideaeditTurn a topic into an article idea.
GET/workspaces/:ws/contents?stage=viewArticles, most recently updated first, with counts per stage.
POST/workspaces/:ws/contentseditCreate an article idea for a keyword.
GET/workspaces/:ws/contents/:idviewOne article with its brief and current version.
PATCH/workspaces/:ws/contents/:ideditChange the title or the keywords.
DELETE/workspaces/:ws/contents/:ideditDelete an article and its versions. A published post stays on your site.
POST/workspaces/:ws/contents/:id/actionseditMove an article forward: brief, draft, review, approve (optionally scheduled), return or publish.
GET/workspaces/:ws/contents/:id/versionsviewAn article’s versions, newest first.
POST/workspaces/:ws/contents/:id/versionseditSave edited content as a new version.
GET/workspaces/:ws/contents/:id/versions/:nviewOne version with its content, sources and checks.
POST/workspaces/:ws/contents/:id/versions/:n/restoreeditRestore an earlier version as a new one.
GET/workspaces/:ws/ai-usageviewThis month’s AI spending across the owner’s workspaces, against the owner’s limit.

Publishing connector

MethodPathRoleWhat it does
GET/workspaces/:ws/connectorviewThe publishing connector, without its password or secret.
PUT/workspaces/:ws/connectormanageSave a WordPress or webhook connector. Varf tests it first.
DELETE/workspaces/:ws/connectormanageRemove the connector.
POST/workspaces/:ws/connector/testmanageTest the saved connector again.
GET/workspaces/:ws/connector/categoriesviewWordPress categories, for the publish options.

Glas (AI visibility)

MethodPathRoleWhat it does
GET/workspaces/:ws/aiviewThe Glas report: questions, answers per source, competitors and daily scores.
POST/workspaces/:ws/ai/questionseditAdd up to 100 questions, optionally with a topic. Measuring starts right away.
PATCH/workspaces/:ws/ai/questions/:ideditChange a question’s topic.
DELETE/workspaces/:ws/ai/questions/:ideditDelete a question and its answers.
POST/workspaces/:ws/ai/questions/:id/recommendationeditOpen a recommendation for a question where you are missing.
POST/workspaces/:ws/ai/suggestionseditSuggested questions for your site. Not saved.
GET/workspaces/:ws/ai/answers/:idviewThe full text of one answer, with its model and citations.
GET/workspaces/:ws/ai/botsviewAI crawler access from robots.txt and llms.txt. Starts a new check if the last one is older than 26 hours.

Team and invites

MethodPathRoleWhat it does
GET/workspaces/:ws/membersviewMembers and pending invites.
POST/workspaces/:ws/invitesmanageInvite someone by email with a role. The link is valid for 7 days. With also, they’re invited with the same role to other workspaces you manage.
POST/workspaces/:ws/invites/:id/resendmanageSend an invite again, with a new link.
DELETE/workspaces/:ws/invites/:idmanageRevoke an invite.
PATCH/workspaces/:ws/members/:usermanageChange a member’s role.
DELETE/workspaces/:ws/members/:usermanageRemove a member.
POST/workspaces/:ws/leaveviewLeave the workspace.
POST/workspaces/:ws/ownerownerTransfer ownership to another admin.
GET/invites/:tokenpublicWhat an invite is for: workspace, email, role and expiry.
POST/invites/:token/acceptsessionAccept an invite while signed in with the invited email address.

Notifications, account and plans

MethodPathRoleWhat it does
GET/workspaces/:ws/notificationsviewYour latest 50 notifications.
POST/workspaces/:ws/notifications/readviewMark all notifications as read.
GET/workspaces/:ws/usageviewThe workspace’s plan, trial and quota usage.
GET/planspublicPlans and their limits.
GET/account/plansessionYour plan, trial and account-level usage.
GET/account/deletionsessionWhat deleting your account would delete, and what blocks it.

Values

Some values are Turkish words. What they mean:

FieldValues
Recommendation.statusbekliyor pending · ertelendi snoozed · onaylandi approved · reddedildi rejected · gecersiz no longer valid
recommendations?tab=bekleyen pending · ertelenen snoozed · uygulanan applied · reddedilen rejected
RecDecision.decisiononayla approve · ertele snooze for 7 days · reddet reject, with a reason · yeniden_ac reopen
Recommendation.typeyeni_icerik new content · icerik_guncelle content update · meta meta tags · ic_link internal link · sema schema markup · teknik technical · yamyamlik competing pages · ai_gorunurluk AI visibility
Recommendation.riskdusuk low · orta medium · yuksek high
Outcome.verdictiyi good · notr neutral · kotu bad
Result.stateolculuyor measuring · tamamlandi completed
Content.stagefikir idea · brief brief · taslak draft · inceleme review · onaylandi approved or scheduled · yayinda published
SyncStatus.state, CrawlStatus.state, job.statesirada queued · calisiyor running · bitti done · hata failed
CrawlFinding.severitykritik critical · uyari warning · bilgi info
CrawlFinding.diffyeni new · suruyor ongoing · duzeldi fixed

Example

List the pending recommendations, then approve the first one. Its measurement starts the day after the decision.

List pending recommendations
curl -b varf.jar 'https://api.varf.io/workspaces/example/recommendations?tab=bekleyen'

{
  "tab": "bekleyen",
  "counts": { "bekleyen": 12, "ertelenen": 1, "uygulanan": 8, "reddedilen": 2 },
  "types": { "meta": 5, "icerik_guncelle": 4, "teknik": 3 },
  "items": [
    {
      "id": "0b9c6a1e-5f2d-4c8e-9a51-2f6d7e3b8c10",
      "type": "meta",
      "page": "https://example.com/espresso-machines",
      "keyword": null,
      "facts": {
        "rule": "low_ctr",
        "clicks": 41, "impressions": 5120, "position": 4.2, "ctr": 0.008,
        "peerCtr": 0.031,
        "topQueries": ["espresso machine", "best espresso machine", "espresso machine price"]
      },
      "score": 7.6,
      "risk": "dusuk",
      "auto": true,
      "status": "bekliyor",
      "rejectReason": null,
      "snoozedUntil": null,
      "decidedAt": null,
      "date": "2026-11-20T03:12:44.000Z",
      "measuredAt": "2026-11-27T03:05:10.000Z"
    }
  ]
}
Approve one
curl -b varf.jar -X POST -H 'content-type: application/json' \
  -d '{"decision":"onayla"}' \
  https://api.varf.io/workspaces/example/recommendations/0b9c6a1e-5f2d-4c8e-9a51-2f6d7e3b8c10/decision

Frequently asked questions

Does Varf have an API?

Yes. The Varf REST API at https://api.varf.io is the same JSON API the Varf app uses, with endpoints for workspaces, search performance, recommendations, results, keywords, site health, content, Glas and teams.

How do I authenticate?

Sign in with your email and password at /api/auth/sign-in/email and send the session cookie with every request. There are no API keys.

Can I call the API from a browser app?

Only from app.varf.io. Other sites can’t call it from the browser; call it from your server or scripts.

How are errors reported?

With an HTTP status and a JSON body holding a code, such as auth.required or quota.exceeded, and sometimes parameters.

Put your site on the loop.

Add your site and connect Search Console. Varf starts collecting right away and shows its first findings as soon as the first sync finishes.