Search code examples
google-apipagespeed

Google insights results are different via API and web interface


I have a problem with page speed measurments, for example: via api https://www.googleapis.com/pagespeedonline/v2/runPagespeed?url=https://www.makeupforever.com/fr/fr-fr&strategy=mobile "SPEED": { "score": 33 }, "USABILITY": { "score": 97 }

But if Im testing via user interface on https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.makeupforever.com%2Ffr%2Ffr-fr And it has enter image description here

My question is why results are different and how do I retrieve equal results in API and PageSpeed interface?


Solution

  • Change your request url to the actuall version:

    https://www.googleapis.com/pagespeedonline/v4/runPagespeed

    see release notes:

    https://developers.google.com/speed/docs/insights/release_notes