Skip to main content

garf for Google Ads & Search Ads 360 API

PyPI Downloads PyPI

garf-google-ads simplifies fetching data from Google Ads & Search Ads 360 API using SQL-like queries.

Prerequisites

Installation

pip install garf-google-ads

To work with Search Ads 360 API install run pip install garf-google-ads[search-ads-360]

Usage

Run as a library

import os

from garf.io import writer
from garf.community.google.ads import GoogleAdsApiReportFetcher

query = """
SELECT
  campaign.id,
  metrics.clicks AS clicks
FROM campaign
WHERE segments.date DURING LAST_7_DAYS
"""

fetched_report = (
  GoogleAdsApiReportFetcher(
    path_to_config=os.getenv('GOOGLE_ADS_CONFIGURATION_FILE_PATH')
  )
  .fetch(query, account=os.getenv('GOOGLE_ADS_ACCOUNT'))
)

console_writer = writer.create_writer('console')
console_writer.write(fetched_report, 'query')

Run via CLI

Install garf-executors package to run queries via CLI (pip install garf-executors).

garf <PATH_TO_QUERIES> --source google-ads \
  --output <OUTPUT_TYPE> \
  --source.account=GOOGLE_ADS_ACCOUNT \
  --source.path-to-config=./google-ads.yaml

where:

Available source parameters

name values comments
account Account(s) to get data from Can be MCC(s) as well
path-to-config Path to google-ads.yaml file ~/google-ads.yaml is a default location
expand-mcc Whether to force account expansion if MCC is provided False by default
customer-ids-query Optional query to find account satisfying specific condition
version Version of Google Ads API

Documentation

You can find a documentation on garf-google-ads here.

Metadata

Release files for garf-google-ads 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for garf-google-ads 1.3.0
File Size Uploaded Provenance Actions
garf_google_ads-1.3.0.tar.gz 32.5 kB Without provenance Details for garf_google_ads-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for garf-google-ads 1.3.0
File Interpreter ABI Platform Actions
garf_google_ads-1.3.0-py3-none-any.whl Python 3 none any Details for garf_google_ads-1.3.0-py3-none-any.whl

Total release size: 95.7 kB

Release files / garf_google_ads-1.3.0.tar.gz

Download URL garf_google_ads-1.3.0.tar.gz
Size 32.5 kB
Tags Source
SHA-256 checksum
How to use checksums
400defedca23ab91a685818cd22193fe00b943861557dbadd0551c34d58143d9
BLAKE2b-256 checksum
How to use checksums
83d7684e60703f5d2b2e0ced93f366508e5a9babd203549567cc680b804e9ddc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / garf_google_ads-1.3.0-py3-none-any.whl

Download URL garf_google_ads-1.3.0-py3-none-any.whl
Size 63.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d80e3ceccfaedbe91e927fefd6a86b8df6027aca58a8d2679b70713e028bc423
BLAKE2b-256 checksum
How to use checksums
3061b976701784b1f583a3b0d5bc5ae5630bc919fa35ead67c197a5a67066bbd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.6 {"installer":{"name":"uv","version":"0.13.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for garf-google-ads 1.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page