Skip to main content
This guide shows you how to go from a single keyword to a complete brief of SEO and GEO recommendations. The flow uses four endpoints:
  1. Create a draft content in your editorial planning.
  2. Add the focus keyword to the draft’s page and set it as the focus keyword.
  3. Launch the keyword analysis asynchronously.
  4. Generate the analysis report to retrieve typed recommendations.
The same flow powers the New content button in the Semji app.

Prerequisites

  • An API key. See Authentication.
  • The workspace ID you want to plan content in. Get it from GET /v1/workspaces.
  • A focus keyword you want recommendations for (e.g. best crm for small business).

1. Create a draft content

Call POST /v1/workspaces/{workspaceId}/contents without a pageId — Semji will auto-create a blank page to host the draft. You only need a title to get started.
A successful response includes both the new content ID and the auto-created page ID:
201 Created (excerpt)
Keep both content.id and page.id — you’ll use them in the next steps.

2. Attach the focus keyword

Adding a focus keyword is a two-step operation:
  1. Add the keyword to the page with POST /v1/pages/{pageId}/keywords.
  2. Mark it as the page’s focus keyword with PUT /v1/pages/{id}.
If the keyword already exists in the workspace, POST /v1/pages/{pageId}/keywords reuses it instead of creating a duplicate.

3. Launch the keyword analysis

Recommendations are not computed on demand — you have to launch an asynchronous analysis with POST /v1/keywords/{id}/analyze. The analysis scrapes the Google SERP, runs the GEO/AI Overview probe, and stores the typed recommendations on the keyword.
The endpoint returns 202 Accepted immediately and the analysis runs in the background. Poll GET /v1/keywords/{id} until analysisStatus is "success":
analysisStatus transitions through queuedpendingsuccess (or failed). Most analyses complete within 30 seconds.
Each analysis consumes one analysis credit from your organization’s balance. Check available credits with GET /v1/me (look at organization.credits.analysis).

4. Retrieve the SEO & GEO recommendations

Once the analysis is success, call POST /v1/keywords/{id}/report to score a content draft against the analysis and pull the typed recommendations. You have two ways to score:
  • By reference — pass contentId and Semji uses the draft’s current title + html.
  • By value — pass title and html inline (useful for previewing recommendations against arbitrary text).
The response contains two top-level surfaces:
  • googleSearch — classic SEO recommendations from the SERP (topics, questions, search intents, internal links to add, SERP competitors).
  • googleAiOverview — GEO recommendations from the AI Overview answer (topics to cover for citation, cited sources, mentioned brands, markdown preview of the LLM answer).
200 OK (excerpt)
Each *Suggestion block carries its own score (0.0 – 1.0) and a list of items you can render in your brief. The top-level score on each surface is the overall match between the content and the recommendations.
Re-call the report endpoint as the draft evolves — the recommendations are fixed (until you re-run the analysis), but the scores change as the html improves.

Putting it all together

Reference