Ergast API for Gatsby

Simple source plugin to grab the latest Formula 1 season data from the fantastic Ergast API.

🏎 Quick start

yarn add gatsby-source-ergast


npm i gatsby-source-ergast

Add this to your gatsby-config.js file πŸ‘

plugins: [

Enjoy πŸŽ‰

🧐 What’s inside?

β”œβ”€β”€ .gitignore
β”œβ”€β”€ gatsby-node.js
β”œβ”€β”€ index.js
β”œβ”€β”€ LICENSE
β”œβ”€β”€ package.json
  • .gitignore: Stuff not to track.
  • gatsby-node.js: The good stuff πŸ‘€.
  • index.js: A file that will be loaded by default when the plugin is required by another application.
  • LICENSE: This source plugin is licensed under the 0BSD license.
  • package.json: A manifest file, which includes things like metadata.
  • A text file containing useful reference information.

πŸ™ Contributing

Feel free to submit updates/PRs for this source plugin. It’s still very basic and could be expanded to include a lot more control over the data pulled from Ergast.


Inline with the request from Ergast to keep calls to a minimum, Gatsby will call the API to reqest data at build-time. The slight downside being that you’ll need to manually build the site (or feel free to make a webhook) after a race meeting, to ensure the results/standings and times are all up to date.

If this is something i end up creating, i’ll update the plugin readme to reflect this.