SERP or Search Engine Result Page refers to the way the search engine displays search results. Among SEO professionals SERP most often refers to how will a page show up in the results and the page ranking in the search results. This post will be about Google SERPs.
Google Webmaster Tools has Search Analytics that show you your keyword rank for certain pages. But, there’s a delay of about 4 days in the data collection. Also, you can only do that for your own site, and not for the competition.
Using the Google Custom Search API, let’s see how we can create our own search engine keyword position checker PHP script.
You can take this even further. You could use the same code and store the position for each keyword and link. This way you can create your own free SERP rank tracker. This could potentially be a very powerful SEO tool similar to what you get for high paying SEO tools like Ahrefs or Semrush.
The SERP Checking PHP script below works with the Google Custom Search API. In order to use the script with the API you will need follow these steps:
Activate Google Custom Search API and create credentials by going here: https://console.developers.google.com
Create a Google Custom Search Engine here: https://cse.google.com/cse/all
You can test that your credentials and the custom search engine is working here: https://developers.google.com/apis-explorer/?hl=en_US#p/customsearch/v1/search.cse.list
After you setup the Google Custom Search API, simply go here and download the PHP script:
Alternatively, you can check out this Github repo: