Potterapi
A REST Harry Potter API with images and information about books, characters and spells. Translated to many languages.
Install / Use
/learn @fedeperin/PotterapiREADME
PotterAPI
[!IMPORTANT]
The new base URL is https://potterapi-fedeperin.vercel.app but you can still use the old one (not recommended) https://potterapi.onrender.com/
PotterAPI is a Harry Potter API developed with Express.js and available in multiple languages.
This API stores information and images of books, characters and spells.
Live Documentation (Swagger UI)
Explore the API and its endpoints interactively using our Harry Potter API Documentation.
Languages
This API is available in the following languages:
If there's any problem with the translations, you can open an issue or a pull request.
Endpoints
The endpoints are the following:
<small>Note: The [lang] in the endpoint should be replaced by the corresponding language reference without the brackets (GET /en/books for example)</small>
Params
Every endpoint (excluding the <code>/random</code>s) can recieve the following query params:
Param | Recieves | Description |
----- | -------- | ----------- |
index | number | Returns only one item, the one that on the whole list has the index selected |
max | number | Returns the whole list cropped by the number passed |
page | number | If max is used, you can also use this param to indicate where to start cropping |
search | string | Searches in all the items and returns the best matches |
Examples
Javascript
const fetchSpells = async () => {
const res = await fetch('https://potterapi-fedeperin.vercel.app/en/spells')
const spells = await res.json()
return spells
}
fetch('https://potterapi-fedeperin.vercel.app/es/characters?search=Weasley')
.then(res => res.json())
.then(res => {
console.log(res)
})
Python
import requests
def get_book():
response = requests.get('https://potterapi-fedeperin.vercel.app/en/books')
books = response.json()
return books
Running locally
Clone Repo:
With HTTPS
$ git clone https://github.com/fedeperin/potterapi.git
With SSH
$ git clone git@github.com:fedeperin/potterapi.git
Run in dev mode
Run this to start a local server:
$ npm run dev
Test
Before submitting a PR or making a commit run the following command:
$ npm run test
Contributors
Thanks to our contributors for their time and effort
<a href="https://github.com/fedeperin"> <img src="./readme-assets/contributors/fedeperin.png" alt="fedeperin" width="50" height="50" style="border-radius: 50%;"> </a> <a href="https://github.com/vlaurencena"> <img src="./readme-assets/contributors/vlaurencena.jpg" alt="vlaurencena" width="50" height="50" style="border-radius: 50%;"> </a> <a href="https://github.com/romsendz"> <img src="./readme-assets/contributors/romsendz.jpg" alt="romsendz" width="50" height="50" style="border-radius: 50%;"> </a>Previous APIs
This is a version that unifies my Harry Potter API and my Harry Potter API English, also adding more info. This API is using Express.js instead of json-server.
Related Skills
bluebubbles
349.2kUse when you need to send or manage iMessages via BlueBubbles (recommended iMessage integration). Calls go through the generic message tool with channel="bluebubbles".
gh-issues
349.2kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
healthcheck
349.2kHost security hardening and risk-tolerance configuration for OpenClaw deployments
node-connect
349.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
