What the agent does
There is no repository to clone for this job; the data lives in Ahrefs. The Ahrefs connection is an MCP server at api.ahrefs.com that you sign in to once with your Ahrefs account, and a run names it in connections, so the agent reaches it with your access while the prompt and the result stay inside the run. The connector draws on your monthly Ahrefs API units and needs a Lite plan or higher, which is worth remembering before a run asks for many reports at once.
The prompt names your domain and two competitors. The agent asks the connection for each domain's top pages by organic traffic, then works down the competitor lists looking for subjects your domain has no page on. For each gap it records the competitor URL, the traffic that page gets and the main keyword it ranks for.
It writes content-gap.md with one row per gap, ranked by the competitor page's traffic, so the top of the file is the topic where competitors earn the most traffic that you do not touch at all. Where you have a page on the subject under a different title, the row lists your URL beside the competitor's, so what remains is a real absence rather than a naming difference.
The file comes back as an artifact on the session, and the session's transcript shows every query the agent made through the connection and what each returned, so a number in the file can be traced to the report it came from.
Start it with one API call
POST https://api.prix.dev/o/{org}/sessions with this body:
{
"agent": "claude",
"input": "Use the Ahrefs connection to read the top pages by organic traffic for the domain and the two competitors named after this prompt. Write content-gap.md listing topics where a competitor page gets traffic and the domain has no page on the subject, with the competitor URL, its traffic and the main keyword, ranked by traffic.",
"connections": [
"ahrefs"
]
}- Get an API key. In the console, open Settings, then API keys, and create a key for your org. Send it in the Authorization header as a Bearer token.
- Send the request. POST the body in request.json to https://api.prix.dev/o/{org}/sessions, with your repository as the resources URL. The run starts in its own cloud sandbox.
- Read what came back. Follow the run on its live stream or wait for the run.completed webhook, then read the result and its trajectory.
What comes back
What comes back is a session with one artifact, content-gap.md. Reading the session lists artifacts with a name, a mime type and a URL on api.prix.dev that downloads the file, valid for an hour; reading the session again returns a fresh link. GET /o/{org}/sessions/{id}/artifacts/content-gap.md with the key works too.
The file's rows are ranked by competitor traffic: competitor URL, its traffic, the main keyword, and your nearest page when one exists. A content team reads it top-down and each proposed article comes with the evidence for writing it, the competitor page that earns the traffic today.
Before scheduling against the list, an editor spot-checks two or three competitor URLs and confirms the gap is real: that the page ranks for the keyword named and that your site truly has nothing on the subject. The trajectory stays available for every query behind each row.
Run it on every Monday morning
Create an automation with a schedule trigger and this prompt, and the run starts itself every Monday. The domain and the two competitors are fixed in the prompt, so each week's file compares the same players; the run.completed webhook tells your server the new artifact is ready, and it can drop the file in the content channel.
Once a quarter, start a one-off run with a rotated competitor set to see the field beyond your two standing rivals. A key runs at most max_concurrent sessions at once, 4 by default, and weekly runs are far below that, so the schedule needs no other provisioning.
The use case this job follows, with its automation and trigger: Produce a report or file, no repo.
Why run it on Rush?
Doing this by hand means logging into Ahrefs, running the same top-pages report three times, exporting, and joining spreadsheets, every time you want a fresh view. On Rush the agent runs that loop in its own sandbox and returns a file, with every query it made kept in the transcript, so the numbers are traceable instead of copied between browser tabs.
Because the run names the Ahrefs connection rather than holding a key, your account's access is used without credentials leaving the connection, and the file is an artifact you can hand to a writer as-is. The same request runs for every domain you manage, one run each, when an agency covers several sites.
Frequently asked questions
Does it use my Ahrefs plan and API units?
Yes. The run works through your Ahrefs connection, so the reports draw on your monthly Ahrefs API units and your plan needs to be Lite or higher. Check the unit cost of the top-pages report in Ahrefs' API documentation before putting the run on a weekly schedule.
Can I compare more than two competitors?
Name them in the prompt. Each competitor adds one top-pages report to the run; three or four is the useful range before the gap list stops being actionable.
Where does the file come back?
As an artifact on the session. GET /o/{org}/sessions/{id} lists it with a name, mime type and a download URL that works for an hour with no key; GET /o/{org}/sessions/{id}/artifacts/content-gap.md with your key downloads it directly.
What if my domain is small and the gap list is noise?
Ask for a traffic floor in the prompt, and the file lists only gaps where the competitor page earns above it. You can also name the topic areas you care about and the agent restricts the comparison to those.
How do I know the numbers are right?
The session's transcript records every query the agent made through the connection and what each returned. Pick a row, find its query, and compare the number against the report in Ahrefs.