# Have free quota but keep getting error on query quota in bigquery

**URL:** <https://discuss.httparchive.org/t/have-free-quota-but-keep-getting-error-on-query-quota-in-bigquery/2790>\
**Category:** Analysis\
**Created:** [September 4, 2024, 10:15am UTC](https://discuss.httparchive.org/t/have-free-quota-but-keep-getting-error-on-query-quota-in-bigquery/2790 "2024-09-04T10:15:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![richard](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@richard](https://discuss.httparchive.org/u/richard)\
**Post date:** [September 4, 2024, 10:15am UTC](https://discuss.httparchive.org/t/have-free-quota-but-keep-getting-error-on-query-quota-in-bigquery/2790/1 "2024-09-04T10:15:20Z")

</div>

Hi everyone,

I am new to the bigquery and httparchive. I follow [Analysis of Cookie Size](https://discuss.httparchive.org/t/analysis-of-cookie-size/1991) and try to extract the informaiton on third-party cookies. Everytime i run the code, it keeps pop up an error msg "Quota exceeded: Your project exceeded quota for free query bytes scanned. " I am not sure where I did it wrong. Anyone can help? Thanks.

(1) It shows that “this query will process 169.86 MB when run”.

(2) I create a brand-new google account and newly create a project, so it should be within the first 1 TiB of query data

Code is as following:

```sql
CREATE TEMPORARY FUNCTION getHeaders(payload STRING)
RETURNS ARRAY<STRING>
LANGUAGE js AS """
    var $ = JSON.parse(payload);
    var headers = $.response.headers;

    var cookies=[];
    var j=0;
    for (i in headers) { 
      if (headers[i].name.toLowerCase().indexOf('set-cookie')!= -1) {
        cookies[j] = headers[i].value;
        j++;
      }
   }
   
  try {
    return cookies;
  } catch (e) {
    return [];
  }

  
""";

SELECT 
   page, 
   url, 
   set_cookie
FROM (
  SELECT 
    page, 
    url, 
    getHeaders(payload) AS set_cookies
  FROM 
   `httparchive.requests.2020_06_01_desktop` TABLESAMPLE SYSTEM (0.001 PERCENT)
)
CROSS JOIN 
   UNNEST(set_cookies) AS set_cookie

```

---

<div class="post-metadata">

**Author:** ![tunetheweb](https://yyz1.discourse-cdn.com/flex035/user_avatar/discuss.httparchive.org/tunetheweb/32/1671_2.png) [@tunetheweb](https://discuss.httparchive.org/u/tunetheweb)\
**Post date:** [September 4, 2024, 10:45am UTC](https://discuss.httparchive.org/t/have-free-quota-but-keep-getting-error-on-query-quota-in-bigquery/2790/2 "2024-09-04T10:45:28Z")

</div>

I think you have to use a “sandbox view” if you don’t supply payment details to get access to the free tier:

> **[Pricing  |  BigQuery: Cloud Data Warehouse  |  Google Cloud](https://cloud.google.com/bigquery/pricing#free-tier)**
>
> Review pricing for BigQuery

---

<div class="post-metadata">

**Author:** ![richard](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@richard](https://discuss.httparchive.org/u/richard)\
**Post date:** [September 8, 2024, 5:53am UTC](https://discuss.httparchive.org/t/have-free-quota-but-keep-getting-error-on-query-quota-in-bigquery/2790/3 "2024-09-08T05:53:32Z")

</div>

Thanks a lot for the instruction. However, I think I was already in andbox view for it had a pop-up window reminding me to upgrade. Anyway, I solve the problem by supplying the payment detai.
