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).

ParameterDescription
typea work type, case-sensitive
idstring (if !slug)
to find a work by ID
slugstring (if !id)
to find a work by slug if the data source has slugs

Example: /api/works/find?type=Movie&id=501

Work types

NameData source
VideoGameIGDB
MovieTMDB

Data sources

Data sources are external websites we get our data from. Each one has a different set of features:

NameFind by IDFind by slug
IGDByesyes
TMDByesno

Models

Work

id
slug
type
title
createdAt
updatedAt
sourceId