What is actually a percentile in INP API response?

58 views
Skip to first unread message

pavlo soroka

unread,
Aug 15, 2024, 10:52:35 AMAug 15
to web-vitals-feedback
Hi, I'm trying to automate Core Web Vitals check via API

In API response with 'INTERACTION_TO_NEXT_PAINT' metric there is a parameter 'percentile', which is equal to 160
What exactly is it? Does it mean that 75% of INP metrics are below 160 ms?

Barry Pollard

unread,
Aug 15, 2024, 10:58:59 AMAug 15
to pavlo soroka, web-vitals-feedback
I presume you are using the PageSpeed Insights API? In which case, yes this is the 75th percentile.

If you only need this data, then I'd suggest using the CrUX API instead which is a lot quicker (since it doesn't need a Lighthouse run to complete) and also has the added benefit of making this a bit more obvious:

    "metrics": {
      "interaction_to_next_paint": {
        "histogram": [
          {
            "start": 0,
            "end": 200,
            "density": 0.8016
          },
          {
            "start": 200,
            "end": 500,
            "density": 0.1652
          },
          {
            "start": 500,
            "density": 0.0332
          }
        ],
        "percentiles": {
          "p75": 182
        }

      }
    },





--
You received this message because you are subscribed to the Google Groups "web-vitals-feedback" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web-vitals-feed...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/web-vitals-feedback/bbdf6306-9880-400f-9783-b7d04aef1794n%40googlegroups.com.

pavlo soroka

unread,
Aug 15, 2024, 11:19:32 AMAug 15
to web-vitals-feedback
Thank you! Yes, I'm using PageSpeed Insights API since I need to extract a lot of addintional metrics. I checked INP result from CrUX API and it slightly differs - 228 ms for CruX vs 160 ms for PageSpeed Insights API.
Have you noticed something like that? And from your practice, which data is should be trusted more from CruX or PageSpeed Insights API?

Barry Pollard

unread,
Aug 15, 2024, 11:22:12 AMAug 15
to pavlo soroka, web-vitals-feedback
They should be the same. Are you passing the formFactor to the CrUX API call to get PHONE or DESKTOP as appropriate (like PSI does).

If it's not that, then let me know the details of the calls you're making and can maybe advise further.

Reply all
Reply to author
Forward
0 new messages