The SEO.getRank() Method

The following instruction is misspecified. A separate query parameter must be entered for the value of the method’s argument.

The SEO API lets you access a list of SEO metrics for the specified URL:
 Google PageRank, Google/Bing indexed pages Alexa Rank and age of the 
Domain name.    
 - SEO.getRank (url) [ Example in...]

All of the following specifications fail

&method=SEO.getRank(www.grammarcaptive.com)
&method=SEO.getRank(https://www.grammarcaptive.com)

&method=SEO.getRank(‘www.grammarcaptive.com’)
&method=SEO.getRank(‘https://www.grammarcaptive.com’)

You must enter, for example:

&method=SEO.getRank&url=www.grammarcaptive.com

Roddy

2 Likes

Hi,

That’s exactly what the docs say. You can’t make function calls in HTTP, the parameters always have to be GET or POST parameters.

https://developer.matomo.org/api-reference/reporting-api

You can simply click on Example in JSON and see an example URL.

2 Likes

Thank you, Lukas, for your reply, but clicking on JSON in the documentation at the point in the documentation to which I am referring does not provide a sample link. What it does provide is sample output thus giving the user an incentive to dig deeper into the documentation.

It would be most helpful to provide a sample implementation of how to interpret the notation on the same page that the notation is provided. It is misleading as currently stated.

Roddy

1 Like

It’s been a while since your post, but I wanted to offer some insight. I appreciate you sharing your findings on the SEO.getRank() method.
It’s frustrating when instructions don’t quite align with the actual implementation. Your attempt to troubleshoot with different specifications shows dedication.

Thank you!
Persistence in a world of rejection, manipulation, and deception is crucial, even if it is only for survival, let alone for success.

Roddy

The error occurs because the API expects the method and its argument as separate query parameters, not together. Instead of combining them like &method=SEO.getRank(url), the correct format is:
&method=SEO.getRank&url=www.grammarcaptive.com
This structure clearly defines the method and passes the URL as a distinct parameter, which is how most REST-style APIs interpret input.