How to write SEO-friendly web texts using SEMrush and semi-automated processes in PHP

Unite professionals to advance email dataset knowledge globally.
Post Reply
arafatenzo
Posts: 131
Joined: Sun Dec 22, 2024 5:47 am

How to write SEO-friendly web texts using SEMrush and semi-automated processes in PHP

Post by arafatenzo »

SEO Tests: Analyze the first 5 organic positions for each keyword.
Documentation (Phrase Organic)
For each keyword we extract the first 5 organic results via Phrase Organic API and put them in the $page_list array. Then we ask to show only 5 results (display_limit=5) and only the column with the list of Urls (export_columns=Ur).

The rest is just array manipulation: we remove the column name, as given to us by the API, and the last character, always present when we extract a single column from the API.

For each of the extracted pages we will have to find some evaluation parameters. The parameters we use are:

Positioning
Referring Domains (as a negative parameter. A site kenya phone number that has web texts with fewer Backlinks, which is positioned well is supposed to have a better OnPage SEO)
We have chosen these two parameters to give an idea of ​​the procedure. You are obviously free to modify the algorithm. For example, it would certainly be useful to add the PA, the Keyword Difficulty and the Search Volume.

As mentioned, for each page we obtain the data we are interested in:

Positioning
The extracted URLs are already sorted according to the organic positioning for that specific keyword.

Referring Domains
Inside the previous foreach, where we left the [...More code ...] block, we are going to insert the following listing:
Post Reply