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,119 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the upwork 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 UpworkJobsInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Upwork Jobs."""
|
|
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 Upwork jobs for (e.g. react developer)."""
|
|
25
|
+
sort: NotRequired[str]
|
|
26
|
+
"""Sort order for listings: newest or relevance (e.g. newest). Default: newest."""
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class UpworkJobsData(BaseModel):
|
|
30
|
+
items: list[UpworkJobsItem] = Field(
|
|
31
|
+
description="Job records: title, description, budget or hourly rate, required skills, posted date, and client details."
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class UpworkJobsItem(BaseModel):
|
|
36
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
37
|
+
|
|
38
|
+
budget: str | None = Field(
|
|
39
|
+
default=None, description="Fixed budget or hourly range."
|
|
40
|
+
)
|
|
41
|
+
client_location: str | None = Field(default=None, alias="clientLocation")
|
|
42
|
+
client_rating: float | None = Field(default=None, alias="clientRating")
|
|
43
|
+
client_total_spent: float | None = Field(
|
|
44
|
+
default=None,
|
|
45
|
+
alias="clientTotalSpent",
|
|
46
|
+
description="Client lifetime spend (USD).",
|
|
47
|
+
)
|
|
48
|
+
description: str | None = Field(
|
|
49
|
+
default=None, description="Present whenever the upstream returns this record."
|
|
50
|
+
)
|
|
51
|
+
experience_level: str | None = Field(default=None, alias="experienceLevel")
|
|
52
|
+
job_id: str = Field(alias="jobId", description="Upwork job identifier.")
|
|
53
|
+
job_type: str | None = Field(
|
|
54
|
+
default=None, alias="jobType", description="Fixed or Hourly."
|
|
55
|
+
)
|
|
56
|
+
payment_verified: bool | None = Field(
|
|
57
|
+
default=None,
|
|
58
|
+
alias="paymentVerified",
|
|
59
|
+
description="Whether the client's payment method is verified; null when Upwork reports it as unknown.",
|
|
60
|
+
)
|
|
61
|
+
posted_at: str | None = Field(
|
|
62
|
+
default=None, alias="postedAt", description="ISO 8601 posting date."
|
|
63
|
+
)
|
|
64
|
+
proposals: int | None = Field(
|
|
65
|
+
default=None, description="Number of proposals submitted."
|
|
66
|
+
)
|
|
67
|
+
tags: list[str] | None = Field(default=None, description="Skill tags.")
|
|
68
|
+
title: str
|
|
69
|
+
url: str = Field(description="Upwork job posting URL.")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class UpworkNamespace:
|
|
73
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
74
|
+
|
|
75
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
76
|
+
self._client = client
|
|
77
|
+
|
|
78
|
+
def jobs(
|
|
79
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[UpworkJobsInput]
|
|
80
|
+
) -> RunResult[UpworkJobsData]:
|
|
81
|
+
"""Upwork Jobs
|
|
82
|
+
|
|
83
|
+
Search Upwork job postings by keyword - up to 25 fresh listings per request
|
|
84
|
+
with transparent per-request USD pricing.
|
|
85
|
+
|
|
86
|
+
Price: $0.0033 per result.
|
|
87
|
+
|
|
88
|
+
Example:
|
|
89
|
+
res = client.upwork.jobs(limit=10, query="web developer")
|
|
90
|
+
"""
|
|
91
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
92
|
+
"upwork.jobs", dict(input), options
|
|
93
|
+
)
|
|
94
|
+
return RunResult[UpworkJobsData].model_validate(raw)
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
class AsyncUpworkNamespace:
|
|
98
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
99
|
+
|
|
100
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
101
|
+
self._client = client
|
|
102
|
+
|
|
103
|
+
async def jobs(
|
|
104
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[UpworkJobsInput]
|
|
105
|
+
) -> RunResult[UpworkJobsData]:
|
|
106
|
+
"""Upwork Jobs
|
|
107
|
+
|
|
108
|
+
Search Upwork job postings by keyword - up to 25 fresh listings per request
|
|
109
|
+
with transparent per-request USD pricing.
|
|
110
|
+
|
|
111
|
+
Price: $0.0033 per result.
|
|
112
|
+
|
|
113
|
+
Example:
|
|
114
|
+
res = client.upwork.jobs(limit=10, query="web developer")
|
|
115
|
+
"""
|
|
116
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
117
|
+
"upwork.jobs", dict(input), options
|
|
118
|
+
)
|
|
119
|
+
return RunResult[UpworkJobsData].model_validate(raw)
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the walmart 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 WalmartProductInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Walmart Product."""
|
|
20
|
+
|
|
21
|
+
url: Required[str]
|
|
22
|
+
"""Walmart product page URL."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class WalmartProductData(BaseModel):
|
|
26
|
+
items: list[WalmartProductItem] = Field(
|
|
27
|
+
description="Product detail records: title, price, availability, rating, review count, images, and specifications."
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class WalmartProductItem(BaseModel):
|
|
32
|
+
model_config = ConfigDict(extra="allow")
|
|
33
|
+
|
|
34
|
+
title: str
|
|
35
|
+
url: str
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class WalmartNamespace:
|
|
39
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
40
|
+
|
|
41
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
42
|
+
self._client = client
|
|
43
|
+
|
|
44
|
+
def product(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
options: RequestOptions | None = None,
|
|
48
|
+
**input: Unpack[WalmartProductInput],
|
|
49
|
+
) -> RunResult[WalmartProductData]:
|
|
50
|
+
"""Walmart Product
|
|
51
|
+
|
|
52
|
+
Fetch a Walmart product page by URL and get full product details - title,
|
|
53
|
+
price, availability, ratings, images, and specs - in one normalized,
|
|
54
|
+
flat-priced response.
|
|
55
|
+
|
|
56
|
+
Price: $0.00368 per result.
|
|
57
|
+
|
|
58
|
+
Example:
|
|
59
|
+
res = client.walmart.product(url="https://www.walmart.com/ip/Apple-AirPods-Pro-2/5689919121")
|
|
60
|
+
"""
|
|
61
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
62
|
+
"walmart.product", dict(input), options
|
|
63
|
+
)
|
|
64
|
+
return RunResult[WalmartProductData].model_validate(raw)
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class AsyncWalmartNamespace:
|
|
68
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
69
|
+
|
|
70
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
71
|
+
self._client = client
|
|
72
|
+
|
|
73
|
+
async def product(
|
|
74
|
+
self,
|
|
75
|
+
*,
|
|
76
|
+
options: RequestOptions | None = None,
|
|
77
|
+
**input: Unpack[WalmartProductInput],
|
|
78
|
+
) -> RunResult[WalmartProductData]:
|
|
79
|
+
"""Walmart Product
|
|
80
|
+
|
|
81
|
+
Fetch a Walmart product page by URL and get full product details - title,
|
|
82
|
+
price, availability, ratings, images, and specs - in one normalized,
|
|
83
|
+
flat-priced response.
|
|
84
|
+
|
|
85
|
+
Price: $0.00368 per result.
|
|
86
|
+
|
|
87
|
+
Example:
|
|
88
|
+
res = client.walmart.product(url="https://www.walmart.com/ip/Apple-AirPods-Pro-2/5689919121")
|
|
89
|
+
"""
|
|
90
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
91
|
+
"walmart.product", dict(input), options
|
|
92
|
+
)
|
|
93
|
+
return RunResult[WalmartProductData].model_validate(raw)
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the web 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 WebCrawlInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Website Crawl."""
|
|
20
|
+
|
|
21
|
+
limit: NotRequired[int]
|
|
22
|
+
"""Maximum number of results to return (1-10, default 10). You are billed per result returned, so a lower limit costs less. Range: 1 to 10."""
|
|
23
|
+
url: Required[str]
|
|
24
|
+
"""The website URL or domain to crawl."""
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class WebMapInput(TypedDict, total=False):
|
|
28
|
+
"""Input for Web Map."""
|
|
29
|
+
|
|
30
|
+
limit: NotRequired[int]
|
|
31
|
+
"""Maximum number of links to return. Default: 100."""
|
|
32
|
+
search: NotRequired[str]
|
|
33
|
+
"""Optional term that orders the returned links by relevance."""
|
|
34
|
+
url: Required[str]
|
|
35
|
+
"""The base URL of the site to map into a list of links."""
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class WebScrapeInput(TypedDict, total=False):
|
|
39
|
+
"""Input for Web Scrape."""
|
|
40
|
+
|
|
41
|
+
url: Required[str]
|
|
42
|
+
"""The URL of the page to scrape."""
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
class WebScreenshotInput(TypedDict, total=False):
|
|
46
|
+
"""Input for Website Screenshot."""
|
|
47
|
+
|
|
48
|
+
url: Required[str]
|
|
49
|
+
"""The full URL of the page to capture."""
|
|
50
|
+
viewportWidth: NotRequired[int]
|
|
51
|
+
"""Browser viewport width in pixels (e.g. 1280). Default: 1280."""
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class WebCrawlData(BaseModel):
|
|
55
|
+
items: list[WebCrawlItem] = Field(
|
|
56
|
+
description="Crawled page records: URL, page title, and extracted text content for each page."
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
class WebCrawlItem(BaseModel):
|
|
61
|
+
model_config = ConfigDict(extra="allow")
|
|
62
|
+
|
|
63
|
+
domain: str
|
|
64
|
+
text: str
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class WebMapData(BaseModel):
|
|
68
|
+
results: list[WebMapResult]
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class WebMapResult(BaseModel):
|
|
72
|
+
model_config = ConfigDict(extra="allow")
|
|
73
|
+
|
|
74
|
+
description: str
|
|
75
|
+
title: str
|
|
76
|
+
url: str
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
class WebScrapeData(BaseModel):
|
|
80
|
+
model_config = ConfigDict(extra="allow")
|
|
81
|
+
|
|
82
|
+
description: str
|
|
83
|
+
markdown: str
|
|
84
|
+
title: str
|
|
85
|
+
url: str
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
class WebScreenshotData(BaseModel):
|
|
89
|
+
items: list[WebScreenshotItem] = Field(
|
|
90
|
+
description="Screenshot records: the requested page URL and a link to the captured image."
|
|
91
|
+
)
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class WebScreenshotItem(BaseModel):
|
|
95
|
+
model_config = ConfigDict(extra="allow")
|
|
96
|
+
|
|
97
|
+
image: str | None = Field(
|
|
98
|
+
default=None, description="Present whenever the upstream returns this record."
|
|
99
|
+
)
|
|
100
|
+
url: str
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
class WebNamespace:
|
|
104
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
105
|
+
|
|
106
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
107
|
+
self._client = client
|
|
108
|
+
|
|
109
|
+
def crawl(
|
|
110
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[WebCrawlInput]
|
|
111
|
+
) -> RunResult[WebCrawlData]:
|
|
112
|
+
"""Website Crawl
|
|
113
|
+
|
|
114
|
+
Crawl a website and get clean text content from up to 10 pages in one
|
|
115
|
+
normalized response - ideal for feeding sites into LLMs and search indexes.
|
|
116
|
+
|
|
117
|
+
Price: $0.0015 per request plus $0.003 per result.
|
|
118
|
+
|
|
119
|
+
Example:
|
|
120
|
+
res = client.web.crawl(limit=3, url="https://example.com")
|
|
121
|
+
"""
|
|
122
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
123
|
+
"web.crawl", dict(input), options
|
|
124
|
+
)
|
|
125
|
+
return RunResult[WebCrawlData].model_validate(raw)
|
|
126
|
+
|
|
127
|
+
def map(
|
|
128
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[WebMapInput]
|
|
129
|
+
) -> RunResult[WebMapData]:
|
|
130
|
+
"""Web Map
|
|
131
|
+
|
|
132
|
+
Map an entire website into a clean list of its URLs (with titles and
|
|
133
|
+
descriptions) in a single call. Billed per request in real dollars.
|
|
134
|
+
|
|
135
|
+
Price: $0.0009 per request.
|
|
136
|
+
|
|
137
|
+
Example:
|
|
138
|
+
res = client.web.map(url="https://example.com")
|
|
139
|
+
"""
|
|
140
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
141
|
+
"web.map", dict(input), options
|
|
142
|
+
)
|
|
143
|
+
return RunResult[WebMapData].model_validate(raw)
|
|
144
|
+
|
|
145
|
+
def scrape(
|
|
146
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[WebScrapeInput]
|
|
147
|
+
) -> RunResult[WebScrapeData]:
|
|
148
|
+
"""Web Scrape
|
|
149
|
+
|
|
150
|
+
Scrape any web page and get its main content back as clean Markdown plus
|
|
151
|
+
title and metadata. One call, billed per request in real dollars.
|
|
152
|
+
|
|
153
|
+
Price: $0.0009 per request.
|
|
154
|
+
|
|
155
|
+
Example:
|
|
156
|
+
res = client.web.scrape(url="https://example.com")
|
|
157
|
+
"""
|
|
158
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
159
|
+
"web.scrape", dict(input), options
|
|
160
|
+
)
|
|
161
|
+
return RunResult[WebScrapeData].model_validate(raw)
|
|
162
|
+
|
|
163
|
+
def screenshot(
|
|
164
|
+
self,
|
|
165
|
+
*,
|
|
166
|
+
options: RequestOptions | None = None,
|
|
167
|
+
**input: Unpack[WebScreenshotInput],
|
|
168
|
+
) -> RunResult[WebScreenshotData]:
|
|
169
|
+
"""Website Screenshot
|
|
170
|
+
|
|
171
|
+
Capture a real-browser screenshot of any web page URL, with transparent
|
|
172
|
+
per-request USD pricing.
|
|
173
|
+
|
|
174
|
+
Price: $0.00158 per result.
|
|
175
|
+
|
|
176
|
+
Example:
|
|
177
|
+
res = client.web.screenshot(url="https://example.com")
|
|
178
|
+
"""
|
|
179
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
180
|
+
"web.screenshot", dict(input), options
|
|
181
|
+
)
|
|
182
|
+
return RunResult[WebScreenshotData].model_validate(raw)
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
class AsyncWebNamespace:
|
|
186
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
187
|
+
|
|
188
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
189
|
+
self._client = client
|
|
190
|
+
|
|
191
|
+
async def crawl(
|
|
192
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[WebCrawlInput]
|
|
193
|
+
) -> RunResult[WebCrawlData]:
|
|
194
|
+
"""Website Crawl
|
|
195
|
+
|
|
196
|
+
Crawl a website and get clean text content from up to 10 pages in one
|
|
197
|
+
normalized response - ideal for feeding sites into LLMs and search indexes.
|
|
198
|
+
|
|
199
|
+
Price: $0.0015 per request plus $0.003 per result.
|
|
200
|
+
|
|
201
|
+
Example:
|
|
202
|
+
res = client.web.crawl(limit=3, url="https://example.com")
|
|
203
|
+
"""
|
|
204
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
205
|
+
"web.crawl", dict(input), options
|
|
206
|
+
)
|
|
207
|
+
return RunResult[WebCrawlData].model_validate(raw)
|
|
208
|
+
|
|
209
|
+
async def map(
|
|
210
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[WebMapInput]
|
|
211
|
+
) -> RunResult[WebMapData]:
|
|
212
|
+
"""Web Map
|
|
213
|
+
|
|
214
|
+
Map an entire website into a clean list of its URLs (with titles and
|
|
215
|
+
descriptions) in a single call. Billed per request in real dollars.
|
|
216
|
+
|
|
217
|
+
Price: $0.0009 per request.
|
|
218
|
+
|
|
219
|
+
Example:
|
|
220
|
+
res = client.web.map(url="https://example.com")
|
|
221
|
+
"""
|
|
222
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
223
|
+
"web.map", dict(input), options
|
|
224
|
+
)
|
|
225
|
+
return RunResult[WebMapData].model_validate(raw)
|
|
226
|
+
|
|
227
|
+
async def scrape(
|
|
228
|
+
self, *, options: RequestOptions | None = None, **input: Unpack[WebScrapeInput]
|
|
229
|
+
) -> RunResult[WebScrapeData]:
|
|
230
|
+
"""Web Scrape
|
|
231
|
+
|
|
232
|
+
Scrape any web page and get its main content back as clean Markdown plus
|
|
233
|
+
title and metadata. One call, billed per request in real dollars.
|
|
234
|
+
|
|
235
|
+
Price: $0.0009 per request.
|
|
236
|
+
|
|
237
|
+
Example:
|
|
238
|
+
res = client.web.scrape(url="https://example.com")
|
|
239
|
+
"""
|
|
240
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
241
|
+
"web.scrape", dict(input), options
|
|
242
|
+
)
|
|
243
|
+
return RunResult[WebScrapeData].model_validate(raw)
|
|
244
|
+
|
|
245
|
+
async def screenshot(
|
|
246
|
+
self,
|
|
247
|
+
*,
|
|
248
|
+
options: RequestOptions | None = None,
|
|
249
|
+
**input: Unpack[WebScreenshotInput],
|
|
250
|
+
) -> RunResult[WebScreenshotData]:
|
|
251
|
+
"""Website Screenshot
|
|
252
|
+
|
|
253
|
+
Capture a real-browser screenshot of any web page URL, with transparent
|
|
254
|
+
per-request USD pricing.
|
|
255
|
+
|
|
256
|
+
Price: $0.00158 per result.
|
|
257
|
+
|
|
258
|
+
Example:
|
|
259
|
+
res = client.web.screenshot(url="https://example.com")
|
|
260
|
+
"""
|
|
261
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
262
|
+
"web.screenshot", dict(input), options
|
|
263
|
+
)
|
|
264
|
+
return RunResult[WebScreenshotData].model_validate(raw)
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the whatsapp 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 WhatsappValidateInput(TypedDict, total=False):
|
|
19
|
+
"""Input for WhatsApp Number Validator."""
|
|
20
|
+
|
|
21
|
+
phone: Required[str]
|
|
22
|
+
"""The phone number to check, in international format."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class WhatsappValidateData(BaseModel):
|
|
26
|
+
items: list[WhatsappValidateItem] = Field(
|
|
27
|
+
description="Validation records: the phone number with its WhatsApp registration status."
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class WhatsappValidateItem(BaseModel):
|
|
32
|
+
model_config = ConfigDict(extra="allow")
|
|
33
|
+
|
|
34
|
+
phone: str
|
|
35
|
+
status: str
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class WhatsappNamespace:
|
|
39
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
40
|
+
|
|
41
|
+
def __init__(self, client: "AnyAPI") -> None:
|
|
42
|
+
self._client = client
|
|
43
|
+
|
|
44
|
+
def validate(
|
|
45
|
+
self,
|
|
46
|
+
*,
|
|
47
|
+
options: RequestOptions | None = None,
|
|
48
|
+
**input: Unpack[WhatsappValidateInput],
|
|
49
|
+
) -> RunResult[WhatsappValidateData]:
|
|
50
|
+
"""WhatsApp Number Validator
|
|
51
|
+
|
|
52
|
+
Check whether a phone number is registered on WhatsApp, with transparent
|
|
53
|
+
per-request USD pricing.
|
|
54
|
+
|
|
55
|
+
Price: $0.0035 per request plus $0.001 per result.
|
|
56
|
+
|
|
57
|
+
Example:
|
|
58
|
+
res = client.whatsapp.validate(phone="+14155552671")
|
|
59
|
+
"""
|
|
60
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
61
|
+
"whatsapp.validate", dict(input), options
|
|
62
|
+
)
|
|
63
|
+
return RunResult[WhatsappValidateData].model_validate(raw)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
class AsyncWhatsappNamespace:
|
|
67
|
+
"""Typed methods for this platform. Attached lazily to the client."""
|
|
68
|
+
|
|
69
|
+
def __init__(self, client: "AsyncAnyAPI") -> None:
|
|
70
|
+
self._client = client
|
|
71
|
+
|
|
72
|
+
async def validate(
|
|
73
|
+
self,
|
|
74
|
+
*,
|
|
75
|
+
options: RequestOptions | None = None,
|
|
76
|
+
**input: Unpack[WhatsappValidateInput],
|
|
77
|
+
) -> RunResult[WhatsappValidateData]:
|
|
78
|
+
"""WhatsApp Number Validator
|
|
79
|
+
|
|
80
|
+
Check whether a phone number is registered on WhatsApp, with transparent
|
|
81
|
+
per-request USD pricing.
|
|
82
|
+
|
|
83
|
+
Price: $0.0035 per request plus $0.001 per result.
|
|
84
|
+
|
|
85
|
+
Example:
|
|
86
|
+
res = client.whatsapp.validate(phone="+14155552671")
|
|
87
|
+
"""
|
|
88
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
89
|
+
"whatsapp.validate", dict(input), options
|
|
90
|
+
)
|
|
91
|
+
return RunResult[WhatsappValidateData].model_validate(raw)
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Generated - do not edit. Regenerate with: pnpm generate
|
|
2
|
+
"""Generated namespace module for the yahoo_finance 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 YahooFinanceQuoteInput(TypedDict, total=False):
|
|
19
|
+
"""Input for Yahoo Finance Quote."""
|
|
20
|
+
|
|
21
|
+
ticker: Required[str]
|
|
22
|
+
"""The ticker symbol to look up."""
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class YahooFinanceQuoteData(BaseModel):
|
|
26
|
+
items: list[YahooFinanceQuoteItem] = Field(
|
|
27
|
+
description="Quote records for the ticker: current price, market cap, volume, day range, and key financial stats."
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class YahooFinanceQuoteItem(BaseModel):
|
|
32
|
+
model_config = ConfigDict(extra="allow")
|
|
33
|
+
|
|
34
|
+
name: str | None = Field(
|
|
35
|
+
default=None, description="Present whenever the upstream returns this record."
|
|
36
|
+
)
|
|
37
|
+
price: float
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class YahooFinanceNamespace:
|
|
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 quote(
|
|
47
|
+
self,
|
|
48
|
+
*,
|
|
49
|
+
options: RequestOptions | None = None,
|
|
50
|
+
**input: Unpack[YahooFinanceQuoteInput],
|
|
51
|
+
) -> RunResult[YahooFinanceQuoteData]:
|
|
52
|
+
"""Yahoo Finance Quote
|
|
53
|
+
|
|
54
|
+
Look up a stock or ETF by ticker symbol and get its Yahoo Finance quote -
|
|
55
|
+
price, market cap, volume, and key stats - as normalized JSON with
|
|
56
|
+
transparent per-request USD pricing.
|
|
57
|
+
|
|
58
|
+
Price: $0.00005 per request plus $0.0009 per result.
|
|
59
|
+
|
|
60
|
+
Example:
|
|
61
|
+
res = client.yahoo_finance.quote(ticker="AAPL")
|
|
62
|
+
"""
|
|
63
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
64
|
+
"yahoo_finance.quote", dict(input), options
|
|
65
|
+
)
|
|
66
|
+
return RunResult[YahooFinanceQuoteData].model_validate(raw)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
class AsyncYahooFinanceNamespace:
|
|
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 quote(
|
|
76
|
+
self,
|
|
77
|
+
*,
|
|
78
|
+
options: RequestOptions | None = None,
|
|
79
|
+
**input: Unpack[YahooFinanceQuoteInput],
|
|
80
|
+
) -> RunResult[YahooFinanceQuoteData]:
|
|
81
|
+
"""Yahoo Finance Quote
|
|
82
|
+
|
|
83
|
+
Look up a stock or ETF by ticker symbol and get its Yahoo Finance quote -
|
|
84
|
+
price, market cap, volume, and key stats - as normalized JSON with
|
|
85
|
+
transparent per-request USD pricing.
|
|
86
|
+
|
|
87
|
+
Price: $0.00005 per request plus $0.0009 per result.
|
|
88
|
+
|
|
89
|
+
Example:
|
|
90
|
+
res = client.yahoo_finance.quote(ticker="AAPL")
|
|
91
|
+
"""
|
|
92
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
93
|
+
"yahoo_finance.quote", dict(input), options
|
|
94
|
+
)
|
|
95
|
+
return RunResult[YahooFinanceQuoteData].model_validate(raw)
|