feat(integrations): add Semrush - #7068
Merged
Merged
Conversation
Adds the Semrush SEO API as a block with 44 operations across overview, domain, subdomain, URL, keyword, comparison, and backlink reports. Reports answer as delimited CSV, so the shared decoder maps each header cell back to the export column it was requested as rather than reading by position: the API may return fewer columns than were asked for, and two columns can render under the same header label.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
Greptile SummaryThe PR adds a Semrush API-key integration with 44 SEO and backlink operations, shared CSV decoding, workflow block configuration, generated metadata, documentation, and deployment registration.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/tools/semrush/utils.ts | Adds shared Semrush URL construction, bounded row limits, error handling, and header-aware delimited-report decoding. |
| apps/sim/blocks/blocks/semrush.ts | Defines the workflow-facing Semrush operation selector, credentials, conditional parameters, outputs, and tool access list. |
| apps/sim/tools/semrush/semrush.test.ts | Adds coverage for report decoding, request construction, registry completeness, and block-to-tool alignment. |
| apps/sim/tools/registry.ts | Registers the new Semrush operation set in the executable tool registry. |
| apps/docs/content/docs/en/integrations/semrush.mdx | Documents setup, supported operations, inputs, and structured outputs for the Semrush integration. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Semrush workflow block] --> B[Selected Semrush tool]
B --> C[Shared request builder]
C --> D[Semrush Analytics API]
D --> E[Delimited report decoder]
E --> F[Structured workflow output]
Reviews (2): Last reviewed commit: "fix(integrations): address Semrush revie..." | Re-trigger Greptile
There was a problem hiding this comment.
All reported issues were addressed
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
- Only the API key stays user-only; report selectors (target scope, limit, offset, date, sort, filter) are user-or-llm so an agent can set them - Hold the row limit at one row: a positive fraction floored to zero and sent display_limit=0 - Locate Domain vs. Domain metric columns by their own headers, so a dropped position column shortens the compared-domain run instead of shifting competition, search volume, and CPC onto the wrong values - Describe competitor and domain-list metrics as belonging to the row's domain, not to the target - Describe paid and URL traffic cost as an estimated cost, matching the Traffic Cost header those reports return, not the organic Traffic Cost (%) - Drop the newest-first claim from history outputs, which order by display_sort - Replace the erased any casts in the request tests with a typed helper
Collaborator
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
phrase_theseacceptsTdand omits Trends), andFk/Fpboth render under the header labelSERP FeaturesERROR nnn :: ...body, so the body is checked even on success;export_escape=1is always set and the parser is quote-aware so titles, anchors, and ad copy containing the delimiter surviveNot included
backlinks_matrixandbacklinks_comparisontake repeated array parameters that do not fit the shared request buildersubdomain_organic_uniquedocuments a response format inconsistent with every other reportType of Change
Testing
Checklist