₹0.00

No products in the cart.

₹0.00

No products in the cart.

HomeAPIAPI | Random Cat Photo Generator API

API | Random Cat Photo Generator API

Random Cat Image Generator is a free API. You can use it for free. With its help, you can also create a Telegram bot and a website and earn money. It is very easy to do that. And you can do it in all programming languages.

Random Cat Photo Generator API

Random Cat Image generator API is very easy to use, you will get an endpoint, and simply you have to make a GET request on it.

GET https://api.thecatapi.com/v1/images/search

Only one image may be sent per request. The following image content types are supported Cat API free:

  • image/jpeg
  • image/png
  • image/gif
  • image/tiff

The response is an Image object within a data envelope. Example response TheCatAPI:

[ { "id": "MTY1ODc5MA", "url":"https://cdn2.thecatapi.com/images/MTY1ODc5MA.png", "width": 638, "height": 431 } ]

How To Use Random Cat Picture API

PHP

<?php    $curl = curl_init();    curl_setopt_array($curl, [    CURLOPT_URL => "https://api.thecatapi.com/v1/images/search",    CURLOPT_RETURNTRANSFER => true,    CURLOPT_ENCODING => "",    CURLOPT_MAXREDIRS => 10,    CURLOPT_TIMEOUT => 30,    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,    CURLOPT_CUSTOMREQUEST => "GET",  ]);    $response = curl_exec($curl);  $err = curl_error($curl);    curl_close($curl);    if ($err) {    echo "cURL Error #:" . $err;  } else {    echo $response;  }

JavaScript

const options = {method: 'GET'};    fetch('https://api.thecatapi.com/v1/images/search', options)    .then(response => response.json())    .then(response => console.log(response))    .catch(err => console.error(err));

Python

import requests    url = "https://api.thecatapi.com/v1/images/search"    response = requests.request("GET", url)    print(response.text)

For More Detail – https://docs.thecatapi.com/

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest news

Adlinkfly Original With License Key Free Download

Adlinkfly Original With License Key Free Download – Today, we have shared Adlinkfly Original Script with Original License Key to everyone. The shared file...

Median UI v1.7 + (AMP) Premium Blogger Template Download

Hello and welcome to TechnoStone. In this post, I will be introducing you to the Median UI v1.7 Blogger Template. Median UI v1.7 is a...

Plus UI V2.6.1 Blogger Template with Safelink Free Download

Hey there! In this post, I want to tell you about a really cool blogger template called Plus UI. It's a premium design that's...

FROM SHOP