How is "API requests" calculated?

Recently there’s a new metric called API requests displayed in Cloudflare Site Analytics (Traffic tab).

image

I was looking for documentation to understand how API requests are calculated, but I can’t find any at this moment.

I suspect it is based on content-type: application/json and some other stuff, but I need further clarification. Hopefully someone from Cloudflare can answer this.

Thanks.

Could it be an example as for the request(s) to the /cdn-cgi/rum (Cloudflare Browser Insights), or Cloudflare Mirage, Image Resizing? - just guessing.

Or, I assume the Ajax (XHR) requests (via PHP), XML files possible (sitemaps), and even as You mentioned the application/json (JSON).

Not sure if they count, if so, per user/visitor for example if the user visits some webpage URL, which as got them and need to load, even if for each request, or how else could it be.

EDIT: From my experience as I have checked now on a Website using a Pro plan, I see them being counted while using Revive AdServer via AsyncJS method (Ajax), even for my app for product comparison (Ajax too), therefore:

  • /www/delivery/asyncspc.php (Ajax, PHP to display ads)
  • /app/ajax_compare.php (Ajax, PHP to compare two or more products)
  • /manifest.json (JSON, for Progressive Web Application)
  • /osd.xml (XML Open search defined)
  • /google-news-sitemap/ (XML sitemap)
  • /wp-admin/admin-ajax.php (WordPress)

I’m suspecting the same thing. :thinking:

So far I didn’t see API requests related to these URLs.

1 Like

Just got the answer from the support team and API requests are determined based on JSON and XML content types (I assume application/json, text/xml and application/xml).

Thanks @TKlein for answering my enquiry in the support ticket. :+1:

1 Like

Didn’t notice that it was you! Glad to hear that this solved it! :slight_smile:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.