getanyapi 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. getanyapi/__init__.py +76 -0
  2. getanyapi/_account.py +132 -0
  3. getanyapi/_async_client.py +215 -0
  4. getanyapi/_client.py +274 -0
  5. getanyapi/_errors.py +115 -0
  6. getanyapi/_pagination.py +295 -0
  7. getanyapi/_transport.py +239 -0
  8. getanyapi/platforms/__init__.py +89 -0
  9. getanyapi/platforms/ahrefs.py +384 -0
  10. getanyapi/platforms/airbnb.py +120 -0
  11. getanyapi/platforms/alibaba.py +95 -0
  12. getanyapi/platforms/amazon.py +442 -0
  13. getanyapi/platforms/appstore.py +95 -0
  14. getanyapi/platforms/bluesky.py +215 -0
  15. getanyapi/platforms/booking.py +128 -0
  16. getanyapi/platforms/coinmarketcap.py +113 -0
  17. getanyapi/platforms/congress.py +106 -0
  18. getanyapi/platforms/dexscreener.py +104 -0
  19. getanyapi/platforms/ebay.py +215 -0
  20. getanyapi/platforms/email.py +166 -0
  21. getanyapi/platforms/facebook.py +2324 -0
  22. getanyapi/platforms/fiverr.py +122 -0
  23. getanyapi/platforms/github.py +954 -0
  24. getanyapi/platforms/glassdoor.py +93 -0
  25. getanyapi/platforms/google.py +232 -0
  26. getanyapi/platforms/google_ads.py +380 -0
  27. getanyapi/platforms/google_finance.py +170 -0
  28. getanyapi/platforms/google_shopping.py +103 -0
  29. getanyapi/platforms/hackernews.py +276 -0
  30. getanyapi/platforms/indeed.py +114 -0
  31. getanyapi/platforms/instagram.py +1868 -0
  32. getanyapi/platforms/linkedin.py +1064 -0
  33. getanyapi/platforms/maps.py +412 -0
  34. getanyapi/platforms/pandaexpress.py +262 -0
  35. getanyapi/platforms/person.py +96 -0
  36. getanyapi/platforms/pinterest.py +96 -0
  37. getanyapi/platforms/playstore.py +99 -0
  38. getanyapi/platforms/polymarket.py +109 -0
  39. getanyapi/platforms/realtor.py +104 -0
  40. getanyapi/platforms/reddit.py +582 -0
  41. getanyapi/platforms/redfin.py +95 -0
  42. getanyapi/platforms/rednote.py +807 -0
  43. getanyapi/platforms/sec.py +118 -0
  44. getanyapi/platforms/semrush.py +358 -0
  45. getanyapi/platforms/snapchat.py +146 -0
  46. getanyapi/platforms/social.py +105 -0
  47. getanyapi/platforms/spotify.py +588 -0
  48. getanyapi/platforms/substack.py +142 -0
  49. getanyapi/platforms/threads.py +358 -0
  50. getanyapi/platforms/tiktok.py +1827 -0
  51. getanyapi/platforms/tiktok_shop.py +536 -0
  52. getanyapi/platforms/tripadvisor.py +180 -0
  53. getanyapi/platforms/trustpilot.py +114 -0
  54. getanyapi/platforms/truthsocial.py +226 -0
  55. getanyapi/platforms/twitter.py +798 -0
  56. getanyapi/platforms/upwork.py +119 -0
  57. getanyapi/platforms/walmart.py +93 -0
  58. getanyapi/platforms/web.py +264 -0
  59. getanyapi/platforms/whatsapp.py +91 -0
  60. getanyapi/platforms/yahoo_finance.py +95 -0
  61. getanyapi/platforms/yelp.py +141 -0
  62. getanyapi/platforms/youtube.py +1452 -0
  63. getanyapi/platforms/zillow.py +218 -0
  64. getanyapi/py.typed +0 -0
  65. getanyapi/types.py +170 -0
  66. getanyapi-0.1.0.dist-info/METADATA +155 -0
  67. getanyapi-0.1.0.dist-info/RECORD +68 -0
  68. getanyapi-0.1.0.dist-info/WHEEL +4 -0
@@ -0,0 +1,93 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the glassdoor platform."""
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import TYPE_CHECKING
7
+
8
+ from pydantic import BaseModel, ConfigDict, Field
9
+ from typing_extensions import NotRequired, Required, TypedDict, Unpack
10
+
11
+ from ..types import RequestOptions, RunResult
12
+
13
+ if TYPE_CHECKING:
14
+ from .._async_client import AsyncAnyAPI
15
+ from .._client import AnyAPI
16
+
17
+
18
+ class GlassdoorJobsInput(TypedDict, total=False):
19
+ """Input for Glassdoor Jobs."""
20
+
21
+ limit: NotRequired[int]
22
+ """Maximum number of results to return (1-20, default 20). You are billed per result returned, so a lower limit costs less. Range: 1 to 20."""
23
+ url: Required[str]
24
+ """A Glassdoor company or job search page URL (e.g. https://www.glassdoor.com/Jobs/Google-Jobs-E9079.htm)."""
25
+
26
+
27
+ class GlassdoorJobsData(BaseModel):
28
+ items: list[GlassdoorJobsItem] = Field(
29
+ description="Job listing records: title, employer, location, salary estimate, rating, and posting details."
30
+ )
31
+
32
+
33
+ class GlassdoorJobsItem(BaseModel):
34
+ model_config = ConfigDict(extra="allow")
35
+
36
+ title: str
37
+ url: str
38
+
39
+
40
+ class GlassdoorNamespace:
41
+ """Typed methods for this platform. Attached lazily to the client."""
42
+
43
+ def __init__(self, client: "AnyAPI") -> None:
44
+ self._client = client
45
+
46
+ def jobs(
47
+ self,
48
+ *,
49
+ options: RequestOptions | None = None,
50
+ **input: Unpack[GlassdoorJobsInput],
51
+ ) -> RunResult[GlassdoorJobsData]:
52
+ """Glassdoor Jobs
53
+
54
+ Fetch job listings from any Glassdoor company or job search page URL - up to
55
+ 20 normalized job records per request at a flat USD price.
56
+
57
+ Price: $0.005 per request plus $0.00475 per result.
58
+
59
+ Example:
60
+ res = client.glassdoor.jobs(limit=3, url="https://www.glassdoor.com/Job/software-engineer-jobs-SRCH_KO0,17.htm")
61
+ """
62
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
63
+ "glassdoor.jobs", dict(input), options
64
+ )
65
+ return RunResult[GlassdoorJobsData].model_validate(raw)
66
+
67
+
68
+ class AsyncGlassdoorNamespace:
69
+ """Typed methods for this platform. Attached lazily to the client."""
70
+
71
+ def __init__(self, client: "AsyncAnyAPI") -> None:
72
+ self._client = client
73
+
74
+ async def jobs(
75
+ self,
76
+ *,
77
+ options: RequestOptions | None = None,
78
+ **input: Unpack[GlassdoorJobsInput],
79
+ ) -> RunResult[GlassdoorJobsData]:
80
+ """Glassdoor Jobs
81
+
82
+ Fetch job listings from any Glassdoor company or job search page URL - up to
83
+ 20 normalized job records per request at a flat USD price.
84
+
85
+ Price: $0.005 per request plus $0.00475 per result.
86
+
87
+ Example:
88
+ res = client.glassdoor.jobs(limit=3, url="https://www.glassdoor.com/Job/software-engineer-jobs-SRCH_KO0,17.htm")
89
+ """
90
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
91
+ "glassdoor.jobs", dict(input), options
92
+ )
93
+ return RunResult[GlassdoorJobsData].model_validate(raw)
@@ -0,0 +1,232 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the google platform."""
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import TYPE_CHECKING
7
+
8
+ from pydantic import BaseModel, ConfigDict, Field
9
+ from typing_extensions import NotRequired, Required, TypedDict, Unpack
10
+
11
+ from ..types import RequestOptions, RunResult
12
+
13
+ if TYPE_CHECKING:
14
+ from .._async_client import AsyncAnyAPI
15
+ from .._client import AnyAPI
16
+
17
+
18
+ class GoogleImagesInput(TypedDict, total=False):
19
+ """Input for Google Images."""
20
+
21
+ limit: NotRequired[int]
22
+ """Maximum number of results to return (1-20, default 20). You are billed per result returned, so a lower limit costs less. Range: 1 to 20."""
23
+ query: Required[str]
24
+ """Image search query (e.g. golden gate bridge at sunset)."""
25
+
26
+
27
+ class GoogleNewsInput(TypedDict, total=False):
28
+ """Input for Google News."""
29
+
30
+ limit: NotRequired[int]
31
+ """Maximum number of results to return (1-20, default 20). You are billed per result returned, so a lower limit costs less. Range: 1 to 20."""
32
+ query: Required[str]
33
+ """News search query; supports operators like '-', 'OR', and 'site:' (e.g. bitcoin site:cnn.com)."""
34
+ region: NotRequired[str]
35
+ """Region and language for the search as COUNTRY:lang (e.g. US:en). Default: US:en."""
36
+ timeframe: NotRequired[str]
37
+ """Time window for results: 1h, 1d, 7d, 1y, or all (e.g. 1d). Default: 7d."""
38
+
39
+
40
+ class GoogleSearchInput(TypedDict, total=False):
41
+ """Input for Google Search."""
42
+
43
+ gl: NotRequired[str]
44
+ """Two-letter country code for result localization (e.g. us, gb, de). Default: us."""
45
+ query: Required[str]
46
+ """The Google search query."""
47
+
48
+
49
+ class GoogleImagesData(BaseModel):
50
+ items: list[GoogleImagesItem] = Field(
51
+ description="Image result records: image URL, dimensions, title, and the source page it appears on."
52
+ )
53
+
54
+
55
+ class GoogleImagesItem(BaseModel):
56
+ model_config = ConfigDict(extra="allow")
57
+
58
+ title: str
59
+ url: str
60
+
61
+
62
+ class GoogleNewsData(BaseModel):
63
+ items: list[GoogleNewsItem] = Field(
64
+ description="Article records: headline, source name, article link, and publish time."
65
+ )
66
+
67
+
68
+ class GoogleNewsItem(BaseModel):
69
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
70
+
71
+ published_at: str | None = Field(
72
+ default=None,
73
+ alias="publishedAt",
74
+ description="Publish time. Present whenever the upstream returns this record.",
75
+ )
76
+ snippet: str | None = Field(
77
+ default=None, description="Article snippet when available."
78
+ )
79
+ source: str | None = Field(
80
+ default=None,
81
+ description="Publisher name. Present whenever the upstream returns this record.",
82
+ )
83
+ title: str
84
+ url: str = Field(description="Article link.")
85
+
86
+
87
+ class GoogleSearchData(BaseModel):
88
+ query: str
89
+ results: list[GoogleSearchResult]
90
+
91
+
92
+ class GoogleSearchResult(BaseModel):
93
+ model_config = ConfigDict(extra="allow")
94
+
95
+ link: str
96
+ position: int
97
+ snippet: str
98
+ title: str
99
+
100
+
101
+ class GoogleNamespace:
102
+ """Typed methods for this platform. Attached lazily to the client."""
103
+
104
+ def __init__(self, client: "AnyAPI") -> None:
105
+ self._client = client
106
+
107
+ def images(
108
+ self,
109
+ *,
110
+ options: RequestOptions | None = None,
111
+ **input: Unpack[GoogleImagesInput],
112
+ ) -> RunResult[GoogleImagesData]:
113
+ """Google Images
114
+
115
+ Run a Google Images search and get structured results - image URLs,
116
+ dimensions, titles, and source pages - with flat per-request USD pricing.
117
+
118
+ Price: $0.00005 per request plus $0.0024 per result.
119
+
120
+ Example:
121
+ res = client.google.images(limit=5, query="golden retriever")
122
+ """
123
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
124
+ "google.images", dict(input), options
125
+ )
126
+ return RunResult[GoogleImagesData].model_validate(raw)
127
+
128
+ def news(
129
+ self, *, options: RequestOptions | None = None, **input: Unpack[GoogleNewsInput]
130
+ ) -> RunResult[GoogleNewsData]:
131
+ """Google News
132
+
133
+ Search Google News by keyword and get fresh articles - headlines, sources,
134
+ links, and publish times - as clean JSON, billed per request in USD.
135
+
136
+ Price: $0.00325 per request.
137
+
138
+ Example:
139
+ res = client.google.news(limit=5, query="openai")
140
+ """
141
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
142
+ "google.news", dict(input), options
143
+ )
144
+ return RunResult[GoogleNewsData].model_validate(raw)
145
+
146
+ def search(
147
+ self,
148
+ *,
149
+ options: RequestOptions | None = None,
150
+ **input: Unpack[GoogleSearchInput],
151
+ ) -> RunResult[GoogleSearchData]:
152
+ """Google Search
153
+
154
+ Run a Google web search and get the organic results (title, link, snippet,
155
+ position) as clean JSON. One call, billed per request in real dollars.
156
+
157
+ Price: $0.00099 per request.
158
+
159
+ Example:
160
+ res = client.google.search(query="best coffee maker")
161
+ """
162
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
163
+ "google.search", dict(input), options
164
+ )
165
+ return RunResult[GoogleSearchData].model_validate(raw)
166
+
167
+
168
+ class AsyncGoogleNamespace:
169
+ """Typed methods for this platform. Attached lazily to the client."""
170
+
171
+ def __init__(self, client: "AsyncAnyAPI") -> None:
172
+ self._client = client
173
+
174
+ async def images(
175
+ self,
176
+ *,
177
+ options: RequestOptions | None = None,
178
+ **input: Unpack[GoogleImagesInput],
179
+ ) -> RunResult[GoogleImagesData]:
180
+ """Google Images
181
+
182
+ Run a Google Images search and get structured results - image URLs,
183
+ dimensions, titles, and source pages - with flat per-request USD pricing.
184
+
185
+ Price: $0.00005 per request plus $0.0024 per result.
186
+
187
+ Example:
188
+ res = client.google.images(limit=5, query="golden retriever")
189
+ """
190
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
191
+ "google.images", dict(input), options
192
+ )
193
+ return RunResult[GoogleImagesData].model_validate(raw)
194
+
195
+ async def news(
196
+ self, *, options: RequestOptions | None = None, **input: Unpack[GoogleNewsInput]
197
+ ) -> RunResult[GoogleNewsData]:
198
+ """Google News
199
+
200
+ Search Google News by keyword and get fresh articles - headlines, sources,
201
+ links, and publish times - as clean JSON, billed per request in USD.
202
+
203
+ Price: $0.00325 per request.
204
+
205
+ Example:
206
+ res = client.google.news(limit=5, query="openai")
207
+ """
208
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
209
+ "google.news", dict(input), options
210
+ )
211
+ return RunResult[GoogleNewsData].model_validate(raw)
212
+
213
+ async def search(
214
+ self,
215
+ *,
216
+ options: RequestOptions | None = None,
217
+ **input: Unpack[GoogleSearchInput],
218
+ ) -> RunResult[GoogleSearchData]:
219
+ """Google Search
220
+
221
+ Run a Google web search and get the organic results (title, link, snippet,
222
+ position) as clean JSON. One call, billed per request in real dollars.
223
+
224
+ Price: $0.00099 per request.
225
+
226
+ Example:
227
+ res = client.google.search(query="best coffee maker")
228
+ """
229
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
230
+ "google.search", dict(input), options
231
+ )
232
+ return RunResult[GoogleSearchData].model_validate(raw)
@@ -0,0 +1,380 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the google_ads platform."""
3
+
4
+ from __future__ import annotations
5
+
6
+ from typing import Literal, TYPE_CHECKING
7
+
8
+ from pydantic import BaseModel, ConfigDict, Field
9
+ from typing_extensions import NotRequired, Required, TypedDict, Unpack
10
+
11
+ from ..types import RequestOptions, RunResult
12
+ from .._pagination import (
13
+ AsyncPaginator,
14
+ Paginator,
15
+ apaginate,
16
+ paginate,
17
+ )
18
+
19
+ if TYPE_CHECKING:
20
+ from .._async_client import AsyncAnyAPI
21
+ from .._client import AnyAPI
22
+
23
+
24
+ class GoogleAdsAdDetailsInput(TypedDict, total=False):
25
+ """Input for Google Ads Ad Details."""
26
+
27
+ url: Required[str]
28
+ """Google Ads Transparency Center creative URL (e.g. "https://adstransparency.google.com/advertiser/AR.../creative/CR...")."""
29
+
30
+
31
+ class GoogleAdsAdvertiserSearchInput(TypedDict, total=False):
32
+ """Input for Google Ads Advertiser Search."""
33
+
34
+ query: Required[str]
35
+ """Advertiser name or keyword to search for (e.g. "lululemon")."""
36
+ region: NotRequired[str]
37
+ """Two-letter country code to scope results (e.g. "AU", "CA"). Defaults to US."""
38
+
39
+
40
+ class GoogleAdsCompanyAdsInput(TypedDict, total=False):
41
+ """Input for Google Ads Company Ads."""
42
+
43
+ advertiserId: NotRequired[str]
44
+ """Advertiser ID. Provide either domain or advertiserId."""
45
+ cursor: NotRequired[str]
46
+ """Opaque pagination cursor from a previous response's nextCursor."""
47
+ domain: NotRequired[str]
48
+ """Company domain (e.g. "lululemon.com"). Provide either domain or advertiserId."""
49
+ format: NotRequired[Literal["text", "image", "video"]]
50
+ """Ad format filter."""
51
+ platform: NotRequired[
52
+ Literal[
53
+ "google_maps", "google_play", "google_search", "google_shopping", "youtube"
54
+ ]
55
+ ]
56
+ """Platform filter."""
57
+ region: NotRequired[str]
58
+ """Two-letter country code to scope results (e.g. "US", "AU")."""
59
+ topic: NotRequired[Literal["all", "political"]]
60
+ """Search topic. "political" requires a region."""
61
+
62
+
63
+ class GoogleAdsSearchInput(TypedDict, total=False):
64
+ """Input for Google Ads Transparency."""
65
+
66
+ limit: NotRequired[int]
67
+ """Maximum number of results to return (1-20, default 20). You are billed per result returned, so a lower limit costs less. Range: 1 to 20."""
68
+ url: Required[str]
69
+ """A Google Ads Transparency Center URL for a selected advertiser or domain (e.g. https://adstransparency.google.com/advertiser/AR01614014350098432001?region=US)."""
70
+
71
+
72
+ class GoogleAdsAdDetailsData(BaseModel):
73
+ model_config = ConfigDict(populate_by_name=True)
74
+
75
+ advertiser_id: str = Field(alias="advertiserId")
76
+ creative_id: str = Field(alias="creativeId")
77
+ first_shown: str = Field(alias="firstShown", description="ISO 8601 date.")
78
+ format: str
79
+ impressions_max: int = Field(alias="impressionsMax")
80
+ impressions_min: int = Field(alias="impressionsMin")
81
+ last_shown: str = Field(alias="lastShown", description="ISO 8601 date.")
82
+ variations: list[GoogleAdsAdDetailsVariation]
83
+
84
+
85
+ class GoogleAdsAdDetailsVariation(BaseModel):
86
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
87
+
88
+ all_text: str = Field(alias="allText")
89
+ description: str
90
+ destination_url: str = Field(alias="destinationUrl")
91
+ headline: str
92
+ image_url: str = Field(alias="imageUrl")
93
+
94
+
95
+ class GoogleAdsAdvertiserSearchData(BaseModel):
96
+ advertisers: list[GoogleAdsAdvertiserSearchAdvertiser]
97
+
98
+
99
+ class GoogleAdsAdvertiserSearchAdvertiser(BaseModel):
100
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
101
+
102
+ ads_estimate: int = Field(
103
+ alias="adsEstimate",
104
+ description="Estimated number of ads for this advertiser/region.",
105
+ )
106
+ advertiser_id: str = Field(alias="advertiserId")
107
+ name: str
108
+ region: str
109
+
110
+
111
+ class GoogleAdsCompanyAdsData(BaseModel):
112
+ model_config = ConfigDict(populate_by_name=True)
113
+
114
+ ads: list[GoogleAdsCompanyAdsAd]
115
+ ads_estimate: int = Field(
116
+ alias="adsEstimate", description="Estimated total number of ads."
117
+ )
118
+ next_cursor: str = Field(alias="nextCursor")
119
+
120
+
121
+ class GoogleAdsCompanyAdsAd(BaseModel):
122
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
123
+
124
+ ad_url: str = Field(alias="adUrl")
125
+ advertiser_id: str = Field(alias="advertiserId")
126
+ advertiser_name: str = Field(alias="advertiserName")
127
+ creative_id: str = Field(alias="creativeId")
128
+ first_shown: str = Field(alias="firstShown", description="ISO 8601 date.")
129
+ format: str
130
+ image_url: str = Field(alias="imageUrl")
131
+ last_shown: str = Field(alias="lastShown", description="ISO 8601 date.")
132
+
133
+
134
+ class GoogleAdsSearchData(BaseModel):
135
+ items: list[GoogleAdsSearchItem] = Field(
136
+ description="Ad records from the Transparency Center: advertiser, ad format, creative details, preview URL, and first/last shown dates."
137
+ )
138
+
139
+
140
+ class GoogleAdsSearchItem(BaseModel):
141
+ model_config = ConfigDict(extra="allow")
142
+
143
+ id: str
144
+ url: str
145
+
146
+
147
+ class GoogleAdsNamespace:
148
+ """Typed methods for this platform. Attached lazily to the client."""
149
+
150
+ def __init__(self, client: "AnyAPI") -> None:
151
+ self._client = client
152
+
153
+ def ad_details(
154
+ self,
155
+ *,
156
+ options: RequestOptions | None = None,
157
+ **input: Unpack[GoogleAdsAdDetailsInput],
158
+ ) -> RunResult[GoogleAdsAdDetailsData]:
159
+ """Google Ads Ad Details
160
+
161
+ Look up a single Google Ads Transparency Center creative by URL and get its
162
+ format, run dates, impression range, regions, and creative variations as
163
+ clean JSON, billed per request in USD.
164
+
165
+ Price: $0.002 per request.
166
+
167
+ Example:
168
+ res = client.google_ads.ad_details(url="https://adstransparency.google.com/advertiser/AR01614014350098432001/creative/CR10449491775734153217")
169
+ """
170
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
171
+ "google_ads.ad_details", dict(input), options
172
+ )
173
+ return RunResult[GoogleAdsAdDetailsData].model_validate(raw)
174
+
175
+ def advertiser_search(
176
+ self,
177
+ *,
178
+ options: RequestOptions | None = None,
179
+ **input: Unpack[GoogleAdsAdvertiserSearchInput],
180
+ ) -> RunResult[GoogleAdsAdvertiserSearchData]:
181
+ """Google Ads Advertiser Search
182
+
183
+ Search the Google Ads Transparency Center for advertisers by keyword and get
184
+ matching advertiser IDs, regions, and estimated ad counts as clean JSON,
185
+ billed per request in USD.
186
+
187
+ Price: $0.002 per request.
188
+
189
+ Example:
190
+ res = client.google_ads.advertiser_search(query="lululemon")
191
+ """
192
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
193
+ "google_ads.advertiser_search", dict(input), options
194
+ )
195
+ return RunResult[GoogleAdsAdvertiserSearchData].model_validate(raw)
196
+
197
+ def company_ads(
198
+ self,
199
+ *,
200
+ options: RequestOptions | None = None,
201
+ **input: Unpack[GoogleAdsCompanyAdsInput],
202
+ ) -> RunResult[GoogleAdsCompanyAdsData]:
203
+ """Google Ads Company Ads
204
+
205
+ List the ads a company is running from the Google Ads Transparency Center by
206
+ domain or advertiser ID - creative ID, format, ad URL, and first/last shown
207
+ dates - with cursor pagination, billed per request in USD.
208
+
209
+ Price: $0.002 per request.
210
+
211
+ Example:
212
+ res = client.google_ads.company_ads(domain="lululemon.com")
213
+ """
214
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
215
+ "google_ads.company_ads", dict(input), options
216
+ )
217
+ return RunResult[GoogleAdsCompanyAdsData].model_validate(raw)
218
+
219
+ def iter_company_ads(
220
+ self,
221
+ *,
222
+ options: RequestOptions | None = None,
223
+ **input: Unpack[GoogleAdsCompanyAdsInput],
224
+ ) -> Paginator[GoogleAdsCompanyAdsAd, GoogleAdsCompanyAdsData]:
225
+ """Iterate Google Ads Company Ads results, following pagination cursors.
226
+
227
+ Yields validated `GoogleAdsCompanyAdsAd` items from the `ads` field of
228
+ each page. Use `.pages()` on the returned paginator to walk whole
229
+ `RunResult` pages.
230
+ """
231
+ return paginate(
232
+ self._client,
233
+ "google_ads.company_ads",
234
+ dict(input),
235
+ "ads",
236
+ item_model=GoogleAdsCompanyAdsAd,
237
+ data_model=GoogleAdsCompanyAdsData,
238
+ bare=False,
239
+ options=options,
240
+ )
241
+
242
+ def search(
243
+ self,
244
+ *,
245
+ options: RequestOptions | None = None,
246
+ **input: Unpack[GoogleAdsSearchInput],
247
+ ) -> RunResult[GoogleAdsSearchData]:
248
+ """Google Ads Transparency
249
+
250
+ Pull the ads an advertiser is currently running from the Google Ads
251
+ Transparency Center - creative details, formats, and run dates - as clean
252
+ JSON, billed per request in USD.
253
+
254
+ Price: $0.00005 per request plus $0.0013 per result.
255
+
256
+ Example:
257
+ res = client.google_ads.search(limit=3, url="https://adstransparency.google.com/?region=US&domain=nike.com")
258
+ """
259
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
260
+ "google_ads.search", dict(input), options
261
+ )
262
+ return RunResult[GoogleAdsSearchData].model_validate(raw)
263
+
264
+
265
+ class AsyncGoogleAdsNamespace:
266
+ """Typed methods for this platform. Attached lazily to the client."""
267
+
268
+ def __init__(self, client: "AsyncAnyAPI") -> None:
269
+ self._client = client
270
+
271
+ async def ad_details(
272
+ self,
273
+ *,
274
+ options: RequestOptions | None = None,
275
+ **input: Unpack[GoogleAdsAdDetailsInput],
276
+ ) -> RunResult[GoogleAdsAdDetailsData]:
277
+ """Google Ads Ad Details
278
+
279
+ Look up a single Google Ads Transparency Center creative by URL and get its
280
+ format, run dates, impression range, regions, and creative variations as
281
+ clean JSON, billed per request in USD.
282
+
283
+ Price: $0.002 per request.
284
+
285
+ Example:
286
+ res = client.google_ads.ad_details(url="https://adstransparency.google.com/advertiser/AR01614014350098432001/creative/CR10449491775734153217")
287
+ """
288
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
289
+ "google_ads.ad_details", dict(input), options
290
+ )
291
+ return RunResult[GoogleAdsAdDetailsData].model_validate(raw)
292
+
293
+ async def advertiser_search(
294
+ self,
295
+ *,
296
+ options: RequestOptions | None = None,
297
+ **input: Unpack[GoogleAdsAdvertiserSearchInput],
298
+ ) -> RunResult[GoogleAdsAdvertiserSearchData]:
299
+ """Google Ads Advertiser Search
300
+
301
+ Search the Google Ads Transparency Center for advertisers by keyword and get
302
+ matching advertiser IDs, regions, and estimated ad counts as clean JSON,
303
+ billed per request in USD.
304
+
305
+ Price: $0.002 per request.
306
+
307
+ Example:
308
+ res = client.google_ads.advertiser_search(query="lululemon")
309
+ """
310
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
311
+ "google_ads.advertiser_search", dict(input), options
312
+ )
313
+ return RunResult[GoogleAdsAdvertiserSearchData].model_validate(raw)
314
+
315
+ async def company_ads(
316
+ self,
317
+ *,
318
+ options: RequestOptions | None = None,
319
+ **input: Unpack[GoogleAdsCompanyAdsInput],
320
+ ) -> RunResult[GoogleAdsCompanyAdsData]:
321
+ """Google Ads Company Ads
322
+
323
+ List the ads a company is running from the Google Ads Transparency Center by
324
+ domain or advertiser ID - creative ID, format, ad URL, and first/last shown
325
+ dates - with cursor pagination, billed per request in USD.
326
+
327
+ Price: $0.002 per request.
328
+
329
+ Example:
330
+ res = client.google_ads.company_ads(domain="lululemon.com")
331
+ """
332
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
333
+ "google_ads.company_ads", dict(input), options
334
+ )
335
+ return RunResult[GoogleAdsCompanyAdsData].model_validate(raw)
336
+
337
+ def iter_company_ads(
338
+ self,
339
+ *,
340
+ options: RequestOptions | None = None,
341
+ **input: Unpack[GoogleAdsCompanyAdsInput],
342
+ ) -> AsyncPaginator[GoogleAdsCompanyAdsAd, GoogleAdsCompanyAdsData]:
343
+ """Iterate Google Ads Company Ads results, following pagination cursors.
344
+
345
+ Yields validated `GoogleAdsCompanyAdsAd` items from the `ads` field of
346
+ each page. Use `.pages()` on the returned paginator to walk whole
347
+ `RunResult` pages.
348
+ """
349
+ return apaginate(
350
+ self._client,
351
+ "google_ads.company_ads",
352
+ dict(input),
353
+ "ads",
354
+ item_model=GoogleAdsCompanyAdsAd,
355
+ data_model=GoogleAdsCompanyAdsData,
356
+ bare=False,
357
+ options=options,
358
+ )
359
+
360
+ async def search(
361
+ self,
362
+ *,
363
+ options: RequestOptions | None = None,
364
+ **input: Unpack[GoogleAdsSearchInput],
365
+ ) -> RunResult[GoogleAdsSearchData]:
366
+ """Google Ads Transparency
367
+
368
+ Pull the ads an advertiser is currently running from the Google Ads
369
+ Transparency Center - creative details, formats, and run dates - as clean
370
+ JSON, billed per request in USD.
371
+
372
+ Price: $0.00005 per request plus $0.0013 per result.
373
+
374
+ Example:
375
+ res = client.google_ads.search(limit=3, url="https://adstransparency.google.com/?region=US&domain=nike.com")
376
+ """
377
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
378
+ "google_ads.search", dict(input), options
379
+ )
380
+ return RunResult[GoogleAdsSearchData].model_validate(raw)