JavaScript Widget
Display the latest reports from lost-cat.org on your own website, free of charge.
This widget is intended for town halls, associations, shelters, veterinarians and any website that wants to help find lost pets nearby.
Rendering example
Here is the widget as it will appear on your site, with, for example, the latest lost and found reports (excluding reunited), across all countries.
Get a key
The widget only works with a key linked to your domain name. It is free: just ask us for one, indicating the address of the page where you want to display the reports.
Installation
Copy this code into your page, where the reports should appear:
<div class="animalperdu-widget"
data-key="YOUR-KEY"
data-country="za"
data-language="en"></div>
<script src="https://www.lost-cat.org/widget.js" async></script>
The script can be placed anywhere in the page. A single page can contain several widgets.
Parameters
| Parameter | Values | Description |
|---|---|---|
| data-key | required | Your key. |
| data-language | de, en, es, fr, it, nl, pl, pt, ro | The language of the reports and labels. If missing or not supported, English is used. |
| data-country | dz, ad, ar, au, at, be, bo, br, cm, ca, cl, co, cr, cu, do, ec, sv, fr, gf, pf, de, gb, gp, gt, hn, in, it, jp, ke, li, lu, mq, yt, mx, mc, nl, nc, nz, ni, ng, pk, pa, py, pe, ph, pl, pt, pr, ro, re, bl, mf, pm, sg, za, es, ch, tz, us, uy, ve, wf | The country of the reports. Without this parameter, reports from all countries are displayed. |
| data-type | all, lost, found, lost_found, reunited | The report type: all, lost, found, lost and found (excluding reunited), or reunited. |
| data-lat | -90 → 90 | The latitude of the center of the search area, in decimal degrees. |
| data-lng | -180 → 180 | The longitude of the center of the search area, in decimal degrees. |
| data-radius | 1 → 500 | The radius of the search area, in kilometers (25 by default). |
| data-limit | 1 → 24 | The number of reports displayed (8 by default). |
| data-theme | auto, light, dark | The widget appearance (automatic by default, based on the visitor's preferences). |
| data-accent | #87b0b7 | The color of the button and links, in hexadecimal format. |
If you specify a position with data-lat and data-lng, the data-country parameter is ignored.
Examples
<div class="animalperdu-widget"
data-key="YOUR-KEY"
data-language="fr"
data-lat="45.892042"
data-lng="6.711018"
data-radius="20"
data-limit="12"></div>
Lost reports in Belgium, displayed in Dutch, on a dark background
<div class="animalperdu-widget"
data-key="YOUR-KEY"
data-language="nl"
data-country="be"
data-type="lost"
data-theme="dark"></div>
Good to know
- The widget adapts to the available width and does not set any cookie or tracker.
- Its styles are isolated from your site's styles and therefore cannot disturb them.
- The reports are updated every hour.
- The reports and the publish button open lost-cat.org in a new tab.