Open Collective Public GraphQL API preview 🚀

It’s finally there! We’re happy to announce the preview of our public GraphQL API (aka v2). Based on everything we learned with our internal GraphQL API (aka v1), we built something for everyone to use. We’re pretty excited, because it’s the first step in upgrading our platform and allowing anyone to interact with it.

First you need to get an API Key. The API Key give you access to the API and is automatically authenticating you. To get yours, go to your profile menu and navigate to the Applications section.

Then, for your first contact with our API, we recommend to use a GraphQL explorer, such as GraphQL Playground. It’s available as a desktop application and we really like it like that (thanks Prisma!)

The GraphQL endpoint is: https://api.opencollective.com/graphql/v2

There is multiple ways to pass the API Key:

  • in the URL: https://api.opencollective.com/graphql/v2/<API_KEY>
  • as an HTTP Header: Api-Key: <API_KEY>

One of the great things of GraphQL is that once you know the basics, it’s self documenting.

Using GraphQL Playground, you can just browse the documentation in the sidebar on the right.

If you don’t have access to it, you can always browse our static API reference.

Want to access basic info about your own Account?

Want to access any Account?

Don’t forget the query variables (that’s me):

If you want to see all Collectives I’m supporting, you can do:

On the opposite, if you want to see all the members of a given Collective:

Don’t forget the query variables (that’s Babel):

Now, maybe you want to browser the latest contributions received by this Collective?

And finally the latest expenses paid by this Collective?

This is a preview version, we’d now love your feedback on it!

We’re pretty sure there will be a few breaking changes, so don’t integrate it with anything in production yet! As soon as it’s out of preview, it will be considered stable and all the changes will be retro-compatible or with clear deprecations.

Tell us what you think about it, please share your ideas. You can open issues in our API repository. You can also directly contribute code in our GitHub repository. Like everything at Open Collective it’s Open Source, it’s built in JavaScript with GraphQL.js and Sequelize.

Happy exploration!

— François and the Open Collective Team

Open Collective

Official blog of OpenCollective.com

François Hodierne

Written by

French in Berlin. Dad x2. Engineering @opencollect. Ex @AccessDotWatch, @eyeem, @netvibes, @upian. Usually quiet on @medium.

Open Collective

Official blog of OpenCollective.com