The PageSpeed Insights API lets you analyze the performance of your website with a simple API. It offers tailored suggestions for how you can optimize your site, and lets you easily integrate PageSpeed Insights analysis into your development tools and workflow.
This page contains information about getting started with the PageSpeed Insights API using the Google API Client Library for Java. In addition, you may be interested in the following documentation:
- Browse the Javadoc reference for the PageSpeed Insights API
- Read the Developer's Guide for the Google API Client Library for Java.
- Interact with this API in your browser using the APIs Explorer for the PageSpeed Insights API
Add the following lines to your pom.xml
file:
<project>
<dependencies>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-pagespeedonline</artifactId>
<version>v5-rev20210603-1.32.1</version>
</dependency>
</dependencies>
</project>
repositories {
mavenCentral()
}
dependencies {
compile 'com.google.apis:google-api-services-pagespeedonline:v5-rev20210603-1.32.1'
}