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.3

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.3
File Size Uploaded Provenance Actions
garf_google_ads-1.3.3.tar.gz 32.7 kB Without provenance Details for garf_google_ads-1.3.3.tar.gz

Built distribution (wheel)

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

Total release size: 96.1 kB

Release files / garf_google_ads-1.3.3.tar.gz

Download URL garf_google_ads-1.3.3.tar.gz
Size 32.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9ec9ee662574718b9366c1f7f2e752235315e445f8f42e900080d67eb3bb5fb5
BLAKE2b-256 checksum
How to use checksums
8ec3a519994d9b4b5e6e8e064668e2d597580837eb9d100181d0c949f14ca058
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.3-py3-none-any.whl

Download URL garf_google_ads-1.3.3-py3-none-any.whl
Size 63.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0560765a4184a9c3d6ea87e846e4932e51417f7ef1668aec21c1673ed279b2b
BLAKE2b-256 checksum
How to use checksums
fa6ca68d42ccb7bf8680a903e3e313f4c23da71433a49c4d596ac5545ab68722
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","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.3

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