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,141 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the yelp 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 YelpSearchInput(TypedDict, total=False):
19
+ """Input for Yelp Search."""
20
+
21
+ limit: NotRequired[int]
22
+ """Maximum number of results to return (1 to 20, default 20). Range: 1 to 20."""
23
+ location: Required[str]
24
+ """City and state defining the search area (e.g. San Francisco, CA)."""
25
+ query: Required[str]
26
+ """Search term or category to look for (e.g. sushi)."""
27
+
28
+
29
+ class YelpSearchData(BaseModel):
30
+ items: list[YelpSearchItem] = Field(
31
+ description="Business listing records: name, categories, rating, review count, address, and core business info."
32
+ )
33
+
34
+
35
+ class YelpSearchItem(BaseModel):
36
+ model_config = ConfigDict(extra="allow")
37
+
38
+ address1: str | None = Field(
39
+ default=None, description="Primary street address line."
40
+ )
41
+ address2: str | None = Field(default=None, description="Secondary address line.")
42
+ address3: str | None = Field(default=None, description="Tertiary address line.")
43
+ alias: str = Field(description="URL slug for the business.")
44
+ avg_rating: float | None = Field(
45
+ default=None, description="Rounded average star rating."
46
+ )
47
+ categories: list[YelpSearchCategorie] | None = Field(
48
+ default=None, description="Business category tags."
49
+ )
50
+ city: str | None = Field(default=None, description="City name.")
51
+ country: str | None = Field(default=None, description="ISO country code.")
52
+ dialable_phone: str | None = Field(
53
+ default=None, description="Dialable phone number."
54
+ )
55
+ id: str = Field(description="Stable Yelp business identifier.")
56
+ is_closed: bool | None = Field(
57
+ default=None, description="Whether the business is permanently closed."
58
+ )
59
+ latitude: float | None = Field(
60
+ default=None, description="Latitude of the business."
61
+ )
62
+ localized_phone: str | None = Field(
63
+ default=None, description="Formatted local phone number."
64
+ )
65
+ localized_price: str | None = Field(
66
+ default=None, description="Localized price tier (e.g. $$)."
67
+ )
68
+ longitude: float | None = Field(
69
+ default=None, description="Longitude of the business."
70
+ )
71
+ name: str = Field(description="Business display name.")
72
+ neighborhoods: list[str] | None = Field(
73
+ default=None, description="Neighborhood labels for the location."
74
+ )
75
+ phone: str | None = Field(default=None, description="Raw phone number.")
76
+ photo_count: int | None = Field(default=None, description="Total photo count.")
77
+ photo_url: str | None = Field(
78
+ default=None,
79
+ description="Primary photo URL. Present whenever the upstream returns this record.",
80
+ )
81
+ price: int | None = Field(default=None, description="Numeric price tier.")
82
+ review_count: int | None = Field(default=None, description="Number of reviews.")
83
+ state: str | None = Field(default=None, description="State or region code.")
84
+ unrounded_avg_rating: float | None = Field(
85
+ default=None, description="Unrounded average star rating."
86
+ )
87
+ zip: str | None = Field(default=None, description="Postal code.")
88
+
89
+
90
+ class YelpSearchCategorie(BaseModel):
91
+ model_config = ConfigDict(extra="allow")
92
+
93
+
94
+ class YelpNamespace:
95
+ """Typed methods for this platform. Attached lazily to the client."""
96
+
97
+ def __init__(self, client: "AnyAPI") -> None:
98
+ self._client = client
99
+
100
+ def search(
101
+ self, *, options: RequestOptions | None = None, **input: Unpack[YelpSearchInput]
102
+ ) -> RunResult[YelpSearchData]:
103
+ """Yelp Search
104
+
105
+ Search Yelp for businesses by keyword and location: up to 20 listings with
106
+ ratings, categories, and core business info per flat-priced request.
107
+
108
+ Price: $0.04 per request plus $0.00075 per result.
109
+
110
+ Example:
111
+ res = client.yelp.search(limit=5, location="Chicago, IL", query="pizza")
112
+ """
113
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
114
+ "yelp.search", dict(input), options
115
+ )
116
+ return RunResult[YelpSearchData].model_validate(raw)
117
+
118
+
119
+ class AsyncYelpNamespace:
120
+ """Typed methods for this platform. Attached lazily to the client."""
121
+
122
+ def __init__(self, client: "AsyncAnyAPI") -> None:
123
+ self._client = client
124
+
125
+ async def search(
126
+ self, *, options: RequestOptions | None = None, **input: Unpack[YelpSearchInput]
127
+ ) -> RunResult[YelpSearchData]:
128
+ """Yelp Search
129
+
130
+ Search Yelp for businesses by keyword and location: up to 20 listings with
131
+ ratings, categories, and core business info per flat-priced request.
132
+
133
+ Price: $0.04 per request plus $0.00075 per result.
134
+
135
+ Example:
136
+ res = client.yelp.search(limit=5, location="Chicago, IL", query="pizza")
137
+ """
138
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
139
+ "yelp.search", dict(input), options
140
+ )
141
+ return RunResult[YelpSearchData].model_validate(raw)