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.
- getanyapi/__init__.py +76 -0
- getanyapi/_account.py +132 -0
- getanyapi/_async_client.py +215 -0
- getanyapi/_client.py +274 -0
- getanyapi/_errors.py +115 -0
- getanyapi/_pagination.py +295 -0
- getanyapi/_transport.py +239 -0
- getanyapi/platforms/__init__.py +89 -0
- getanyapi/platforms/ahrefs.py +384 -0
- getanyapi/platforms/airbnb.py +120 -0
- getanyapi/platforms/alibaba.py +95 -0
- getanyapi/platforms/amazon.py +442 -0
- getanyapi/platforms/appstore.py +95 -0
- getanyapi/platforms/bluesky.py +215 -0
- getanyapi/platforms/booking.py +128 -0
- getanyapi/platforms/coinmarketcap.py +113 -0
- getanyapi/platforms/congress.py +106 -0
- getanyapi/platforms/dexscreener.py +104 -0
- getanyapi/platforms/ebay.py +215 -0
- getanyapi/platforms/email.py +166 -0
- getanyapi/platforms/facebook.py +2324 -0
- getanyapi/platforms/fiverr.py +122 -0
- getanyapi/platforms/github.py +954 -0
- getanyapi/platforms/glassdoor.py +93 -0
- getanyapi/platforms/google.py +232 -0
- getanyapi/platforms/google_ads.py +380 -0
- getanyapi/platforms/google_finance.py +170 -0
- getanyapi/platforms/google_shopping.py +103 -0
- getanyapi/platforms/hackernews.py +276 -0
- getanyapi/platforms/indeed.py +114 -0
- getanyapi/platforms/instagram.py +1868 -0
- getanyapi/platforms/linkedin.py +1064 -0
- getanyapi/platforms/maps.py +412 -0
- getanyapi/platforms/pandaexpress.py +262 -0
- getanyapi/platforms/person.py +96 -0
- getanyapi/platforms/pinterest.py +96 -0
- getanyapi/platforms/playstore.py +99 -0
- getanyapi/platforms/polymarket.py +109 -0
- getanyapi/platforms/realtor.py +104 -0
- getanyapi/platforms/reddit.py +582 -0
- getanyapi/platforms/redfin.py +95 -0
- getanyapi/platforms/rednote.py +807 -0
- getanyapi/platforms/sec.py +118 -0
- getanyapi/platforms/semrush.py +358 -0
- getanyapi/platforms/snapchat.py +146 -0
- getanyapi/platforms/social.py +105 -0
- getanyapi/platforms/spotify.py +588 -0
- getanyapi/platforms/substack.py +142 -0
- getanyapi/platforms/threads.py +358 -0
- getanyapi/platforms/tiktok.py +1827 -0
- getanyapi/platforms/tiktok_shop.py +536 -0
- getanyapi/platforms/tripadvisor.py +180 -0
- getanyapi/platforms/trustpilot.py +114 -0
- getanyapi/platforms/truthsocial.py +226 -0
- getanyapi/platforms/twitter.py +798 -0
- getanyapi/platforms/upwork.py +119 -0
- getanyapi/platforms/walmart.py +93 -0
- getanyapi/platforms/web.py +264 -0
- getanyapi/platforms/whatsapp.py +91 -0
- getanyapi/platforms/yahoo_finance.py +95 -0
- getanyapi/platforms/yelp.py +141 -0
- getanyapi/platforms/youtube.py +1452 -0
- getanyapi/platforms/zillow.py +218 -0
- getanyapi/py.typed +0 -0
- getanyapi/types.py +170 -0
- getanyapi-0.1.0.dist-info/METADATA +155 -0
- getanyapi-0.1.0.dist-info/RECORD +68 -0
- getanyapi-0.1.0.dist-info/WHEEL +4 -0
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the sec 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 SecFilingsInput(TypedDict, total=False):
|
|
19
|
+
"""Input for SEC EDGAR Filings."""
|
|
20
|
+
|
|
21
|
+
dateFrom: NotRequired[str]
|
|
22
|
+
"""Only return filings filed on or after this date, in YYYY-MM-DD format (e.g. 2025-01-01)."""
|
|
23
|
+
dateTo: NotRequired[str]
|
|
24
|
+
"""Only return filings filed on or before this date, in YYYY-MM-DD format (e.g. 2026-06-01)."""
|
|
25
|
+
form: NotRequired[str]
|
|
26
|
+
"""Filter filings by SEC form type (e.g. 10-K, 10-Q, 8-K, 4, DEF 14A, S-1, 13F-HR); omit for all forms."""
|
|
27
|
+
limit: NotRequired[int]
|
|
28
|
+
"""Maximum number of filings to return (1-25, default 25). You are billed per result returned, so a lower limit costs less. Range: 1 to 25."""
|
|
29
|
+
ticker: Required[str]
|
|
30
|
+
"""Company stock ticker symbol, e.g. AAPL, MSFT, or TSLA."""
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class SecFilingsData(BaseModel):
|
|
34
|
+
items: list[SecFilingsItem] = Field(
|
|
35
|
+
description="Filing records: company and CIK, form type, filing date, accession number, and document links."
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
class SecFilingsItem(BaseModel):
|
|
40
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
41
|
+
|
|
42
|
+
accession_number: str = Field(
|
|
43
|
+
alias="accessionNumber",
|
|
44
|
+
description="SEC accession number uniquely identifying the filing.",
|
|
45
|
+
)
|
|
46
|
+
cik: str | None = Field(
|
|
47
|
+
default=None,
|
|
48
|
+
description="SEC Central Index Key for the filer. Present whenever the upstream returns this record.",
|
|
49
|
+
)
|
|
50
|
+
company_name: str | None = Field(
|
|
51
|
+
default=None,
|
|
52
|
+
alias="companyName",
|
|
53
|
+
description="Present whenever the upstream returns this record.",
|
|
54
|
+
)
|
|
55
|
+
filing_date: str | None = Field(
|
|
56
|
+
default=None,
|
|
57
|
+
alias="filingDate",
|
|
58
|
+
description="Date the filing was filed, YYYY-MM-DD. Present whenever the upstream returns this record.",
|
|
59
|
+
)
|
|
60
|
+
form: str | None = Field(
|
|
61
|
+
default=None,
|
|
62
|
+
description="SEC form type, e.g. 10-K, 10-Q, 8-K. Present whenever the upstream returns this record.",
|
|
63
|
+
)
|
|
64
|
+
url: str = Field(
|
|
65
|
+
description="Direct link to the primary filing document on sec.gov."
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class SecNamespace:
|
|
70
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
71
|
+
|
|
72
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
73
|
+
self._client = client
|
|
74
|
+
|
|
75
|
+
def filings(
|
|
76
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[SecFilingsInput]
|
|
77
|
+
) -> RunResult[SecFilingsData]:
|
|
78
|
+
"""SEC EDGAR Filings
|
|
79
|
+
|
|
80
|
+
List a public company's SEC EDGAR filings - form type, filing date,
|
|
81
|
+
accession number, and document links - by ticker, company name, or CIK, with
|
|
82
|
+
optional form-type and date filters, billed per request in USD.
|
|
83
|
+
|
|
84
|
+
Price: $0.002 per request plus $0.0004 per result.
|
|
85
|
+
|
|
86
|
+
Example:
|
|
87
|
+
res = client.sec.filings(limit=3, ticker="AAPL")
|
|
88
|
+
"""
|
|
89
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
90
|
+
"sec.filings", dict(input), options
|
|
91
|
+
)
|
|
92
|
+
return RunResult[SecFilingsData].model_validate(raw)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class AsyncSecNamespace:
|
|
96
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
97
|
+
|
|
98
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
99
|
+
self._client = client
|
|
100
|
+
|
|
101
|
+
async def filings(
|
|
102
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[SecFilingsInput]
|
|
103
|
+
) -> RunResult[SecFilingsData]:
|
|
104
|
+
"""SEC EDGAR Filings
|
|
105
|
+
|
|
106
|
+
List a public company's SEC EDGAR filings - form type, filing date,
|
|
107
|
+
accession number, and document links - by ticker, company name, or CIK, with
|
|
108
|
+
optional form-type and date filters, billed per request in USD.
|
|
109
|
+
|
|
110
|
+
Price: $0.002 per request plus $0.0004 per result.
|
|
111
|
+
|
|
112
|
+
Example:
|
|
113
|
+
res = client.sec.filings(limit=3, ticker="AAPL")
|
|
114
|
+
"""
|
|
115
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
116
|
+
"sec.filings", dict(input), options
|
|
117
|
+
)
|
|
118
|
+
return RunResult[SecFilingsData].model_validate(raw)
|
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the semrush 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 SemrushKeywordsInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Semrush Keyword Research."""
|
|
20
|
+
|
|
21
|
+
database: NotRequired[str]
|
|
22
|
+
"""Two-letter Semrush regional database that scopes the metrics (e.g. us, uk, de). Default: us."""
|
|
23
|
+
keyword: Required[str]
|
|
24
|
+
"""The search term to research (e.g. "best running shoes")."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class SemrushOverviewInput(TypedDict, total=False):
|
|
28
|
+
"""Input for Semrush Domain Overview."""
|
|
29
|
+
|
|
30
|
+
database: NotRequired[str]
|
|
31
|
+
"""Two-letter Semrush regional database that scopes the metrics (e.g. us, uk, de). Default: us."""
|
|
32
|
+
domain: Required[str]
|
|
33
|
+
"""The domain to analyze (e.g. ahrefs.com)."""
|
|
34
|
+
includeMoz: NotRequired[bool]
|
|
35
|
+
"""Add Moz Domain Authority and Spam Score to the response. Default: false."""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class SemrushKeywordsData(BaseModel):
|
|
39
|
+
items: list[SemrushKeywordsItem] = Field(
|
|
40
|
+
description="Keyword-research records: search volume, CPC, competition, keyword difficulty, plus related keywords and question keywords for the researched term."
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class SemrushKeywordsItem(BaseModel):
|
|
45
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
46
|
+
|
|
47
|
+
competition: float | None = Field(
|
|
48
|
+
default=None, description="Paid-search competition density, 0 to 1."
|
|
49
|
+
)
|
|
50
|
+
cpc_usd: float | None = Field(
|
|
51
|
+
default=None, alias="cpcUsd", description="Average cost per click in USD."
|
|
52
|
+
)
|
|
53
|
+
database: str | None = Field(
|
|
54
|
+
default=None,
|
|
55
|
+
description="Two-letter Semrush regional database the metrics are scoped to.",
|
|
56
|
+
)
|
|
57
|
+
intents: list[str] | None = Field(
|
|
58
|
+
default=None,
|
|
59
|
+
description="Search-intent labels for the keyword (e.g. commercial, informational). Present whenever the upstream returns this record.",
|
|
60
|
+
)
|
|
61
|
+
keyword: str = Field(description="The researched search term.")
|
|
62
|
+
keyword_difficulty: int | None = Field(
|
|
63
|
+
default=None,
|
|
64
|
+
alias="keywordDifficulty",
|
|
65
|
+
description="Semrush Keyword Difficulty, 0 to 100.",
|
|
66
|
+
)
|
|
67
|
+
organic_results_count: int | None = Field(
|
|
68
|
+
default=None,
|
|
69
|
+
alias="organicResultsCount",
|
|
70
|
+
description="Number of organic results Google returns for the keyword.",
|
|
71
|
+
)
|
|
72
|
+
questions: list[SemrushKeywordsQuestion] | None = Field(
|
|
73
|
+
default=None,
|
|
74
|
+
description="Question-phrased keyword variations with their own volume and difficulty. Present whenever the upstream returns this record.",
|
|
75
|
+
)
|
|
76
|
+
referring_domains_median: int | None = Field(
|
|
77
|
+
default=None,
|
|
78
|
+
alias="referringDomainsMedian",
|
|
79
|
+
description="Median number of referring domains across the ranking pages.",
|
|
80
|
+
)
|
|
81
|
+
related_keywords: list[SemrushKeywordsRelatedKeyword] | None = Field(
|
|
82
|
+
default=None,
|
|
83
|
+
alias="relatedKeywords",
|
|
84
|
+
description="Related keyword suggestions with their own volume and difficulty. Present whenever the upstream returns this record.",
|
|
85
|
+
)
|
|
86
|
+
search_volume: int | None = Field(
|
|
87
|
+
default=None,
|
|
88
|
+
alias="searchVolume",
|
|
89
|
+
description="Average monthly search volume in the selected database.",
|
|
90
|
+
)
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
class SemrushKeywordsQuestion(BaseModel):
|
|
94
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
95
|
+
|
|
96
|
+
keyword: str = Field(description="The question keyword.")
|
|
97
|
+
keyword_difficulty: int | None = Field(
|
|
98
|
+
default=None,
|
|
99
|
+
alias="keywordDifficulty",
|
|
100
|
+
description="Semrush Keyword Difficulty for the question keyword, 0 to 100.",
|
|
101
|
+
)
|
|
102
|
+
search_volume: int | None = Field(
|
|
103
|
+
default=None,
|
|
104
|
+
alias="searchVolume",
|
|
105
|
+
description="Average monthly search volume for the question keyword.",
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
class SemrushKeywordsRelatedKeyword(BaseModel):
|
|
110
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
111
|
+
|
|
112
|
+
keyword: str = Field(description="The related keyword.")
|
|
113
|
+
keyword_difficulty: int | None = Field(
|
|
114
|
+
default=None,
|
|
115
|
+
alias="keywordDifficulty",
|
|
116
|
+
description="Semrush Keyword Difficulty for the related keyword, 0 to 100.",
|
|
117
|
+
)
|
|
118
|
+
search_volume: int | None = Field(
|
|
119
|
+
default=None,
|
|
120
|
+
alias="searchVolume",
|
|
121
|
+
description="Average monthly search volume for the related keyword.",
|
|
122
|
+
)
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
class SemrushOverviewData(BaseModel):
|
|
126
|
+
items: list[SemrushOverviewItem] = Field(
|
|
127
|
+
description="Domain overview records: Authority Score, organic and paid traffic, keyword and backlink counts, top country, and the domain's top organic keywords."
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
class SemrushOverviewItem(BaseModel):
|
|
132
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
133
|
+
|
|
134
|
+
ai_visibility: int | None = Field(
|
|
135
|
+
default=None,
|
|
136
|
+
alias="aiVisibility",
|
|
137
|
+
description="Semrush AI visibility metric for the domain.",
|
|
138
|
+
)
|
|
139
|
+
authority_score: int | None = Field(
|
|
140
|
+
default=None,
|
|
141
|
+
alias="authorityScore",
|
|
142
|
+
description="Semrush Authority Score, 0-100.",
|
|
143
|
+
)
|
|
144
|
+
backlinks: int | None = Field(
|
|
145
|
+
default=None, description="Total number of backlinks pointing at the domain."
|
|
146
|
+
)
|
|
147
|
+
database: str | None = Field(
|
|
148
|
+
default=None,
|
|
149
|
+
description="Two-letter Semrush regional database the metrics are scoped to.",
|
|
150
|
+
)
|
|
151
|
+
domain: str = Field(description="The analyzed domain.")
|
|
152
|
+
follow_backlinks: int | None = Field(
|
|
153
|
+
default=None,
|
|
154
|
+
alias="followBacklinks",
|
|
155
|
+
description="Number of dofollow backlinks.",
|
|
156
|
+
)
|
|
157
|
+
moz_domain_authority: int | None = Field(
|
|
158
|
+
default=None,
|
|
159
|
+
alias="mozDomainAuthority",
|
|
160
|
+
description="Moz Domain Authority, 0-100 (only when includeMoz is true).",
|
|
161
|
+
)
|
|
162
|
+
moz_spam_score: str | None = Field(
|
|
163
|
+
default=None,
|
|
164
|
+
alias="mozSpamScore",
|
|
165
|
+
description="Moz Spam Score as a percentage string (only when includeMoz is true).",
|
|
166
|
+
)
|
|
167
|
+
nofollow_backlinks: int | None = Field(
|
|
168
|
+
default=None,
|
|
169
|
+
alias="nofollowBacklinks",
|
|
170
|
+
description="Number of nofollow backlinks.",
|
|
171
|
+
)
|
|
172
|
+
organic_keywords: int | None = Field(
|
|
173
|
+
default=None,
|
|
174
|
+
alias="organicKeywords",
|
|
175
|
+
description="Number of keywords the domain ranks for organically.",
|
|
176
|
+
)
|
|
177
|
+
organic_traffic: int | None = Field(
|
|
178
|
+
default=None,
|
|
179
|
+
alias="organicTraffic",
|
|
180
|
+
description="Estimated monthly organic search traffic.",
|
|
181
|
+
)
|
|
182
|
+
organic_traffic_cost_usd: float | None = Field(
|
|
183
|
+
default=None,
|
|
184
|
+
alias="organicTrafficCostUsd",
|
|
185
|
+
description="Estimated USD value of the organic traffic.",
|
|
186
|
+
)
|
|
187
|
+
paid_keywords: int | None = Field(
|
|
188
|
+
default=None,
|
|
189
|
+
alias="paidKeywords",
|
|
190
|
+
description="Number of keywords the domain bids on.",
|
|
191
|
+
)
|
|
192
|
+
paid_traffic: int | None = Field(
|
|
193
|
+
default=None,
|
|
194
|
+
alias="paidTraffic",
|
|
195
|
+
description="Estimated monthly paid search traffic.",
|
|
196
|
+
)
|
|
197
|
+
paid_traffic_cost_usd: float | None = Field(
|
|
198
|
+
default=None,
|
|
199
|
+
alias="paidTrafficCostUsd",
|
|
200
|
+
description="Estimated USD value of the paid traffic.",
|
|
201
|
+
)
|
|
202
|
+
referring_domains: int | None = Field(
|
|
203
|
+
default=None,
|
|
204
|
+
alias="referringDomains",
|
|
205
|
+
description="Number of unique domains linking to the domain.",
|
|
206
|
+
)
|
|
207
|
+
top_country: str | None = Field(
|
|
208
|
+
default=None,
|
|
209
|
+
alias="topCountry",
|
|
210
|
+
description="Two-letter code of the country sending the most traffic.",
|
|
211
|
+
)
|
|
212
|
+
top_country_traffic: int | None = Field(
|
|
213
|
+
default=None,
|
|
214
|
+
alias="topCountryTraffic",
|
|
215
|
+
description="Estimated monthly traffic from the top country.",
|
|
216
|
+
)
|
|
217
|
+
top_keywords: list[SemrushOverviewTopKeyword] | None = Field(
|
|
218
|
+
default=None,
|
|
219
|
+
alias="topKeywords",
|
|
220
|
+
description="The domain's top organic keywords with position, volume, and value. Present whenever the upstream returns this record.",
|
|
221
|
+
)
|
|
222
|
+
total_traffic: int | None = Field(
|
|
223
|
+
default=None,
|
|
224
|
+
alias="totalTraffic",
|
|
225
|
+
description="Estimated total monthly traffic across organic and paid.",
|
|
226
|
+
)
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
class SemrushOverviewTopKeyword(BaseModel):
|
|
230
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
231
|
+
|
|
232
|
+
cpc_usd: float | None = Field(
|
|
233
|
+
default=None, alias="cpcUsd", description="Average cost per click in USD."
|
|
234
|
+
)
|
|
235
|
+
intents: list[str] | None = Field(
|
|
236
|
+
default=None, description="Search intents associated with the keyword."
|
|
237
|
+
)
|
|
238
|
+
keyword: str = Field(description="The organic keyword.")
|
|
239
|
+
keyword_difficulty: int | None = Field(
|
|
240
|
+
default=None,
|
|
241
|
+
alias="keywordDifficulty",
|
|
242
|
+
description="Semrush Keyword Difficulty, 0-100.",
|
|
243
|
+
)
|
|
244
|
+
position: int | None = Field(
|
|
245
|
+
default=None, description="Current SERP position for this keyword."
|
|
246
|
+
)
|
|
247
|
+
search_volume: int | None = Field(
|
|
248
|
+
default=None,
|
|
249
|
+
alias="searchVolume",
|
|
250
|
+
description="Monthly search volume for this keyword.",
|
|
251
|
+
)
|
|
252
|
+
traffic: int | None = Field(
|
|
253
|
+
default=None,
|
|
254
|
+
description="Estimated monthly traffic this keyword drives to the domain.",
|
|
255
|
+
)
|
|
256
|
+
url: str | None = Field(default=None, description="The ranking URL on the domain.")
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
class SemrushNamespace:
|
|
260
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
261
|
+
|
|
262
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
263
|
+
self._client = client
|
|
264
|
+
|
|
265
|
+
def keywords(
|
|
266
|
+
self,
|
|
267
|
+
*,
|
|
268
|
+
options: RequestOptions | None = None,
|
|
269
|
+
**input: Unpack[SemrushKeywordsInput],
|
|
270
|
+
) -> RunResult[SemrushKeywordsData]:
|
|
271
|
+
"""Semrush Keyword Research
|
|
272
|
+
|
|
273
|
+
Semrush keyword research for any term: monthly search volume, CPC,
|
|
274
|
+
competition, keyword difficulty, plus related keywords and question
|
|
275
|
+
keywords. Transparent per-request USD pricing.
|
|
276
|
+
|
|
277
|
+
Price: $0.015 per result.
|
|
278
|
+
|
|
279
|
+
Example:
|
|
280
|
+
res = client.semrush.keywords(database="us", keyword="best running shoes")
|
|
281
|
+
"""
|
|
282
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
283
|
+
"semrush.keywords", dict(input), options
|
|
284
|
+
)
|
|
285
|
+
return RunResult[SemrushKeywordsData].model_validate(raw)
|
|
286
|
+
|
|
287
|
+
def overview(
|
|
288
|
+
self,
|
|
289
|
+
*,
|
|
290
|
+
options: RequestOptions | None = None,
|
|
291
|
+
**input: Unpack[SemrushOverviewInput],
|
|
292
|
+
) -> RunResult[SemrushOverviewData]:
|
|
293
|
+
"""Semrush Domain Overview
|
|
294
|
+
|
|
295
|
+
a Semrush SEO overview for any domain: Authority Score, organic and paid
|
|
296
|
+
traffic, keyword and backlink counts, top country, and the domain's top
|
|
297
|
+
organic keywords. Transparent per-request USD pricing.
|
|
298
|
+
|
|
299
|
+
Price: $0.015 per result.
|
|
300
|
+
|
|
301
|
+
Example:
|
|
302
|
+
res = client.semrush.overview(database="us", domain="ahrefs.com")
|
|
303
|
+
"""
|
|
304
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
305
|
+
"semrush.overview", dict(input), options
|
|
306
|
+
)
|
|
307
|
+
return RunResult[SemrushOverviewData].model_validate(raw)
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
class AsyncSemrushNamespace:
|
|
311
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
312
|
+
|
|
313
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
314
|
+
self._client = client
|
|
315
|
+
|
|
316
|
+
async def keywords(
|
|
317
|
+
self,
|
|
318
|
+
*,
|
|
319
|
+
options: RequestOptions | None = None,
|
|
320
|
+
**input: Unpack[SemrushKeywordsInput],
|
|
321
|
+
) -> RunResult[SemrushKeywordsData]:
|
|
322
|
+
"""Semrush Keyword Research
|
|
323
|
+
|
|
324
|
+
Semrush keyword research for any term: monthly search volume, CPC,
|
|
325
|
+
competition, keyword difficulty, plus related keywords and question
|
|
326
|
+
keywords. Transparent per-request USD pricing.
|
|
327
|
+
|
|
328
|
+
Price: $0.015 per result.
|
|
329
|
+
|
|
330
|
+
Example:
|
|
331
|
+
res = client.semrush.keywords(database="us", keyword="best running shoes")
|
|
332
|
+
"""
|
|
333
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
334
|
+
"semrush.keywords", dict(input), options
|
|
335
|
+
)
|
|
336
|
+
return RunResult[SemrushKeywordsData].model_validate(raw)
|
|
337
|
+
|
|
338
|
+
async def overview(
|
|
339
|
+
self,
|
|
340
|
+
*,
|
|
341
|
+
options: RequestOptions | None = None,
|
|
342
|
+
**input: Unpack[SemrushOverviewInput],
|
|
343
|
+
) -> RunResult[SemrushOverviewData]:
|
|
344
|
+
"""Semrush Domain Overview
|
|
345
|
+
|
|
346
|
+
a Semrush SEO overview for any domain: Authority Score, organic and paid
|
|
347
|
+
traffic, keyword and backlink counts, top country, and the domain's top
|
|
348
|
+
organic keywords. Transparent per-request USD pricing.
|
|
349
|
+
|
|
350
|
+
Price: $0.015 per result.
|
|
351
|
+
|
|
352
|
+
Example:
|
|
353
|
+
res = client.semrush.overview(database="us", domain="ahrefs.com")
|
|
354
|
+
"""
|
|
355
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
356
|
+
"semrush.overview", dict(input), options
|
|
357
|
+
)
|
|
358
|
+
return RunResult[SemrushOverviewData].model_validate(raw)
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the snapchat 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 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 SnapchatProfileInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Snapchat Profile."""
|
|
20
|
+
|
|
21
|
+
username: Required[str]
|
|
22
|
+
"""The Snapchat username or profile URL to look up (e.g. fcbarcelona or https://www.snapchat.com/add/fcbarcelona)."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class SnapchatProfileData(BaseModel):
|
|
26
|
+
items: list[SnapchatProfileItem] = Field(
|
|
27
|
+
description="Profile records: public profile URL, handle, display name, bio, subscriber count, avatar, and recent public stories."
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class SnapchatProfileItem(BaseModel):
|
|
32
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
33
|
+
|
|
34
|
+
avatar_url: str | None = Field(
|
|
35
|
+
default=None,
|
|
36
|
+
alias="avatarUrl",
|
|
37
|
+
description="URL of the profile avatar image. Present whenever the upstream returns this record.",
|
|
38
|
+
)
|
|
39
|
+
bio: str | None = Field(
|
|
40
|
+
default=None,
|
|
41
|
+
description="The profile's public bio / description text. Present whenever the upstream returns this record.",
|
|
42
|
+
)
|
|
43
|
+
display_name: str | None = Field(
|
|
44
|
+
default=None,
|
|
45
|
+
alias="displayName",
|
|
46
|
+
description="The profile's public display name. Present whenever the upstream returns this record.",
|
|
47
|
+
)
|
|
48
|
+
handle: str | None = Field(
|
|
49
|
+
default=None, description="Present whenever the upstream returns this record."
|
|
50
|
+
)
|
|
51
|
+
stories: list[SnapchatProfileStorie] | None = Field(
|
|
52
|
+
default=None,
|
|
53
|
+
description="Recent public stories, each with its snaps (media items).",
|
|
54
|
+
)
|
|
55
|
+
subscribers: int | None = Field(
|
|
56
|
+
default=None, description="Public subscriber count."
|
|
57
|
+
)
|
|
58
|
+
url: str
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class SnapchatProfileStorie(BaseModel):
|
|
62
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
63
|
+
|
|
64
|
+
id: str | None = Field(default=None, description="Story identifier.")
|
|
65
|
+
snaps: list[SnapchatProfileSnap] | None = Field(
|
|
66
|
+
default=None, description="The snaps (media items) in this story."
|
|
67
|
+
)
|
|
68
|
+
story_title: str | None = Field(
|
|
69
|
+
default=None, alias="storyTitle", description="Story title."
|
|
70
|
+
)
|
|
71
|
+
thumbnail_url: str | None = Field(
|
|
72
|
+
default=None, alias="thumbnailUrl", description="Story thumbnail image URL."
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
class SnapchatProfileSnap(BaseModel):
|
|
77
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
78
|
+
|
|
79
|
+
id: str | None = Field(default=None, description="Snap identifier.")
|
|
80
|
+
media_url: str | None = Field(
|
|
81
|
+
default=None, alias="mediaUrl", description="Full-resolution media URL."
|
|
82
|
+
)
|
|
83
|
+
preview_url: str | None = Field(
|
|
84
|
+
default=None, alias="previewUrl", description="Preview/thumbnail media URL."
|
|
85
|
+
)
|
|
86
|
+
timestamp: str | None = Field(
|
|
87
|
+
default=None, description="Snap timestamp (ISO 8601)."
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class SnapchatNamespace:
|
|
92
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
93
|
+
|
|
94
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
95
|
+
self._client = client
|
|
96
|
+
|
|
97
|
+
def profile(
|
|
98
|
+
self,
|
|
99
|
+
*,
|
|
100
|
+
options: RequestOptions | None = None,
|
|
101
|
+
**input: Unpack[SnapchatProfileInput],
|
|
102
|
+
) -> RunResult[SnapchatProfileData]:
|
|
103
|
+
"""Snapchat Profile
|
|
104
|
+
|
|
105
|
+
Fetch a Snapchat user's public profile by username - display name, bio,
|
|
106
|
+
subscriber count, and recent public content - with transparent per-request
|
|
107
|
+
USD pricing.
|
|
108
|
+
|
|
109
|
+
Price: $0.001 per request plus $0.002 per result.
|
|
110
|
+
|
|
111
|
+
Example:
|
|
112
|
+
res = client.snapchat.profile(username="nasa")
|
|
113
|
+
"""
|
|
114
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
115
|
+
"snapchat.profile", dict(input), options
|
|
116
|
+
)
|
|
117
|
+
return RunResult[SnapchatProfileData].model_validate(raw)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
class AsyncSnapchatNamespace:
|
|
121
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
122
|
+
|
|
123
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
124
|
+
self._client = client
|
|
125
|
+
|
|
126
|
+
async def profile(
|
|
127
|
+
self,
|
|
128
|
+
*,
|
|
129
|
+
options: RequestOptions | None = None,
|
|
130
|
+
**input: Unpack[SnapchatProfileInput],
|
|
131
|
+
) -> RunResult[SnapchatProfileData]:
|
|
132
|
+
"""Snapchat Profile
|
|
133
|
+
|
|
134
|
+
Fetch a Snapchat user's public profile by username - display name, bio,
|
|
135
|
+
subscriber count, and recent public content - with transparent per-request
|
|
136
|
+
USD pricing.
|
|
137
|
+
|
|
138
|
+
Price: $0.001 per request plus $0.002 per result.
|
|
139
|
+
|
|
140
|
+
Example:
|
|
141
|
+
res = client.snapchat.profile(username="nasa")
|
|
142
|
+
"""
|
|
143
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
144
|
+
"snapchat.profile", dict(input), options
|
|
145
|
+
)
|
|
146
|
+
return RunResult[SnapchatProfileData].model_validate(raw)
|