MWAPI Usage Guide
Welcome to our API! This guide will help you get started with making requests and utilizing our API effectively.
Authentication
To use the API, you'll need an API key. Include your API key in each request using the key
query parameter.
You can also pass x-api-key
in the headers if you prefer to use this method.
For example:
https://mwapi.xyz/api/{endpoint}?key=YOUR_API_KEY
Endpoints
Our API provides the following endpoints:
/activities
— returns a random activity./facts
— returns a random fact./me
— returns rate limit information based on your API key./dadjoke
— returns a famous dad joke./playingcard
— returns a random playing card from a standard 52 card deck./status
— returns the status of our endpoints, no authorization is required for this endpoint./penguins
— returns penguin images, you can use&type=
in the request, accepted types are "gif,png,jpg,jpeg". If no type is given it returns all types./cats
— returns cat images, you can use&type=
in the request, accepted types are "gif,png,jpg,jpeg". If no type is given it returns all types./space
— returns space images, you can use&type=
in the request, accepted types are "gif,png,jpg,jpeg". If no type is given it returns all types./emoji
— returns an emoji, you can use&nsfw=true
to include NSFW emoji in the results./trivia
— return an array of question data - questions provided by The Trivia API/chatbot
BETA
— This endpoint is to interact with the chatbot, it's ratelimited to 10 requests per 60 seconds for fairness./yesno
— Use this endpoint to get a random yes or no gif, you can also use&force=yes|no
to force the output/dictionary
— Use this endpoint to search up words from the dictionary, pass the word with&word=
/thesaurus
— Use this endpoint to get different meaning for words from the thesaurus, pass the word with&word=
/screenshot
— Use this endpoint to take a screenshot of a website, you must pass the url with&url=
WARNING
by default all screenshots are automatically deleted after 12 hours, to prevent deletion for 7 days you can pass&moretime=true
/cotd
— Use this endpoint to get an image of the Cat of the day, For more images please visit this recommended site catoftheday/dvla
— Use this endpoint to query the DVLA vehicle enquiry service, use®=
to pass the VRM.
Rate Limiting
Our API enforces rate limiting to ensure fair usage. You are allowed 1,000 requests per day.
If you exceed this limit, you will receive the 429 Rate limit exceeded
error code response.
If you require a higher rate limit, please do get in touch with us — we are happy to increase your limit if required, free of charge.
Example Request
To make a request, you can use tools like cURL, Postman, Restman, or through code.
Here is an example using cURL:
curl -X GET "https://mwapi.xyz/api/{endpoint}?key=YOUR_API_KEY"
Response Format
Responses from our API are in JSON format. Here is an example of a successful response:
{"status": "", "data": {...}}
Handling Errors
If there is an error with your request, you will receive an error code and message like the example below:
{"status": "error", "message": "Invalid API key"}
Support
If you encounter any issues or have questions, please contact us in the Discord server.