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,89 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Lazy namespace registry.
|
|
3
|
+
|
|
4
|
+
Maps a client attribute name to (module name, sync class, async class). The
|
|
5
|
+
sync/async clients read this via __getattr__ to attach namespaces on first use,
|
|
6
|
+
so `import getanyapi` stays fast (SPEC 3.1).
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
REGISTRY: dict[str, tuple[str, str, str]] = {
|
|
12
|
+
"ahrefs": ("ahrefs", "AhrefsNamespace", "AsyncAhrefsNamespace"),
|
|
13
|
+
"airbnb": ("airbnb", "AirbnbNamespace", "AsyncAirbnbNamespace"),
|
|
14
|
+
"alibaba": ("alibaba", "AlibabaNamespace", "AsyncAlibabaNamespace"),
|
|
15
|
+
"amazon": ("amazon", "AmazonNamespace", "AsyncAmazonNamespace"),
|
|
16
|
+
"appstore": ("appstore", "AppstoreNamespace", "AsyncAppstoreNamespace"),
|
|
17
|
+
"bluesky": ("bluesky", "BlueskyNamespace", "AsyncBlueskyNamespace"),
|
|
18
|
+
"booking": ("booking", "BookingNamespace", "AsyncBookingNamespace"),
|
|
19
|
+
"coinmarketcap": (
|
|
20
|
+
"coinmarketcap",
|
|
21
|
+
"CoinmarketcapNamespace",
|
|
22
|
+
"AsyncCoinmarketcapNamespace",
|
|
23
|
+
),
|
|
24
|
+
"congress": ("congress", "CongressNamespace", "AsyncCongressNamespace"),
|
|
25
|
+
"dexscreener": ("dexscreener", "DexscreenerNamespace", "AsyncDexscreenerNamespace"),
|
|
26
|
+
"ebay": ("ebay", "EbayNamespace", "AsyncEbayNamespace"),
|
|
27
|
+
"email": ("email", "EmailNamespace", "AsyncEmailNamespace"),
|
|
28
|
+
"facebook": ("facebook", "FacebookNamespace", "AsyncFacebookNamespace"),
|
|
29
|
+
"fiverr": ("fiverr", "FiverrNamespace", "AsyncFiverrNamespace"),
|
|
30
|
+
"github": ("github", "GithubNamespace", "AsyncGithubNamespace"),
|
|
31
|
+
"glassdoor": ("glassdoor", "GlassdoorNamespace", "AsyncGlassdoorNamespace"),
|
|
32
|
+
"google": ("google", "GoogleNamespace", "AsyncGoogleNamespace"),
|
|
33
|
+
"google_ads": ("google_ads", "GoogleAdsNamespace", "AsyncGoogleAdsNamespace"),
|
|
34
|
+
"google_finance": (
|
|
35
|
+
"google_finance",
|
|
36
|
+
"GoogleFinanceNamespace",
|
|
37
|
+
"AsyncGoogleFinanceNamespace",
|
|
38
|
+
),
|
|
39
|
+
"google_shopping": (
|
|
40
|
+
"google_shopping",
|
|
41
|
+
"GoogleShoppingNamespace",
|
|
42
|
+
"AsyncGoogleShoppingNamespace",
|
|
43
|
+
),
|
|
44
|
+
"hackernews": ("hackernews", "HackernewsNamespace", "AsyncHackernewsNamespace"),
|
|
45
|
+
"indeed": ("indeed", "IndeedNamespace", "AsyncIndeedNamespace"),
|
|
46
|
+
"instagram": ("instagram", "InstagramNamespace", "AsyncInstagramNamespace"),
|
|
47
|
+
"linkedin": ("linkedin", "LinkedinNamespace", "AsyncLinkedinNamespace"),
|
|
48
|
+
"maps": ("maps", "MapsNamespace", "AsyncMapsNamespace"),
|
|
49
|
+
"pandaexpress": (
|
|
50
|
+
"pandaexpress",
|
|
51
|
+
"PandaexpressNamespace",
|
|
52
|
+
"AsyncPandaexpressNamespace",
|
|
53
|
+
),
|
|
54
|
+
"person": ("person", "PersonNamespace", "AsyncPersonNamespace"),
|
|
55
|
+
"pinterest": ("pinterest", "PinterestNamespace", "AsyncPinterestNamespace"),
|
|
56
|
+
"playstore": ("playstore", "PlaystoreNamespace", "AsyncPlaystoreNamespace"),
|
|
57
|
+
"polymarket": ("polymarket", "PolymarketNamespace", "AsyncPolymarketNamespace"),
|
|
58
|
+
"realtor": ("realtor", "RealtorNamespace", "AsyncRealtorNamespace"),
|
|
59
|
+
"reddit": ("reddit", "RedditNamespace", "AsyncRedditNamespace"),
|
|
60
|
+
"redfin": ("redfin", "RedfinNamespace", "AsyncRedfinNamespace"),
|
|
61
|
+
"rednote": ("rednote", "RednoteNamespace", "AsyncRednoteNamespace"),
|
|
62
|
+
"sec": ("sec", "SecNamespace", "AsyncSecNamespace"),
|
|
63
|
+
"semrush": ("semrush", "SemrushNamespace", "AsyncSemrushNamespace"),
|
|
64
|
+
"snapchat": ("snapchat", "SnapchatNamespace", "AsyncSnapchatNamespace"),
|
|
65
|
+
"social": ("social", "SocialNamespace", "AsyncSocialNamespace"),
|
|
66
|
+
"spotify": ("spotify", "SpotifyNamespace", "AsyncSpotifyNamespace"),
|
|
67
|
+
"substack": ("substack", "SubstackNamespace", "AsyncSubstackNamespace"),
|
|
68
|
+
"threads": ("threads", "ThreadsNamespace", "AsyncThreadsNamespace"),
|
|
69
|
+
"tiktok": ("tiktok", "TiktokNamespace", "AsyncTiktokNamespace"),
|
|
70
|
+
"tiktok_shop": ("tiktok_shop", "TiktokShopNamespace", "AsyncTiktokShopNamespace"),
|
|
71
|
+
"tripadvisor": ("tripadvisor", "TripadvisorNamespace", "AsyncTripadvisorNamespace"),
|
|
72
|
+
"trustpilot": ("trustpilot", "TrustpilotNamespace", "AsyncTrustpilotNamespace"),
|
|
73
|
+
"truthsocial": ("truthsocial", "TruthsocialNamespace", "AsyncTruthsocialNamespace"),
|
|
74
|
+
"twitter": ("twitter", "TwitterNamespace", "AsyncTwitterNamespace"),
|
|
75
|
+
"upwork": ("upwork", "UpworkNamespace", "AsyncUpworkNamespace"),
|
|
76
|
+
"walmart": ("walmart", "WalmartNamespace", "AsyncWalmartNamespace"),
|
|
77
|
+
"web": ("web", "WebNamespace", "AsyncWebNamespace"),
|
|
78
|
+
"whatsapp": ("whatsapp", "WhatsappNamespace", "AsyncWhatsappNamespace"),
|
|
79
|
+
"yahoo_finance": (
|
|
80
|
+
"yahoo_finance",
|
|
81
|
+
"YahooFinanceNamespace",
|
|
82
|
+
"AsyncYahooFinanceNamespace",
|
|
83
|
+
),
|
|
84
|
+
"yelp": ("yelp", "YelpNamespace", "AsyncYelpNamespace"),
|
|
85
|
+
"youtube": ("youtube", "YoutubeNamespace", "AsyncYoutubeNamespace"),
|
|
86
|
+
"zillow": ("zillow", "ZillowNamespace", "AsyncZillowNamespace"),
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
__all__ = ["REGISTRY"]
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the ahrefs 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
|
+
|
|
13
|
+
if TYPE_CHECKING:
|
|
14
|
+
from .._async_client import AsyncAnyAPI
|
|
15
|
+
from .._client import AnyAPI
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class AhrefsBacklinksInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Ahrefs Backlinks."""
|
|
20
|
+
|
|
21
|
+
mode: NotRequired[Literal["exact", "subdomains"]]
|
|
22
|
+
"""Match scope: "exact" for the given URL only, or "subdomains" to include the domain and its subdomains. Default: subdomains."""
|
|
23
|
+
url: Required[str]
|
|
24
|
+
"""The domain or page URL to find backlinks for (e.g. "ahrefs.com")."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class AhrefsKeywordIdeasInput(TypedDict, total=False):
|
|
28
|
+
"""Input for Ahrefs Keyword Ideas."""
|
|
29
|
+
|
|
30
|
+
country: NotRequired[str]
|
|
31
|
+
"""Two-letter country code that scopes the suggestions (e.g. us, gb, de). Default: us."""
|
|
32
|
+
keyword: Required[str]
|
|
33
|
+
"""The seed keyword to expand into related suggestions (e.g. "coffee")."""
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class AhrefsKeywordsInput(TypedDict, total=False):
|
|
37
|
+
"""Input for Ahrefs Keyword Difficulty."""
|
|
38
|
+
|
|
39
|
+
country: NotRequired[str]
|
|
40
|
+
"""Two-letter country code that scopes volume and difficulty (e.g. us, gb, de). Default: us."""
|
|
41
|
+
keyword: Required[str]
|
|
42
|
+
"""The search term to analyze (e.g. "seo tools")."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class AhrefsOverviewInput(TypedDict, total=False):
|
|
46
|
+
"""Input for Ahrefs Domain Overview."""
|
|
47
|
+
|
|
48
|
+
mode: NotRequired[Literal["exact", "subdomains"]]
|
|
49
|
+
"""Analysis scope: subdomains covers the whole domain, exact matches only the given URL. Default: subdomains."""
|
|
50
|
+
url: Required[str]
|
|
51
|
+
"""The domain or page URL to analyze (e.g. ahrefs.com)."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class AhrefsBacklinksData(BaseModel):
|
|
55
|
+
items: list[AhrefsBacklinksItem] = Field(
|
|
56
|
+
description="Referring pages that link to the domain or URL."
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class AhrefsBacklinksItem(BaseModel):
|
|
61
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
62
|
+
|
|
63
|
+
anchor: str | None = Field(default=None, description="Anchor text of the link.")
|
|
64
|
+
context_after: str | None = Field(
|
|
65
|
+
default=None,
|
|
66
|
+
alias="contextAfter",
|
|
67
|
+
description="Text immediately after the anchor on the referring page.",
|
|
68
|
+
)
|
|
69
|
+
context_before: str | None = Field(
|
|
70
|
+
default=None,
|
|
71
|
+
alias="contextBefore",
|
|
72
|
+
description="Text immediately before the anchor on the referring page.",
|
|
73
|
+
)
|
|
74
|
+
domain_rating: float | None = Field(
|
|
75
|
+
default=None,
|
|
76
|
+
alias="domainRating",
|
|
77
|
+
description="Ahrefs Domain Rating (0-100) of the linking domain.",
|
|
78
|
+
)
|
|
79
|
+
title: str | None = Field(default=None, description="Title of the referring page.")
|
|
80
|
+
url_from: str = Field(
|
|
81
|
+
alias="urlFrom", description="URL of the referring page that contains the link."
|
|
82
|
+
)
|
|
83
|
+
url_to: str | None = Field(
|
|
84
|
+
default=None, alias="urlTo", description="Target URL the link points to."
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class AhrefsKeywordIdeasData(BaseModel):
|
|
89
|
+
items: list[AhrefsKeywordIdeasItem] = Field(
|
|
90
|
+
description="Keyword-idea records: the seed keyword and its related keyword suggestions, each with an Ahrefs difficulty and search-volume bucket."
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class AhrefsKeywordIdeasItem(BaseModel):
|
|
95
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
96
|
+
|
|
97
|
+
country: str | None = Field(
|
|
98
|
+
default=None,
|
|
99
|
+
description="Two-letter country code the suggestions are scoped to.",
|
|
100
|
+
)
|
|
101
|
+
ideas: list[AhrefsKeywordIdeasIdea] | None = Field(
|
|
102
|
+
default=None,
|
|
103
|
+
description="Related keyword suggestions for the seed term. Present whenever the upstream returns this record.",
|
|
104
|
+
)
|
|
105
|
+
search_engine: str | None = Field(
|
|
106
|
+
default=None,
|
|
107
|
+
alias="searchEngine",
|
|
108
|
+
description="Search engine the suggestions are drawn from (e.g. Google).",
|
|
109
|
+
)
|
|
110
|
+
source_keyword: str = Field(
|
|
111
|
+
alias="sourceKeyword",
|
|
112
|
+
description="The seed keyword the suggestions were expanded from.",
|
|
113
|
+
)
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
class AhrefsKeywordIdeasIdea(BaseModel):
|
|
117
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
118
|
+
|
|
119
|
+
difficulty: str | None = Field(
|
|
120
|
+
default=None,
|
|
121
|
+
description="Relative Ahrefs difficulty bucket (a letter such as E, M, or H), not an exact number.",
|
|
122
|
+
)
|
|
123
|
+
keyword: str = Field(description="The suggested related keyword.")
|
|
124
|
+
updated_at: str | None = Field(
|
|
125
|
+
default=None,
|
|
126
|
+
alias="updatedAt",
|
|
127
|
+
description="Timestamp the suggestion metrics were last updated.",
|
|
128
|
+
)
|
|
129
|
+
volume: str | None = Field(
|
|
130
|
+
default=None,
|
|
131
|
+
description="Relative search-volume bucket (a letter grade), not an exact number.",
|
|
132
|
+
)
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class AhrefsKeywordsData(BaseModel):
|
|
136
|
+
items: list[AhrefsKeywordsItem] = Field(
|
|
137
|
+
description="Keyword-difficulty records: the difficulty score and the referring-domain gap needed to rank in the top 10."
|
|
138
|
+
)
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
class AhrefsKeywordsItem(BaseModel):
|
|
142
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
143
|
+
|
|
144
|
+
country: str | None = Field(
|
|
145
|
+
default=None, description="Two-letter country code the metrics are scoped to."
|
|
146
|
+
)
|
|
147
|
+
difficulty: int | None = Field(
|
|
148
|
+
default=None, description="Ahrefs Keyword Difficulty, 0-100."
|
|
149
|
+
)
|
|
150
|
+
keyword: str
|
|
151
|
+
referring_domains_to_rank: int | None = Field(
|
|
152
|
+
default=None,
|
|
153
|
+
alias="referringDomainsToRank",
|
|
154
|
+
description="Estimated number of referring domains a page needs to rank in the top 10 for this keyword.",
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
class AhrefsOverviewData(BaseModel):
|
|
159
|
+
items: list[AhrefsOverviewItem] = Field(
|
|
160
|
+
description="Domain authority records: the requested domain plus its Domain Rating, total backlinks, and referring-domain counts."
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class AhrefsOverviewItem(BaseModel):
|
|
165
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
166
|
+
|
|
167
|
+
backlinks: int | None = Field(
|
|
168
|
+
default=None, description="Total number of backlinks pointing to the domain."
|
|
169
|
+
)
|
|
170
|
+
dofollow_backlinks_pct: int | None = Field(
|
|
171
|
+
default=None,
|
|
172
|
+
alias="dofollowBacklinksPct",
|
|
173
|
+
description="Percentage (0-100) of backlinks that are dofollow.",
|
|
174
|
+
)
|
|
175
|
+
dofollow_referring_domains_pct: int | None = Field(
|
|
176
|
+
default=None,
|
|
177
|
+
alias="dofollowReferringDomainsPct",
|
|
178
|
+
description="Percentage (0-100) of referring domains that provide a dofollow link.",
|
|
179
|
+
)
|
|
180
|
+
domain: str = Field(description="The domain or URL the metrics are scoped to.")
|
|
181
|
+
domain_rating: float | None = Field(
|
|
182
|
+
default=None,
|
|
183
|
+
alias="domainRating",
|
|
184
|
+
description="Ahrefs Domain Rating, 0-100, measuring backlink-profile strength.",
|
|
185
|
+
)
|
|
186
|
+
mode: str | None = Field(
|
|
187
|
+
default=None,
|
|
188
|
+
description="Analysis scope used: subdomains (whole domain) or exact (the given URL only).",
|
|
189
|
+
)
|
|
190
|
+
referring_domains: int | None = Field(
|
|
191
|
+
default=None,
|
|
192
|
+
alias="referringDomains",
|
|
193
|
+
description="Number of unique referring domains linking to the domain.",
|
|
194
|
+
)
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
class AhrefsNamespace:
|
|
198
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
199
|
+
|
|
200
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
201
|
+
self._client = client
|
|
202
|
+
|
|
203
|
+
def backlinks(
|
|
204
|
+
self,
|
|
205
|
+
*,
|
|
206
|
+
options: RequestOptions | None = None,
|
|
207
|
+
**input: Unpack[AhrefsBacklinksInput],
|
|
208
|
+
) -> RunResult[AhrefsBacklinksData]:
|
|
209
|
+
"""Ahrefs Backlinks
|
|
210
|
+
|
|
211
|
+
Get the referring pages linking to a domain or URL, each with the source
|
|
212
|
+
page, anchor text, linking domain rating, and page title. Transparent
|
|
213
|
+
per-request USD pricing.
|
|
214
|
+
|
|
215
|
+
Price: $0.0195 per request.
|
|
216
|
+
|
|
217
|
+
Example:
|
|
218
|
+
res = client.ahrefs.backlinks(mode="exact", url="ahrefs.com")
|
|
219
|
+
"""
|
|
220
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
221
|
+
"ahrefs.backlinks", dict(input), options
|
|
222
|
+
)
|
|
223
|
+
return RunResult[AhrefsBacklinksData].model_validate(raw)
|
|
224
|
+
|
|
225
|
+
def keyword_ideas(
|
|
226
|
+
self,
|
|
227
|
+
*,
|
|
228
|
+
options: RequestOptions | None = None,
|
|
229
|
+
**input: Unpack[AhrefsKeywordIdeasInput],
|
|
230
|
+
) -> RunResult[AhrefsKeywordIdeasData]:
|
|
231
|
+
"""Ahrefs Keyword Ideas
|
|
232
|
+
|
|
233
|
+
Get related keyword suggestions for any seed term, each with an Ahrefs
|
|
234
|
+
difficulty and search-volume bucket. Transparent per-request USD pricing.
|
|
235
|
+
|
|
236
|
+
Price: $0.0015 per request plus $0.018 per result.
|
|
237
|
+
|
|
238
|
+
Example:
|
|
239
|
+
res = client.ahrefs.keyword_ideas(country="us", keyword="coffee")
|
|
240
|
+
"""
|
|
241
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
242
|
+
"ahrefs.keyword_ideas", dict(input), options
|
|
243
|
+
)
|
|
244
|
+
return RunResult[AhrefsKeywordIdeasData].model_validate(raw)
|
|
245
|
+
|
|
246
|
+
def keywords(
|
|
247
|
+
self,
|
|
248
|
+
*,
|
|
249
|
+
options: RequestOptions | None = None,
|
|
250
|
+
**input: Unpack[AhrefsKeywordsInput],
|
|
251
|
+
) -> RunResult[AhrefsKeywordsData]:
|
|
252
|
+
"""Ahrefs Keyword Difficulty
|
|
253
|
+
|
|
254
|
+
Get the Ahrefs keyword-difficulty metrics for any search term: the
|
|
255
|
+
difficulty score (0-100) and the number of referring domains a page needs to
|
|
256
|
+
rank in the top 10 - as normalized JSON with transparent per-request USD
|
|
257
|
+
pricing.
|
|
258
|
+
|
|
259
|
+
Price: $0.0015 per request plus $0.018 per result.
|
|
260
|
+
|
|
261
|
+
Example:
|
|
262
|
+
res = client.ahrefs.keywords(country="us", keyword="seo tools")
|
|
263
|
+
"""
|
|
264
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
265
|
+
"ahrefs.keywords", dict(input), options
|
|
266
|
+
)
|
|
267
|
+
return RunResult[AhrefsKeywordsData].model_validate(raw)
|
|
268
|
+
|
|
269
|
+
def overview(
|
|
270
|
+
self,
|
|
271
|
+
*,
|
|
272
|
+
options: RequestOptions | None = None,
|
|
273
|
+
**input: Unpack[AhrefsOverviewInput],
|
|
274
|
+
) -> RunResult[AhrefsOverviewData]:
|
|
275
|
+
"""Ahrefs Domain Overview
|
|
276
|
+
|
|
277
|
+
Get an SEO authority overview for any domain or URL: Domain Rating, total
|
|
278
|
+
backlinks, and referring domains - as normalized JSON with transparent
|
|
279
|
+
per-request USD pricing.
|
|
280
|
+
|
|
281
|
+
Price: $0.0015 per request plus $0.018 per result.
|
|
282
|
+
|
|
283
|
+
Example:
|
|
284
|
+
res = client.ahrefs.overview(mode="subdomains", url="ahrefs.com")
|
|
285
|
+
"""
|
|
286
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
287
|
+
"ahrefs.overview", dict(input), options
|
|
288
|
+
)
|
|
289
|
+
return RunResult[AhrefsOverviewData].model_validate(raw)
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
class AsyncAhrefsNamespace:
|
|
293
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
294
|
+
|
|
295
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
296
|
+
self._client = client
|
|
297
|
+
|
|
298
|
+
async def backlinks(
|
|
299
|
+
self,
|
|
300
|
+
*,
|
|
301
|
+
options: RequestOptions | None = None,
|
|
302
|
+
**input: Unpack[AhrefsBacklinksInput],
|
|
303
|
+
) -> RunResult[AhrefsBacklinksData]:
|
|
304
|
+
"""Ahrefs Backlinks
|
|
305
|
+
|
|
306
|
+
Get the referring pages linking to a domain or URL, each with the source
|
|
307
|
+
page, anchor text, linking domain rating, and page title. Transparent
|
|
308
|
+
per-request USD pricing.
|
|
309
|
+
|
|
310
|
+
Price: $0.0195 per request.
|
|
311
|
+
|
|
312
|
+
Example:
|
|
313
|
+
res = client.ahrefs.backlinks(mode="exact", url="ahrefs.com")
|
|
314
|
+
"""
|
|
315
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
316
|
+
"ahrefs.backlinks", dict(input), options
|
|
317
|
+
)
|
|
318
|
+
return RunResult[AhrefsBacklinksData].model_validate(raw)
|
|
319
|
+
|
|
320
|
+
async def keyword_ideas(
|
|
321
|
+
self,
|
|
322
|
+
*,
|
|
323
|
+
options: RequestOptions | None = None,
|
|
324
|
+
**input: Unpack[AhrefsKeywordIdeasInput],
|
|
325
|
+
) -> RunResult[AhrefsKeywordIdeasData]:
|
|
326
|
+
"""Ahrefs Keyword Ideas
|
|
327
|
+
|
|
328
|
+
Get related keyword suggestions for any seed term, each with an Ahrefs
|
|
329
|
+
difficulty and search-volume bucket. Transparent per-request USD pricing.
|
|
330
|
+
|
|
331
|
+
Price: $0.0015 per request plus $0.018 per result.
|
|
332
|
+
|
|
333
|
+
Example:
|
|
334
|
+
res = client.ahrefs.keyword_ideas(country="us", keyword="coffee")
|
|
335
|
+
"""
|
|
336
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
337
|
+
"ahrefs.keyword_ideas", dict(input), options
|
|
338
|
+
)
|
|
339
|
+
return RunResult[AhrefsKeywordIdeasData].model_validate(raw)
|
|
340
|
+
|
|
341
|
+
async def keywords(
|
|
342
|
+
self,
|
|
343
|
+
*,
|
|
344
|
+
options: RequestOptions | None = None,
|
|
345
|
+
**input: Unpack[AhrefsKeywordsInput],
|
|
346
|
+
) -> RunResult[AhrefsKeywordsData]:
|
|
347
|
+
"""Ahrefs Keyword Difficulty
|
|
348
|
+
|
|
349
|
+
Get the Ahrefs keyword-difficulty metrics for any search term: the
|
|
350
|
+
difficulty score (0-100) and the number of referring domains a page needs to
|
|
351
|
+
rank in the top 10 - as normalized JSON with transparent per-request USD
|
|
352
|
+
pricing.
|
|
353
|
+
|
|
354
|
+
Price: $0.0015 per request plus $0.018 per result.
|
|
355
|
+
|
|
356
|
+
Example:
|
|
357
|
+
res = client.ahrefs.keywords(country="us", keyword="seo tools")
|
|
358
|
+
"""
|
|
359
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
360
|
+
"ahrefs.keywords", dict(input), options
|
|
361
|
+
)
|
|
362
|
+
return RunResult[AhrefsKeywordsData].model_validate(raw)
|
|
363
|
+
|
|
364
|
+
async def overview(
|
|
365
|
+
self,
|
|
366
|
+
*,
|
|
367
|
+
options: RequestOptions | None = None,
|
|
368
|
+
**input: Unpack[AhrefsOverviewInput],
|
|
369
|
+
) -> RunResult[AhrefsOverviewData]:
|
|
370
|
+
"""Ahrefs Domain Overview
|
|
371
|
+
|
|
372
|
+
Get an SEO authority overview for any domain or URL: Domain Rating, total
|
|
373
|
+
backlinks, and referring domains - as normalized JSON with transparent
|
|
374
|
+
per-request USD pricing.
|
|
375
|
+
|
|
376
|
+
Price: $0.0015 per request plus $0.018 per result.
|
|
377
|
+
|
|
378
|
+
Example:
|
|
379
|
+
res = client.ahrefs.overview(mode="subdomains", url="ahrefs.com")
|
|
380
|
+
"""
|
|
381
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
382
|
+
"ahrefs.overview", dict(input), options
|
|
383
|
+
)
|
|
384
|
+
return RunResult[AhrefsOverviewData].model_validate(raw)
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the airbnb 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 AirbnbSearchInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Airbnb Search."""
|
|
20
|
+
|
|
21
|
+
adults: NotRequired[int]
|
|
22
|
+
"""Number of adult guests (e.g. 2)."""
|
|
23
|
+
checkIn: NotRequired[str]
|
|
24
|
+
"""Check-in date in YYYY-MM-DD format (e.g. 2026-07-01)."""
|
|
25
|
+
checkOut: NotRequired[str]
|
|
26
|
+
"""Check-out date in YYYY-MM-DD format (e.g. 2026-07-05)."""
|
|
27
|
+
currency: NotRequired[str]
|
|
28
|
+
"""Currency code for prices (e.g. EUR). Default: USD."""
|
|
29
|
+
limit: NotRequired[int]
|
|
30
|
+
"""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."""
|
|
31
|
+
location: Required[str]
|
|
32
|
+
"""Location to search listings in (e.g. London)."""
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AirbnbSearchData(BaseModel):
|
|
36
|
+
items: list[AirbnbSearchItem] = Field(
|
|
37
|
+
description="Listing records: name, nightly price, rating, location, host info, and availability details."
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class AirbnbSearchItem(BaseModel):
|
|
42
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
43
|
+
|
|
44
|
+
host_name: str | None = Field(default=None, alias="hostName")
|
|
45
|
+
id: str = Field(description="Airbnb listing identifier.")
|
|
46
|
+
image: str | None = Field(
|
|
47
|
+
default=None,
|
|
48
|
+
description="Primary listing image URL. Present whenever the upstream returns this record.",
|
|
49
|
+
)
|
|
50
|
+
is_available: bool | None = Field(default=None, alias="isAvailable")
|
|
51
|
+
is_superhost: bool | None = Field(default=None, alias="isSuperhost")
|
|
52
|
+
latitude: float | None = None
|
|
53
|
+
location: str | None = Field(default=None, description="Location subtitle.")
|
|
54
|
+
longitude: float | None = None
|
|
55
|
+
person_capacity: int | None = Field(default=None, alias="personCapacity")
|
|
56
|
+
price: str | None = Field(default=None, description="Nightly price label.")
|
|
57
|
+
property_type: str | None = Field(default=None, alias="propertyType")
|
|
58
|
+
rating: float | None = Field(
|
|
59
|
+
default=None, description="Guest satisfaction rating (0-5)."
|
|
60
|
+
)
|
|
61
|
+
reviews_count: int | None = Field(default=None, alias="reviewsCount")
|
|
62
|
+
room_type: str | None = Field(default=None, alias="roomType")
|
|
63
|
+
title: str
|
|
64
|
+
url: str
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class AirbnbNamespace:
|
|
68
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
69
|
+
|
|
70
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
71
|
+
self._client = client
|
|
72
|
+
|
|
73
|
+
def search(
|
|
74
|
+
self,
|
|
75
|
+
*,
|
|
76
|
+
options: RequestOptions | None = None,
|
|
77
|
+
**input: Unpack[AirbnbSearchInput],
|
|
78
|
+
) -> RunResult[AirbnbSearchData]:
|
|
79
|
+
"""Airbnb Search
|
|
80
|
+
|
|
81
|
+
Search Airbnb listings by location and dates and get results (name, price,
|
|
82
|
+
rating, host) as normalized JSON with flat per-request USD pricing.
|
|
83
|
+
|
|
84
|
+
Price: $0.00008 per request plus $0.0015 per result.
|
|
85
|
+
|
|
86
|
+
Example:
|
|
87
|
+
res = client.airbnb.search(limit=3, location="San Diego")
|
|
88
|
+
"""
|
|
89
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
90
|
+
"airbnb.search", dict(input), options
|
|
91
|
+
)
|
|
92
|
+
return RunResult[AirbnbSearchData].model_validate(raw)
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class AsyncAirbnbNamespace:
|
|
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 search(
|
|
102
|
+
self,
|
|
103
|
+
*,
|
|
104
|
+
options: RequestOptions | None = None,
|
|
105
|
+
**input: Unpack[AirbnbSearchInput],
|
|
106
|
+
) -> RunResult[AirbnbSearchData]:
|
|
107
|
+
"""Airbnb Search
|
|
108
|
+
|
|
109
|
+
Search Airbnb listings by location and dates and get results (name, price,
|
|
110
|
+
rating, host) as normalized JSON with flat per-request USD pricing.
|
|
111
|
+
|
|
112
|
+
Price: $0.00008 per request plus $0.0015 per result.
|
|
113
|
+
|
|
114
|
+
Example:
|
|
115
|
+
res = client.airbnb.search(limit=3, location="San Diego")
|
|
116
|
+
"""
|
|
117
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
118
|
+
"airbnb.search", dict(input), options
|
|
119
|
+
)
|
|
120
|
+
return RunResult[AirbnbSearchData].model_validate(raw)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the alibaba 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 AlibabaSearchInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Alibaba Search."""
|
|
20
|
+
|
|
21
|
+
limit: NotRequired[int]
|
|
22
|
+
"""Maximum number of results to return (1-25, default 25). You are billed per result returned, so a lower limit costs less. Range: 1 to 25."""
|
|
23
|
+
query: Required[str]
|
|
24
|
+
"""Keywords to search for on Alibaba (e.g. "bluetooth speaker wholesale")."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class AlibabaSearchData(BaseModel):
|
|
28
|
+
items: list[AlibabaSearchItem] = Field(
|
|
29
|
+
description="Matching Alibaba wholesale listings: title, price range, minimum order quantity, supplier name, and listing URL."
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class AlibabaSearchItem(BaseModel):
|
|
34
|
+
model_config = ConfigDict(extra="allow")
|
|
35
|
+
|
|
36
|
+
title: str
|
|
37
|
+
url: str
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class AlibabaNamespace:
|
|
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 search(
|
|
47
|
+
self,
|
|
48
|
+
*,
|
|
49
|
+
options: RequestOptions | None = None,
|
|
50
|
+
**input: Unpack[AlibabaSearchInput],
|
|
51
|
+
) -> RunResult[AlibabaSearchData]:
|
|
52
|
+
"""Alibaba Search
|
|
53
|
+
|
|
54
|
+
Search Alibaba by keyword and get up to 25 wholesale listings - title, price
|
|
55
|
+
range, minimum order, and supplier - in one normalized, flat-priced
|
|
56
|
+
response.
|
|
57
|
+
|
|
58
|
+
Price: $0.0012 per result.
|
|
59
|
+
|
|
60
|
+
Example:
|
|
61
|
+
res = client.alibaba.search(limit=3, query="bluetooth speaker")
|
|
62
|
+
"""
|
|
63
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
64
|
+
"alibaba.search", dict(input), options
|
|
65
|
+
)
|
|
66
|
+
return RunResult[AlibabaSearchData].model_validate(raw)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class AsyncAlibabaNamespace:
|
|
70
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
71
|
+
|
|
72
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
73
|
+
self._client = client
|
|
74
|
+
|
|
75
|
+
async def search(
|
|
76
|
+
self,
|
|
77
|
+
*,
|
|
78
|
+
options: RequestOptions | None = None,
|
|
79
|
+
**input: Unpack[AlibabaSearchInput],
|
|
80
|
+
) -> RunResult[AlibabaSearchData]:
|
|
81
|
+
"""Alibaba Search
|
|
82
|
+
|
|
83
|
+
Search Alibaba by keyword and get up to 25 wholesale listings - title, price
|
|
84
|
+
range, minimum order, and supplier - in one normalized, flat-priced
|
|
85
|
+
response.
|
|
86
|
+
|
|
87
|
+
Price: $0.0012 per result.
|
|
88
|
+
|
|
89
|
+
Example:
|
|
90
|
+
res = client.alibaba.search(limit=3, query="bluetooth speaker")
|
|
91
|
+
"""
|
|
92
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
93
|
+
"alibaba.search", dict(input), options
|
|
94
|
+
)
|
|
95
|
+
return RunResult[AlibabaSearchData].model_validate(raw)
|