---
title: "Discussion on \"How to Query The Graph Protocol for Onchain Data using Python\" | Hashnode"
description: "Discussion on \"How to Query The Graph Protocol for Onchain Data using Python\". A step-by-step guide on querying Subgraphs using Python, GraphQL, and Subgrounds."
url: "https://hashnode.com/posts/how-to-query-the-graph-protocol-for-onchain-data-using-python/631b15d23e8d6f3497acf608"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Query The Graph Protocol for Onchain Data using Python](https://thedataengineerblog.com/how-to-query-the-graph-protocol-for-onchain-data-using-python?utm_source=hashnode&utm_medium=feed)

A step-by-step guide on querying Subgraphs using Python, GraphQL, and Subgrounds.

Sep 9, 2022 · 8 min read · thedataengineerblog.com  
Updated Feb 21, 2024  
Read the article

-   [#web3](https://hashnode.com/tag/web3)
-   [#blockchain](https://hashnode.com/tag/blockchain)
-   [#graphql](https://hashnode.com/tag/graphql)
-   [#python](https://hashnode.com/tag/python)
-   [#thegraph](https://hashnode.com/tag/thegraph)
-   [#web30](https://hashnode.com/tag/web30)
-   [#ethereum](https://hashnode.com/tag/ethereum)
-   [#software-development](https://hashnode.com/tag/software-development)
-   [#software-engineering](https://hashnode.com/tag/software-engineering)
-   [#data-science](https://hashnode.com/tag/data-science)
-   [#data-engineering](https://hashnode.com/tag/data-engineering)

## Written by

[Tony Kipkemboi](https://hashnode.com/@townee)

@townee · United States

  
[View profile](https://hashnode.com/@townee)

Building AI Agents

Army veteran turned programmer and now a Developer Advocate building AI Agents. I love writing what I find inspiring and also practical.

## Responses 1

Markdown supported · ⌘↵ to post

[John Fáwọlé](https://hashnode.com/@johnfawole)

[Sep 9, 2022](https://hashnode.com/posts/how-to-query-the-graph-protocol-for-onchain-data-using-python/631b15d23e8d6f3497acf608/comment/631ba7813e8d6f3497ad0f86)

Wow, learned a lot from this.

But please, is Python the only language to query the Graph?

Lol. I'm asking because I'm not a Python dev, so I'm looking for a better option.

[Tony Kipkemboi](https://hashnode.com/@townee)

[Sep 10, 2022](https://hashnode.com/posts/how-to-query-the-graph-protocol-for-onchain-data-using-python/631b15d23e8d6f3497acf608/comment/631ba7813e8d6f3497ad0f86#reply-631c26433e8d6f3497ad1d08)

Hi John! Glad you enjoyed it. Yes, you can query subgraphs with other languages as well but I have not given it a shot. Here's a good starting point for you to check out; [thegraph.com/docs/en/querying/querying-best-pract…](https://thegraph.com/docs/en/querying/querying-best-practices/)

[John Fáwọlé](https://hashnode.com/@johnfawole)

[Sep 11, 2022](https://hashnode.com/posts/how-to-query-the-graph-protocol-for-onchain-data-using-python/631b15d23e8d6f3497acf608/comment/631ba7813e8d6f3497ad0f86#reply-631e0ba33e8d6f3497ad6ea9)

[Tony Kipkemboi](https://hashnode.com/@townee) Thank you so much, ser. I will check it out.
