{"id":20325436,"url":"https://github.com/getyourguide/gaql-cli","last_synced_at":"2025-07-21T15:02:04.522Z","repository":{"id":42472368,"uuid":"259602132","full_name":"getyourguide/gaql-cli","owner":"getyourguide","description":"A command line interface to the Google Ads Query Language (GAQL)","archived":false,"fork":false,"pushed_at":"2025-07-01T15:01:28.000Z","size":1030,"stargazers_count":25,"open_issues_count":0,"forks_count":1,"subscribers_count":56,"default_branch":"main","last_synced_at":"2025-07-01T15:16:50.937Z","etag":null,"topics":["cli","gaql","google","google-ads","repl"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getyourguide.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-28T10:16:29.000Z","updated_at":"2025-07-01T14:59:06.000Z","dependencies_parsed_at":"2023-02-09T03:16:16.222Z","dependency_job_id":"2bf98321-7f81-45ab-8490-8946b56dce86","html_url":"https://github.com/getyourguide/gaql-cli","commit_stats":{"total_commits":36,"total_committers":8,"mean_commits":4.5,"dds":0.7222222222222222,"last_synced_commit":"3067f8b1fd22526c64e605610e451c91f3eb6126"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/getyourguide/gaql-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fgaql-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fgaql-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fgaql-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fgaql-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getyourguide","download_url":"https://codeload.github.com/getyourguide/gaql-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getyourguide%2Fgaql-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266324256,"owners_count":23911225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","gaql","google","google-ads","repl"],"created_at":"2024-11-14T19:39:49.248Z","updated_at":"2025-07-21T15:02:04.450Z","avatar_url":"https://github.com/getyourguide.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GAQL CLI\n\n[![PyPI version](https://badge.fury.io/py/gaql.svg)](https://badge.fury.io/py/gaql)\n![PyPI downloads](https://img.shields.io/pypi/dm/gaql)\n\nA CLI for running [GoogleAds queries](https://developers.google.com/google-ads/api/docs/query/overview).\n\n## Usage\n### Installing\n\n- `pip install gaql`\n- `pipx install gaql` (recommended)\n\n### Querying\nThe default mode. Runs either as a REPL, or as a one off command\n\n```bash\n- gaql [ACCOUNT_ID] - run in REPL mode\n- gaql [ACCOUNT_ID] [WORDS*] - run a single query. Note depending on your shell you may need to quote some queries if you run like this.\n\nflags:\n--help show the help message; basically the below\n-f|--format \u003ccsv|json|jsonl|proto\u003e specify an output format\n-o|--output \u003cfile\u003e specify an output file. Based on the extension, format is inferred. Non REPL usage only\n```\n\nExamples, using 1-000-000-000 as our demo account id:\n```bash\n# opens a REPL with json lines as the output format\ngaql -f jsonl 1-000-000-000\n\n# runs the query against the given account, outputting to the terminal the results as json lines\ngaql -f jsonl 1-000-000-000 'SELECT campaign.id FROM campaign'\n\n# runs the query against the given account, outputting to 'campaigns.jsonl' the result as json lines\ngaql -o campaigns.jsonl 1-000-000-000 'SELECT campaign.id FROM campaign'\n```\n\n**tip**: by default `LIMIT 100` will be added to your queries. To override this behavior, simply define your own `LIMIT X`.\n\n**tip**: the autocomplete will return only valid fields for the selected entity if you fill out the `FROM \u003centity\u003e` part\nfirst.\n\n### Other tools\nUsed for useful common queries. Currently only supports getting all accounts under an MCC, to help when managing multiple accounts. The MCC is taken from the `login_customer_id` field.\n- `gaql-tools queries clients`\n\n## Notes\n- credentials come from the environment \u003e the google .yaml file \u003e a user provided credential file\n- credentials, settings, and history are stored in `./config/gaql/*`. The credential file will only be present if you create it through a prompt (i.e you aren't using the ENV, or the YAML file Google specifies)\n\n## Ideas / TODO\n- tables as an output format\n- autocomplete for account ids (with caching)\n\n## Development\nWe're using [poetry](https://github.com/python-poetry/poetry) for local development, package management, and publishing. `pyenv` is\nrecommended for Python version management, and `pipx` for installation.\n\nBuild commands:\n\n```\nmake develop - install a development version. run via `poetry run gaql \u003cargs\u003e`\nmake publish - build and distribute to PyPi\nmake clean   - remove the existing build files\nmake format  - run black over the code\nmake lint    - lint and format the code\n```\n\n## Security\nFor sensitive security matters please contact security@getyourguide.com.\n\n## Legal\ngaql-cli is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full text.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetyourguide%2Fgaql-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetyourguide%2Fgaql-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetyourguide%2Fgaql-cli/lists"}