Embeddable Kp widget
Paste one line and the current Kp index appears on your site with a backlink. No iframe, lightweight, no dependencies, refreshes every 10 minutes.
Preview
Here is how the widget will look on your site. Dark and light themes.
Dark theme
Light theme
How to embed
Copy the snippet and paste it into your site HTML where the widget should appear.
Dark theme
<script src="https://magneticstorms.co/widget.js" data-magneticstorms data-theme="dark" data-locale="en" async></script>Light theme
<script src="https://magneticstorms.co/widget.js" data-magneticstorms data-theme="light" data-locale="en" async></script>Options
data-theme·dark|light. Colour scheme, defaults to dark.data-locale·en,ru,de,es,fr. Label language, defaults to en.async· Loads asynchronously, does not block rendering. Recommended.
JSON API
You can also call our API directly without the widget. Returns current Kp, storm class and update time.
GET https://magneticstorms.co/api/widget/kpCORS is open for all origins, with a 5-minute client-side cache.
Questions and answers
Is it free?
Yes, the widget and API are free with no limits. Please keep the backlink to magneticstorms.co.
How large is the script?
About 4 KB of minified JavaScript, no external dependencies.
Can I customise the design?
Two themes are available out of the box. For a custom design, call the JSON API directly and render the widget yourself.