AstroArt
This API powered by Astro DB and Vercel allows to retrieve games from IGDB and movies from TMDB in an unified model. You can test the current features of the API using the simple form below.
Testing the API
You can check out the existing movies and video games.
Find a work
Using the API
Endpoints
API endpoints start with /api
.
/works
Get all works in the database. It does not update their data.
/works/find
Find a work through its ID in a remote data source. If it doesn’t exist in our database, it will be added for a faster query next time (unless it’s been some time and the data needs to be updated).
Parameter | Description |
---|---|
type | a work type, case-sensitive |
id | string (if !slug) to find a work by ID |
slug | string (if !id) to find a work by slug if the data source has slugs |
Example: /api/works/find?type=Movie&id=501
Work types
Name | Data source |
---|---|
VideoGame | IGDB |
Movie | TMDB |
Data sources
Data sources are external websites we get our data from. Each one has a different set of features:
Name | Find by ID | Find by slug |
---|---|---|
IGDB | yes | yes |
TMDB | yes | no |
Models
Work
id |
slug |
type |
title |
createdAt |
updatedAt |
sourceId |