What Anime
AnimeIntroducing Trace.moe - A Public API Documentation
Are you tired of manually searching for anime screenshots or videos on the internet? Look no further! Trace.moe is your one-stop solution for searching anime screenshots and videos. It is an open API documentation that can help you identify the anime from a screenshot, video or GIF.
API Requests
To access the Trace.moe API, start by sending a POST request to https://trace.moe/api/search
with the following JSON data:
{
"image": "data:image/jpeg;base64,/9j/4QqB"
}
You can replace the image
property with your own encoded image data.
JavaScript Example
Here's an example of how to use the Trace.moe API in JavaScript:
const imageURL = 'https://i.imgur.com/TcnbPWb.jpg';
const formData = new FormData();
const xhr = new XMLHttpRequest();
formData.append('image', imageURL);
xhr.addEventListener('readystatechange', function() {
if (this.readyState === this.DONE) {
const response = JSON.parse(this.responseText);
console.log(response.docs);
}
});
xhr.open('POST', 'https://trace.moe/api/search');
xhr.send(formData);
The above code snippet sends a POST request with the image URL data to the Trace.moe API, parses the JSON response, and logs the docs
property.
Conclusion
Trace.moe API is a helpful resource for searching anime screenshots and videos. You can use it to identify the anime from a screenshot or video URL. Using the API with JavaScript is simple and straightforward, as shown in the example code above. Happy coding and searching!