# How to fetch query id for performed queries

**URL:** <https://community.bitquery.io/t/how-to-fetch-query-id-for-performed-queries/1986>\
**Category:** GraphQL API\
**Tags:** support\
**Created:** [July 4, 2024, 11:21am UTC](https://community.bitquery.io/t/how-to-fetch-query-id-for-performed-queries/1986 "2024-07-04T11:21:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Blocknaut](https://avatars.discourse-cdn.com/v4/letter/b/bcef8e/32.png) [@Blocknaut](https://community.bitquery.io/u/Blocknaut)\
**Post date:** [July 4, 2024, 11:21am UTC](https://community.bitquery.io/t/how-to-fetch-query-id-for-performed-queries/1986/1 "2024-07-04T11:21:28Z")

</div>

Hi everybody. I am trying to calculate how many points are consumed by my queries to the v1 API using python.

I see that i can make a query to { utilities { metrics { points } } }, but i need to specify the query id. How can i retrieve the query id for a query that my application performed? It is not available in the query response.

---

<div class="post-metadata">

**Author:** ![Omkar](https://avatars.discourse-cdn.com/v4/letter/o/bb73d2/32.png) [@Omkar](https://community.bitquery.io/u/Omkar)\
**Post date:** [July 5, 2024, 4:40am UTC](https://community.bitquery.io/t/how-to-fetch-query-id-for-performed-queries/1986/2 "2024-07-05T04:40:41Z")

</div>

Hello @Blocknaut,

Every query request returns a `query_id`, which you can find in the response headers. For example, in Python:

```auto
response = requests.post(url, headers=headers, json=payload)
print(response.headers.get('x-graphql-query-id'))

```

This will give the `query_id`.
