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,215 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the bluesky 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 BlueskyPostInput(TypedDict, total=False):
19
+ """Input for Bluesky Post."""
20
+
21
+ url: Required[str]
22
+ """Bluesky post URL, e.g. "https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l"."""
23
+
24
+
25
+ class BlueskyProfileInput(TypedDict, total=False):
26
+ """Input for Bluesky Profile."""
27
+
28
+ handle: Required[str]
29
+ """Bluesky handle, e.g. "bsky.app" or "jay.bsky.team"."""
30
+
31
+
32
+ class BlueskyUserPostsInput(TypedDict, total=False):
33
+ """Input for Bluesky User Posts."""
34
+
35
+ handle: Required[str]
36
+ """Bluesky handle, e.g. "bsky.app" or "jay.bsky.team"."""
37
+
38
+
39
+ class BlueskyPostData(BaseModel):
40
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
41
+
42
+ author_handle: str = Field(alias="authorHandle")
43
+ created_at: str = Field(alias="createdAt")
44
+ likes: int
45
+ replies: int
46
+ reposts: int
47
+ text: str
48
+
49
+
50
+ class BlueskyProfileData(BaseModel):
51
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
52
+
53
+ description: str
54
+ display_name: str = Field(alias="displayName")
55
+ followers: int
56
+ following: int
57
+ handle: str
58
+ posts_count: int = Field(alias="postsCount")
59
+
60
+
61
+ class BlueskyUserPostsData(BaseModel):
62
+ posts: list[BlueskyUserPostsPost]
63
+
64
+
65
+ class BlueskyUserPostsPost(BaseModel):
66
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
67
+
68
+ author_handle: str = Field(alias="authorHandle")
69
+ created_at: str = Field(alias="createdAt")
70
+ likes: int
71
+ replies: int
72
+ reposts: int
73
+ text: str
74
+
75
+
76
+ class BlueskyNamespace:
77
+ """Typed methods for this platform. Attached lazily to the client."""
78
+
79
+ def __init__(self, client: "AnyAPI") -> None:
80
+ self._client = client
81
+
82
+ def post(
83
+ self,
84
+ *,
85
+ options: RequestOptions | None = None,
86
+ **input: Unpack[BlueskyPostInput],
87
+ ) -> RunResult[BlueskyPostData]:
88
+ """Bluesky Post
89
+
90
+ Get a single Bluesky post by URL - text, author handle, like, reply, and
91
+ repost counts as clean JSON, billed per request in USD.
92
+
93
+ Price: $0.002 per request.
94
+
95
+ Example:
96
+ res = client.bluesky.post(url="https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l")
97
+ """
98
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
99
+ "bluesky.post", dict(input), options
100
+ )
101
+ return RunResult[BlueskyPostData].model_validate(raw)
102
+
103
+ def profile(
104
+ self,
105
+ *,
106
+ options: RequestOptions | None = None,
107
+ **input: Unpack[BlueskyProfileInput],
108
+ ) -> RunResult[BlueskyProfileData]:
109
+ """Bluesky Profile
110
+
111
+ Get a Bluesky user's public profile by handle - display name, bio, follower
112
+ and post counts as clean JSON, billed per request in USD.
113
+
114
+ Price: $0.002 per request.
115
+
116
+ Example:
117
+ res = client.bluesky.profile(handle="bsky.app")
118
+ """
119
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
120
+ "bluesky.profile", dict(input), options
121
+ )
122
+ return RunResult[BlueskyProfileData].model_validate(raw)
123
+
124
+ def user_posts(
125
+ self,
126
+ *,
127
+ options: RequestOptions | None = None,
128
+ **input: Unpack[BlueskyUserPostsInput],
129
+ ) -> RunResult[BlueskyUserPostsData]:
130
+ """Bluesky User Posts
131
+
132
+ List a Bluesky account's recent posts (text, author handle, like, reply, and
133
+ repost counts) by handle as clean JSON, normalized across providers, billed
134
+ per request in USD.
135
+
136
+ Price: $0.002 per request.
137
+
138
+ Example:
139
+ res = client.bluesky.user_posts(handle="bsky.app")
140
+ """
141
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
142
+ "bluesky.user_posts", dict(input), options
143
+ )
144
+ return RunResult[BlueskyUserPostsData].model_validate(raw)
145
+
146
+
147
+ class AsyncBlueskyNamespace:
148
+ """Typed methods for this platform. Attached lazily to the client."""
149
+
150
+ def __init__(self, client: "AsyncAnyAPI") -> None:
151
+ self._client = client
152
+
153
+ async def post(
154
+ self,
155
+ *,
156
+ options: RequestOptions | None = None,
157
+ **input: Unpack[BlueskyPostInput],
158
+ ) -> RunResult[BlueskyPostData]:
159
+ """Bluesky Post
160
+
161
+ Get a single Bluesky post by URL - text, author handle, like, reply, and
162
+ repost counts as clean JSON, billed per request in USD.
163
+
164
+ Price: $0.002 per request.
165
+
166
+ Example:
167
+ res = client.bluesky.post(url="https://bsky.app/profile/bsky.app/post/3l6oveex3ii2l")
168
+ """
169
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
170
+ "bluesky.post", dict(input), options
171
+ )
172
+ return RunResult[BlueskyPostData].model_validate(raw)
173
+
174
+ async def profile(
175
+ self,
176
+ *,
177
+ options: RequestOptions | None = None,
178
+ **input: Unpack[BlueskyProfileInput],
179
+ ) -> RunResult[BlueskyProfileData]:
180
+ """Bluesky Profile
181
+
182
+ Get a Bluesky user's public profile by handle - display name, bio, follower
183
+ and post counts as clean JSON, billed per request in USD.
184
+
185
+ Price: $0.002 per request.
186
+
187
+ Example:
188
+ res = client.bluesky.profile(handle="bsky.app")
189
+ """
190
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
191
+ "bluesky.profile", dict(input), options
192
+ )
193
+ return RunResult[BlueskyProfileData].model_validate(raw)
194
+
195
+ async def user_posts(
196
+ self,
197
+ *,
198
+ options: RequestOptions | None = None,
199
+ **input: Unpack[BlueskyUserPostsInput],
200
+ ) -> RunResult[BlueskyUserPostsData]:
201
+ """Bluesky User Posts
202
+
203
+ List a Bluesky account's recent posts (text, author handle, like, reply, and
204
+ repost counts) by handle as clean JSON, normalized across providers, billed
205
+ per request in USD.
206
+
207
+ Price: $0.002 per request.
208
+
209
+ Example:
210
+ res = client.bluesky.user_posts(handle="bsky.app")
211
+ """
212
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
213
+ "bluesky.user_posts", dict(input), options
214
+ )
215
+ return RunResult[BlueskyUserPostsData].model_validate(raw)
@@ -0,0 +1,128 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the booking 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 BookingSearchInput(TypedDict, total=False):
19
+ """Input for Booking.com Search."""
20
+
21
+ checkIn: NotRequired[str]
22
+ """Check-in date in YYYY-MM-DD format (e.g. 2026-07-01). Defaults to tomorrow."""
23
+ checkOut: NotRequired[str]
24
+ """Check-out date in YYYY-MM-DD format (e.g. 2026-07-05). Defaults to the day after check-in."""
25
+ currency: NotRequired[str]
26
+ """Currency code for prices (e.g. EUR). Default: USD."""
27
+ limit: NotRequired[int]
28
+ """Maximum number of hotels to return (1-20, default 20). You are billed per result returned, so a lower limit costs less. Range: 1 to 20."""
29
+ query: Required[str]
30
+ """Destination city to search for stays in (e.g. Paris)."""
31
+
32
+
33
+ class BookingSearchData(BaseModel):
34
+ items: list[BookingSearchItem] = Field(
35
+ description="Hotel result records: name, price, review score, star rating, address, and location."
36
+ )
37
+
38
+
39
+ class BookingSearchItem(BaseModel):
40
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
41
+
42
+ address: str | None = None
43
+ city: str | None = None
44
+ country: str | None = Field(default=None, description="ISO country code.")
45
+ currency: str | None = None
46
+ id: str | None = Field(
47
+ default=None,
48
+ description="Booking.com hotel identifier. Present whenever the upstream returns this record.",
49
+ )
50
+ image: str | None = Field(
51
+ default=None,
52
+ description="Primary hotel photo URL. Present whenever the upstream returns this record.",
53
+ )
54
+ latitude: float | None = None
55
+ location: str | None = Field(
56
+ default=None, description="Neighborhood or area label."
57
+ )
58
+ longitude: float | None = None
59
+ name: str
60
+ price: float | None = Field(
61
+ default=None, description="Total stay price in the requested currency."
62
+ )
63
+ price_per_night: float | None = Field(default=None, alias="pricePerNight")
64
+ rating: float | None = Field(default=None, description="Guest review score (0-10).")
65
+ review_score: float | None = Field(
66
+ default=None, alias="reviewScore", description="Guest review score (0-10)."
67
+ )
68
+ reviews_count: int | None = Field(default=None, alias="reviewsCount")
69
+ stars: int | None = Field(default=None, description="Star rating class (1-5).")
70
+ url: str
71
+
72
+
73
+ class BookingNamespace:
74
+ """Typed methods for this platform. Attached lazily to the client."""
75
+
76
+ def __init__(self, client: "AnyAPI") -> None:
77
+ self._client = client
78
+
79
+ def search(
80
+ self,
81
+ *,
82
+ options: RequestOptions | None = None,
83
+ **input: Unpack[BookingSearchInput],
84
+ ) -> RunResult[BookingSearchData]:
85
+ """Booking.com Search
86
+
87
+ Search Booking.com stays by destination and dates and get hotel results
88
+ (name, price, review score, location) as normalized JSON with flat
89
+ per-request USD pricing.
90
+
91
+ Price: $0.002 per request plus $0.0045 per result.
92
+
93
+ Example:
94
+ res = client.booking.search(checkIn="2026-09-01", checkOut="2026-09-03", limit=3, query="New York")
95
+ """
96
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
97
+ "booking.search", dict(input), options
98
+ )
99
+ return RunResult[BookingSearchData].model_validate(raw)
100
+
101
+
102
+ class AsyncBookingNamespace:
103
+ """Typed methods for this platform. Attached lazily to the client."""
104
+
105
+ def __init__(self, client: "AsyncAnyAPI") -> None:
106
+ self._client = client
107
+
108
+ async def search(
109
+ self,
110
+ *,
111
+ options: RequestOptions | None = None,
112
+ **input: Unpack[BookingSearchInput],
113
+ ) -> RunResult[BookingSearchData]:
114
+ """Booking.com Search
115
+
116
+ Search Booking.com stays by destination and dates and get hotel results
117
+ (name, price, review score, location) as normalized JSON with flat
118
+ per-request USD pricing.
119
+
120
+ Price: $0.002 per request plus $0.0045 per result.
121
+
122
+ Example:
123
+ res = client.booking.search(checkIn="2026-09-01", checkOut="2026-09-03", limit=3, query="New York")
124
+ """
125
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
126
+ "booking.search", dict(input), options
127
+ )
128
+ return RunResult[BookingSearchData].model_validate(raw)
@@ -0,0 +1,113 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the coinmarketcap 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, 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 CoinmarketcapListingsInput(TypedDict, total=False):
19
+ """Input for CoinMarketCap Listings."""
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
+
24
+
25
+ class CoinmarketcapListingsData(BaseModel):
26
+ items: list[CoinmarketcapListingsItem] = Field(
27
+ description="Cryptocurrency listing records: rank, name, symbol, price, market cap, trading volume, and 24h price change."
28
+ )
29
+
30
+
31
+ class CoinmarketcapListingsItem(BaseModel):
32
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
33
+
34
+ ath: float | None = Field(default=None, description="All-time high.")
35
+ atl: float | None = Field(default=None, description="All-time low.")
36
+ circulating_supply: float | None = Field(default=None, alias="circulatingSupply")
37
+ high24h: float | None = None
38
+ id: str = Field(description="CoinMarketCap identifier.")
39
+ last_updated: str | None = Field(
40
+ default=None,
41
+ alias="lastUpdated",
42
+ description="Present whenever the upstream returns this record.",
43
+ )
44
+ low24h: float | None = None
45
+ market_cap: float | None = Field(default=None, alias="marketCap")
46
+ name: str
47
+ price: float | None = Field(
48
+ default=None, description="Latest price in the primary quote currency (USD)."
49
+ )
50
+ slug: str | None = Field(
51
+ default=None, description="Present whenever the upstream returns this record."
52
+ )
53
+ symbol: str
54
+ total_supply: float | None = Field(default=None, alias="totalSupply")
55
+ volume24h: float | None = Field(default=None, description="24h trading volume.")
56
+
57
+
58
+ class CoinmarketcapNamespace:
59
+ """Typed methods for this platform. Attached lazily to the client."""
60
+
61
+ def __init__(self, client: "AnyAPI") -> None:
62
+ self._client = client
63
+
64
+ def listings(
65
+ self,
66
+ *,
67
+ options: RequestOptions | None = None,
68
+ **input: Unpack[CoinmarketcapListingsInput],
69
+ ) -> RunResult[CoinmarketcapListingsData]:
70
+ """CoinMarketCap Listings
71
+
72
+ Get the current top cryptocurrencies from CoinMarketCap - rank, price,
73
+ market cap, volume, and 24h change - as normalized JSON with transparent
74
+ per-request USD pricing.
75
+
76
+ Price: $0.0018 per result.
77
+
78
+ Example:
79
+ res = client.coinmarketcap.listings(limit=5)
80
+ """
81
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
82
+ "coinmarketcap.listings", dict(input), options
83
+ )
84
+ return RunResult[CoinmarketcapListingsData].model_validate(raw)
85
+
86
+
87
+ class AsyncCoinmarketcapNamespace:
88
+ """Typed methods for this platform. Attached lazily to the client."""
89
+
90
+ def __init__(self, client: "AsyncAnyAPI") -> None:
91
+ self._client = client
92
+
93
+ async def listings(
94
+ self,
95
+ *,
96
+ options: RequestOptions | None = None,
97
+ **input: Unpack[CoinmarketcapListingsInput],
98
+ ) -> RunResult[CoinmarketcapListingsData]:
99
+ """CoinMarketCap Listings
100
+
101
+ Get the current top cryptocurrencies from CoinMarketCap - rank, price,
102
+ market cap, volume, and 24h change - as normalized JSON with transparent
103
+ per-request USD pricing.
104
+
105
+ Price: $0.0018 per result.
106
+
107
+ Example:
108
+ res = client.coinmarketcap.listings(limit=5)
109
+ """
110
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
111
+ "coinmarketcap.listings", dict(input), options
112
+ )
113
+ return RunResult[CoinmarketcapListingsData].model_validate(raw)
@@ -0,0 +1,106 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the congress 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, 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 CongressTradesInput(TypedDict, total=False):
19
+ """Input for Congress Stock Trades."""
20
+
21
+ endDate: NotRequired[str]
22
+ """Latest transaction date to include, inclusive, in YYYY-MM-DD format (e.g. 2026-06-01)."""
23
+ firstName: NotRequired[str]
24
+ """Filter by the congressional member's first name, case-insensitive partial match (e.g. Nancy)."""
25
+ lastName: NotRequired[str]
26
+ """Filter by the congressional member's last name, case-insensitive partial match (e.g. Pelosi)."""
27
+ limit: NotRequired[int]
28
+ """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."""
29
+ startDate: NotRequired[str]
30
+ """Earliest transaction date to include, inclusive, in YYYY-MM-DD format (e.g. 2026-01-01)."""
31
+ ticker: NotRequired[str]
32
+ """Filter to transactions involving this stock ticker symbol (e.g. NVDA)."""
33
+
34
+
35
+ class CongressTradesData(BaseModel):
36
+ items: list[CongressTradesItem] = Field(
37
+ description="Disclosure records: member name and chamber, stock ticker, transaction type, amount range, and transaction/report dates."
38
+ )
39
+
40
+
41
+ class CongressTradesItem(BaseModel):
42
+ model_config = ConfigDict(extra="allow")
43
+
44
+ id: str
45
+ name: str | None = Field(
46
+ default=None, description="Present whenever the upstream returns this record."
47
+ )
48
+ symbol: str
49
+
50
+
51
+ class CongressNamespace:
52
+ """Typed methods for this platform. Attached lazily to the client."""
53
+
54
+ def __init__(self, client: "AnyAPI") -> None:
55
+ self._client = client
56
+
57
+ def trades(
58
+ self,
59
+ *,
60
+ options: RequestOptions | None = None,
61
+ **input: Unpack[CongressTradesInput],
62
+ ) -> RunResult[CongressTradesData]:
63
+ """Congress Stock Trades
64
+
65
+ Get US Congress members' financial disclosures and stock trades - member,
66
+ ticker, transaction type, amount range, and dates - filterable by member,
67
+ ticker, or date range, billed per request in USD.
68
+
69
+ Price: $0.001 per request plus $0.0019 per result.
70
+
71
+ Example:
72
+ res = client.congress.trades(limit=5)
73
+ """
74
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
75
+ "congress.trades", dict(input), options
76
+ )
77
+ return RunResult[CongressTradesData].model_validate(raw)
78
+
79
+
80
+ class AsyncCongressNamespace:
81
+ """Typed methods for this platform. Attached lazily to the client."""
82
+
83
+ def __init__(self, client: "AsyncAnyAPI") -> None:
84
+ self._client = client
85
+
86
+ async def trades(
87
+ self,
88
+ *,
89
+ options: RequestOptions | None = None,
90
+ **input: Unpack[CongressTradesInput],
91
+ ) -> RunResult[CongressTradesData]:
92
+ """Congress Stock Trades
93
+
94
+ Get US Congress members' financial disclosures and stock trades - member,
95
+ ticker, transaction type, amount range, and dates - filterable by member,
96
+ ticker, or date range, billed per request in USD.
97
+
98
+ Price: $0.001 per request plus $0.0019 per result.
99
+
100
+ Example:
101
+ res = client.congress.trades(limit=5)
102
+ """
103
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
104
+ "congress.trades", dict(input), options
105
+ )
106
+ return RunResult[CongressTradesData].model_validate(raw)
@@ -0,0 +1,104 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the dexscreener 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 DexscreenerTokensInput(TypedDict, total=False):
19
+ """Input for DEX Screener Tokens."""
20
+
21
+ chain: Required[str]
22
+ """Blockchain network to list tokens for, optionally scoped to a DEX as chain/dex (e.g. solana or ethereum/uniswap)."""
23
+ limit: NotRequired[int]
24
+ """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."""
25
+ order: NotRequired[str]
26
+ """Sort direction: desc or asc (e.g. desc)."""
27
+ rankBy: NotRequired[str]
28
+ """Field to sort tokens by (e.g. volume, txns, liquidity, marketCap, trendingScoreH24)."""
29
+ timeframe: NotRequired[str]
30
+ """Stats timeframe: 24h, 6h, 1h, or 5m (e.g. 24h). Default: 24h."""
31
+
32
+
33
+ class DexscreenerTokensData(BaseModel):
34
+ items: list[DexscreenerTokensItem] = Field(
35
+ description="Token listing records: token name and symbol, pair, price, liquidity, volume, transaction counts, and price change."
36
+ )
37
+
38
+
39
+ class DexscreenerTokensItem(BaseModel):
40
+ model_config = ConfigDict(extra="allow")
41
+
42
+ name: str | None = Field(
43
+ default=None, description="Present whenever the upstream returns this record."
44
+ )
45
+ price: float
46
+ symbol: str
47
+
48
+
49
+ class DexscreenerNamespace:
50
+ """Typed methods for this platform. Attached lazily to the client."""
51
+
52
+ def __init__(self, client: "AnyAPI") -> None:
53
+ self._client = client
54
+
55
+ def tokens(
56
+ self,
57
+ *,
58
+ options: RequestOptions | None = None,
59
+ **input: Unpack[DexscreenerTokensInput],
60
+ ) -> RunResult[DexscreenerTokensData]:
61
+ """DEX Screener Tokens
62
+
63
+ List trending tokens on any blockchain from DEX Screener - price, liquidity,
64
+ volume, transactions, and market cap - sorted how you want, as normalized
65
+ JSON with transparent per-request USD pricing.
66
+
67
+ Price: $0.02 per request plus $0.0015 per result.
68
+
69
+ Example:
70
+ res = client.dexscreener.tokens(chain="solana", limit=5)
71
+ """
72
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
73
+ "dexscreener.tokens", dict(input), options
74
+ )
75
+ return RunResult[DexscreenerTokensData].model_validate(raw)
76
+
77
+
78
+ class AsyncDexscreenerNamespace:
79
+ """Typed methods for this platform. Attached lazily to the client."""
80
+
81
+ def __init__(self, client: "AsyncAnyAPI") -> None:
82
+ self._client = client
83
+
84
+ async def tokens(
85
+ self,
86
+ *,
87
+ options: RequestOptions | None = None,
88
+ **input: Unpack[DexscreenerTokensInput],
89
+ ) -> RunResult[DexscreenerTokensData]:
90
+ """DEX Screener Tokens
91
+
92
+ List trending tokens on any blockchain from DEX Screener - price, liquidity,
93
+ volume, transactions, and market cap - sorted how you want, as normalized
94
+ JSON with transparent per-request USD pricing.
95
+
96
+ Price: $0.02 per request plus $0.0015 per result.
97
+
98
+ Example:
99
+ res = client.dexscreener.tokens(chain="solana", limit=5)
100
+ """
101
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
102
+ "dexscreener.tokens", dict(input), options
103
+ )
104
+ return RunResult[DexscreenerTokensData].model_validate(raw)