Webmotors lifestyle categories
The lifestyle categories Webmotors uses to group cars (electric cars, SUVs, family cars, luxury cars, first car...): name, slug, id, link and banners. Pass a name as lifestyle to the search.
Every response includes credits_used: the credits this call cost.
Part of the Webmotors API: 8 endpoints with prices, use cases and example responses.
Parameters
None.
Every endpoint also takes fresh, raw, fields (see lean responses and caching).
Example
curl "https://api.api.sh/webmotors/v1/categories" \
-H "x-api-key: $APISH_KEY" import os, requests
res = requests.get(
"https://api.api.sh/webmotors/v1/categories",
params={},
headers={"x-api-key": os.environ["APISH_KEY"]},
timeout=120,
)
res.raise_for_status()
data = res.json() const url = new URL("https://api.api.sh/webmotors/v1/categories");
const res = await fetch(url, { headers: { "x-api-key": process.env.APISH_KEY } });
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
const data = await res.json(); Response
A JSON object with the fields described above, plus raw (the source's own data), cached, fetched_at and credits_used. Errors return {"success": false, "error": "…"} with the HTTP status (see errors). A lookup that ran but found nothing (404) costs the price above; refused calls and errors on our side are free (what's charged).
Example response (real call, trimmed: lists cut to 2 items, long text shortened, raw left out)
{"count": 23,"categories": [{"name": "Carros elétricos","slug": "carros-eletricos","id": 1840168,"url": "https://www.webmotors.com.br/carros-eletricos","search_value": "Carros elétricos","banner_desktop": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/BannerDesktop/498ea3c9-2970-4597-9001-231c8a64656e_BannerDesktop.jpg","card_desktop": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/CardDesktop/cdb35e13-66a2-4653-8414-f41f408e34da_CardDesktop.webp","banner_mobile": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/BannerMobile/c3402e1d-82fe-4005-8f6b-154e168cc114_BannerMobile.jpg","card_mobile": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/CardMobile/6d97a796-670e-401a-a279-1b0fcda6e850_CardMobile.webp"},{"name": "Hatches","slug": "hatches","id": 1840177,"url": "https://www.webmotors.com.br/hatches","search_value": "Hatches","banner_desktop": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/BannerDesktop/69266426-8221-4f0b-8567-236ff916a84e_BannerDesktop.jpg","card_desktop": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/CardDesktop/980c1c63-9e76-490e-b460-af82933530ae_CardDesktop.jpg","banner_mobile": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/BannerMobile/1fdd3916-3b13-4f88-b19f-92bb286a4878_BannerMobile.jpg","card_mobile": "https://catalogo.webmotors.com.br/imagens/prod/fotos-temas/CardMobile/332fd63d-4606-4721-a33a-f16a19a32879_CardMobile.jpg"},"… 21 more"],"cached": false,"credits_used": 1}