getanyapi 0.45.0__tar.gz → 0.46.0__tar.gz
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-0.45.0 → getanyapi-0.46.0}/PKG-INFO +1 -1
- {getanyapi-0.45.0 → getanyapi-0.46.0}/pyproject.toml +1 -1
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/__init__.py +1 -1
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/google.py +3 -3
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/instagram.py +3 -3
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/maps.py +190 -1
- {getanyapi-0.45.0 → getanyapi-0.46.0}/.gitignore +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/README.md +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/_account.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/_async_client.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/_client.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/_errors.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/_idempotency.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/_pagination.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/_transport.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/discovery_types.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/__init__.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/ahrefs.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/airbnb.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/alibaba.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/amazon.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/apollo.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/appstore.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/bluesky.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/booking.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/capterra.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/chatgpt.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/coinmarketcap.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/company.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/company_enrichment.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/company_search.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/congress.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/dexscreener.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/douyin.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/ebay.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/email.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/email_finding.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/email_verification.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/facebook.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/fiverr.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/g2.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/gemini.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/github.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/glassdoor.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/google_ads.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/google_finance.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/google_shopping.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/hackernews.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/indeed.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/job_search.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/linkedin.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/mobile_phone.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/naver.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/nextdoor.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/people_search.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/perplexity.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/person.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/person_enrichment.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/pinterest.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/playstore.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/polymarket.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/realtor.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/reddit.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/redfin.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/rednote.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/sec.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/semrush.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/seo.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/snapchat.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/social.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/spotify.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/substack.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/technographics.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/threads.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/tiktok.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/tiktok_shop.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/tripadvisor.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/trustpilot.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/truthsocial.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/twitter.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/upwork.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/walmart.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/web.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/weibo.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/yahoo_finance.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/yelp.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/youtube.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/zhihu.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/platforms/zillow.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/py.typed +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/src/getanyapi/types.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/conftest.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_account.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_client.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_durable_requests.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_envelope.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_errors.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_fixture_roundtrip.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_fixture_sweep.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_pagination.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/tests/test_transport.py +0 -0
- {getanyapi-0.45.0 → getanyapi-0.46.0}/uv.lock +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: getanyapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.46.0
|
|
4
4
|
Summary: Official typed Python SDK for AnyAPI: any API, one wallet, USD, no subscriptions.
|
|
5
5
|
Project-URL: Homepage, https://getanyapi.com
|
|
6
6
|
Project-URL: Documentation, https://getanyapi.com/docs
|
|
@@ -133,7 +133,7 @@ class GoogleSearchInput(TypedDict, total=False):
|
|
|
133
133
|
limit: NotRequired[int]
|
|
134
134
|
"""Maximum number of organic results to return in this response. Google stopped honoring bulk result counts in September 2025, so one page is about 10 results and a limit above 10 is accepted but will not return more than that. To go deeper, either page through with cursor (about 10 results per call, each billed as a request) or use google.search_100, which returns up to 100 ranked results in a single call for one flat charge and is cheaper past roughly 20 results. Price is flat per request. Range: 1 to 100. Default: 10."""
|
|
135
135
|
location: NotRequired[str]
|
|
136
|
-
"""Fine-grained location
|
|
136
|
+
"""Fine-grained location to localize results to, more specific than the country-level gl. Must exactly match an Active Canonical Name from Google's geo-target list, which uses no space after each comma: 'New York,New York,United States', 'Austin,Texas,United States', 'London,England,United Kingdom'. A value that does not match is rejected rather than quietly searched from somewhere else."""
|
|
137
137
|
preferLatencyUnderMs: NotRequired[int]
|
|
138
138
|
"""Optional; omit it and routing is unchanged, with the cheapest source serving. Prefer sources whose typical response time (median over the trailing 30 days, as published on this endpoint's lane health) is under this many milliseconds; among those, the cheapest serves. This can raise your price: when the cheapest source misses the target, a faster and dearer one serves, and you are quoted and charged its price. If no source is that fast the request is still served, by whichever source offers the best speed for its price - it is never refused for being slow. Sources we have not timed are tried last. This is a preference, not a guarantee: the median describes past requests and is not a ceiling on this one, and it excludes any wait this request itself asks for. On a paginated walk it applies to the first page only: later pages stay with the source that page chose, at the price it was quoted. Minimum: 1."""
|
|
139
139
|
query: Required[str]
|
|
@@ -705,7 +705,7 @@ class GoogleNamespace:
|
|
|
705
705
|
as cursor to walk further, or use google.search_100 for up to 100 ranked
|
|
706
706
|
results in one call, which is cheaper past roughly 20 results.
|
|
707
707
|
|
|
708
|
-
Price: $0.
|
|
708
|
+
Price: $0.0004 per request.
|
|
709
709
|
|
|
710
710
|
Example:
|
|
711
711
|
res = client.google.search(gl="us", hl="en", limit=10, query="best coffee maker")
|
|
@@ -970,7 +970,7 @@ class AsyncGoogleNamespace:
|
|
|
970
970
|
as cursor to walk further, or use google.search_100 for up to 100 ranked
|
|
971
971
|
results in one call, which is cheaper past roughly 20 results.
|
|
972
972
|
|
|
973
|
-
Price: $0.
|
|
973
|
+
Price: $0.0004 per request.
|
|
974
974
|
|
|
975
975
|
Example:
|
|
976
976
|
res = client.google.search(gl="us", hl="en", limit=10, query="best coffee maker")
|
|
@@ -1245,7 +1245,7 @@ class InstagramReelTranscriptItem(BaseModel):
|
|
|
1245
1245
|
)
|
|
1246
1246
|
segments: list[InstagramReelTranscriptSegment] | None = Field(
|
|
1247
1247
|
default=None,
|
|
1248
|
-
description="Time-aligned transcript segments, each with its text, speaker label, and start/end offsets in seconds. Empty when the reel has no detectable spoken audio.",
|
|
1248
|
+
description="Time-aligned transcript segments in playback order, one per sentence, each with its text, speaker label, and start/end offsets in seconds. A segment starts when its first word is spoken and ends when its last one finishes. Empty when the reel has no detectable spoken audio.",
|
|
1249
1249
|
)
|
|
1250
1250
|
shortcode: str | None = Field(
|
|
1251
1251
|
default=None,
|
|
@@ -2567,7 +2567,7 @@ class InstagramNamespace:
|
|
|
2567
2567
|
Fetch an Instagram account's public profile (followers, posts, bio,
|
|
2568
2568
|
verification) by handle.
|
|
2569
2569
|
|
|
2570
|
-
Price: $0.
|
|
2570
|
+
Price: $0.0005 per request.
|
|
2571
2571
|
|
|
2572
2572
|
Example:
|
|
2573
2573
|
res = client.instagram.profile(handle="nasa")
|
|
@@ -3594,7 +3594,7 @@ class AsyncInstagramNamespace:
|
|
|
3594
3594
|
Fetch an Instagram account's public profile (followers, posts, bio,
|
|
3595
3595
|
verification) by handle.
|
|
3596
3596
|
|
|
3597
|
-
Price: $0.
|
|
3597
|
+
Price: $0.0005 per request.
|
|
3598
3598
|
|
|
3599
3599
|
Example:
|
|
3600
3600
|
res = client.instagram.profile(handle="nasa")
|
|
@@ -3,12 +3,18 @@
|
|
|
3
3
|
|
|
4
4
|
from __future__ import annotations
|
|
5
5
|
|
|
6
|
-
from typing import Literal, TYPE_CHECKING
|
|
6
|
+
from typing import Any, Literal, TYPE_CHECKING
|
|
7
7
|
|
|
8
8
|
from pydantic import BaseModel, ConfigDict, Field
|
|
9
9
|
from typing_extensions import NotRequired, Required, TypedDict, Unpack
|
|
10
10
|
|
|
11
11
|
from ..types import RequestOptions, RunResult
|
|
12
|
+
from .._pagination import (
|
|
13
|
+
AsyncPaginator,
|
|
14
|
+
Paginator,
|
|
15
|
+
apaginate,
|
|
16
|
+
paginate,
|
|
17
|
+
)
|
|
12
18
|
|
|
13
19
|
if TYPE_CHECKING:
|
|
14
20
|
from .._async_client import AsyncAnyAPI
|
|
@@ -167,6 +173,25 @@ class MapsSearchInput(TypedDict, total=False):
|
|
|
167
173
|
"""Filter places by whether they list a website: allPlaces (default), withWebsite (only places that have a website), or withoutWebsite (only places without one). Omit this field, or send allPlaces, to stay on the cheapest price; withWebsite and withoutWebsite route to a dearer source."""
|
|
168
174
|
|
|
169
175
|
|
|
176
|
+
class MapsSearchNearbyInput(TypedDict, total=False):
|
|
177
|
+
"""Input for Google Maps Nearby Search."""
|
|
178
|
+
|
|
179
|
+
coordinates: Required[dict[str, Any]]
|
|
180
|
+
"""The exact map centre to search around. Use maps.search instead if you only have a place name."""
|
|
181
|
+
cursor: NotRequired[str | None]
|
|
182
|
+
"""Opaque cursor from a previous response's nextCursor. Pass it back to get the next page of places."""
|
|
183
|
+
language: NotRequired[str]
|
|
184
|
+
"""Two-letter language code for the results (e.g. en). Default: en."""
|
|
185
|
+
limit: NotRequired[int]
|
|
186
|
+
"""Maximum number of places to return in this response (1-20). Google Maps returns one viewport of about 20 places per call; page with cursor for more. Price is flat per request. Range: 1 to 20. Default: 20."""
|
|
187
|
+
preferLatencyUnderMs: NotRequired[int]
|
|
188
|
+
"""Optional; omit it and routing is unchanged, with the cheapest source serving. Prefer sources whose typical response time (median over the trailing 30 days, as published on this endpoint's lane health) is under this many milliseconds; among those, the cheapest serves. This can raise your price: when the cheapest source misses the target, a faster and dearer one serves, and you are quoted and charged its price. If no source is that fast the request is still served, by whichever source offers the best speed for its price - it is never refused for being slow. Sources we have not timed are tried last. This is a preference, not a guarantee: the median describes past requests and is not a ceiling on this one, and it excludes any wait this request itself asks for. On a paginated walk it applies to the first page only: later pages stay with the source that page chose, at the price it was quoted. Minimum: 1."""
|
|
189
|
+
query: Required[str]
|
|
190
|
+
"""What you would type in the Google Maps search bar (e.g. coffee shop)."""
|
|
191
|
+
zoom: NotRequired[float]
|
|
192
|
+
"""Google Maps viewport zoom. Lower covers a wider area, higher focuses more tightly around the coordinates. Range: 3 to 21. Default: 13.1."""
|
|
193
|
+
|
|
194
|
+
|
|
170
195
|
class MapsContactsData(BaseModel):
|
|
171
196
|
items: list[MapsContactsItem] = Field(
|
|
172
197
|
description="Matching business records, each enriched with contact details scraped from the business website. Populated whenever the provider has data for the entity."
|
|
@@ -474,6 +499,76 @@ class MapsSearchItem(BaseModel):
|
|
|
474
499
|
)
|
|
475
500
|
|
|
476
501
|
|
|
502
|
+
class MapsSearchNearbyData(BaseModel):
|
|
503
|
+
model_config = ConfigDict(populate_by_name=True)
|
|
504
|
+
|
|
505
|
+
items: list[MapsSearchNearbyItem] = Field(
|
|
506
|
+
description="Matching Google Maps place records, nearest the requested coordinates first. Populated whenever the provider has data for the entity."
|
|
507
|
+
)
|
|
508
|
+
next_cursor: str | None = Field(
|
|
509
|
+
default=None,
|
|
510
|
+
alias="nextCursor",
|
|
511
|
+
description="Opaque cursor for the next page of places, or null when this search is complete. Pass it back as cursor to continue.",
|
|
512
|
+
)
|
|
513
|
+
|
|
514
|
+
|
|
515
|
+
class MapsSearchNearbyItem(BaseModel):
|
|
516
|
+
model_config = ConfigDict(extra="allow", populate_by_name=True)
|
|
517
|
+
|
|
518
|
+
address: str | None = Field(
|
|
519
|
+
default=None, description="Full formatted street address."
|
|
520
|
+
)
|
|
521
|
+
category: str | None = Field(
|
|
522
|
+
default=None, description="Primary place category (e.g. Coffee shop)."
|
|
523
|
+
)
|
|
524
|
+
cid: str | None = Field(default=None, description="Google customer/place id (cid).")
|
|
525
|
+
city: str | None = Field(default=None, description="City the place is in.")
|
|
526
|
+
country_code: str | None = Field(
|
|
527
|
+
default=None, alias="countryCode", description="Two-letter country code."
|
|
528
|
+
)
|
|
529
|
+
image: str | None = Field(
|
|
530
|
+
default=None, description="Thumbnail photo URL for the place."
|
|
531
|
+
)
|
|
532
|
+
latitude: float | None = Field(
|
|
533
|
+
default=None, description="Latitude of the place in decimal degrees."
|
|
534
|
+
)
|
|
535
|
+
longitude: float | None = Field(
|
|
536
|
+
default=None, description="Longitude of the place in decimal degrees."
|
|
537
|
+
)
|
|
538
|
+
name: str = Field(
|
|
539
|
+
description="Place name. Populated whenever the provider has data for the entity."
|
|
540
|
+
)
|
|
541
|
+
phone: str | None = Field(
|
|
542
|
+
default=None, description="Business phone number, when listed."
|
|
543
|
+
)
|
|
544
|
+
place_id: str = Field(
|
|
545
|
+
alias="placeId",
|
|
546
|
+
description="Google Maps place id (stable identifier for the place). Populated whenever the provider has data for the entity.",
|
|
547
|
+
)
|
|
548
|
+
postal_code: str | None = Field(
|
|
549
|
+
default=None, alias="postalCode", description="Postal code of the place."
|
|
550
|
+
)
|
|
551
|
+
rating: float | None = Field(
|
|
552
|
+
default=None, description="Average Google rating out of 5."
|
|
553
|
+
)
|
|
554
|
+
review_count: int | None = Field(
|
|
555
|
+
default=None,
|
|
556
|
+
alias="reviewCount",
|
|
557
|
+
description="Number of Google reviews the place has.",
|
|
558
|
+
)
|
|
559
|
+
state: str | None = Field(
|
|
560
|
+
default=None,
|
|
561
|
+
description="State or region the place is in, spelled in full (e.g. Texas).",
|
|
562
|
+
)
|
|
563
|
+
street: str | None = Field(default=None, description="Street line of the address.")
|
|
564
|
+
url: str = Field(
|
|
565
|
+
description="Canonical Google Maps URL for the place. Populated whenever the provider has data for the entity."
|
|
566
|
+
)
|
|
567
|
+
website: str | None = Field(
|
|
568
|
+
default=None, description="The place's own website URL, when listed."
|
|
569
|
+
)
|
|
570
|
+
|
|
571
|
+
|
|
477
572
|
class MapsNamespace:
|
|
478
573
|
"""Typed methods for this platform. Attached lazily to the client."""
|
|
479
574
|
|
|
@@ -561,6 +656,53 @@ class MapsNamespace:
|
|
|
561
656
|
)
|
|
562
657
|
return RunResult[MapsSearchData].model_validate(raw)
|
|
563
658
|
|
|
659
|
+
def search_nearby(
|
|
660
|
+
self,
|
|
661
|
+
*,
|
|
662
|
+
options: RequestOptions | None = None,
|
|
663
|
+
**input: Unpack[MapsSearchNearbyInput],
|
|
664
|
+
) -> RunResult[MapsSearchNearbyData]:
|
|
665
|
+
"""Google Maps Nearby Search
|
|
666
|
+
|
|
667
|
+
Search Google Maps around an exact latitude and longitude and get up to 20
|
|
668
|
+
normalized places per call, each with the address broken into street, city,
|
|
669
|
+
state, postal code and country. Use this when you have coordinates and want
|
|
670
|
+
the map viewport centred on them; use maps.search when you only have a place
|
|
671
|
+
name. Pass the returned nextCursor back as cursor for the next 20 places.
|
|
672
|
+
|
|
673
|
+
Price: $0.0013 per request.
|
|
674
|
+
|
|
675
|
+
Example:
|
|
676
|
+
res = client.maps.search_nearby(coordinates={"latitude": 30.2672, "longitude": -97.7431}, limit=20, query="coffee shop")
|
|
677
|
+
"""
|
|
678
|
+
raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
|
|
679
|
+
"maps.search_nearby", dict(input), options
|
|
680
|
+
)
|
|
681
|
+
return RunResult[MapsSearchNearbyData].model_validate(raw)
|
|
682
|
+
|
|
683
|
+
def iter_search_nearby(
|
|
684
|
+
self,
|
|
685
|
+
*,
|
|
686
|
+
options: RequestOptions | None = None,
|
|
687
|
+
**input: Unpack[MapsSearchNearbyInput],
|
|
688
|
+
) -> Paginator[MapsSearchNearbyItem, MapsSearchNearbyData]:
|
|
689
|
+
"""Iterate Google Maps Nearby Search results, following pagination cursors.
|
|
690
|
+
|
|
691
|
+
Yields validated `MapsSearchNearbyItem` items from the `items` field of
|
|
692
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
693
|
+
`RunResult` pages.
|
|
694
|
+
"""
|
|
695
|
+
return paginate(
|
|
696
|
+
self._client,
|
|
697
|
+
"maps.search_nearby",
|
|
698
|
+
dict(input),
|
|
699
|
+
"items",
|
|
700
|
+
item_model=MapsSearchNearbyItem,
|
|
701
|
+
data_model=MapsSearchNearbyData,
|
|
702
|
+
bare=False,
|
|
703
|
+
options=options,
|
|
704
|
+
)
|
|
705
|
+
|
|
564
706
|
|
|
565
707
|
class AsyncMapsNamespace:
|
|
566
708
|
"""Typed methods for this platform. Attached lazily to the client."""
|
|
@@ -648,3 +790,50 @@ class AsyncMapsNamespace:
|
|
|
648
790
|
"maps.search", dict(input), options
|
|
649
791
|
)
|
|
650
792
|
return RunResult[MapsSearchData].model_validate(raw)
|
|
793
|
+
|
|
794
|
+
async def search_nearby(
|
|
795
|
+
self,
|
|
796
|
+
*,
|
|
797
|
+
options: RequestOptions | None = None,
|
|
798
|
+
**input: Unpack[MapsSearchNearbyInput],
|
|
799
|
+
) -> RunResult[MapsSearchNearbyData]:
|
|
800
|
+
"""Google Maps Nearby Search
|
|
801
|
+
|
|
802
|
+
Search Google Maps around an exact latitude and longitude and get up to 20
|
|
803
|
+
normalized places per call, each with the address broken into street, city,
|
|
804
|
+
state, postal code and country. Use this when you have coordinates and want
|
|
805
|
+
the map viewport centred on them; use maps.search when you only have a place
|
|
806
|
+
name. Pass the returned nextCursor back as cursor for the next 20 places.
|
|
807
|
+
|
|
808
|
+
Price: $0.0013 per request.
|
|
809
|
+
|
|
810
|
+
Example:
|
|
811
|
+
res = client.maps.search_nearby(coordinates={"latitude": 30.2672, "longitude": -97.7431}, limit=20, query="coffee shop")
|
|
812
|
+
"""
|
|
813
|
+
raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
|
|
814
|
+
"maps.search_nearby", dict(input), options
|
|
815
|
+
)
|
|
816
|
+
return RunResult[MapsSearchNearbyData].model_validate(raw)
|
|
817
|
+
|
|
818
|
+
def iter_search_nearby(
|
|
819
|
+
self,
|
|
820
|
+
*,
|
|
821
|
+
options: RequestOptions | None = None,
|
|
822
|
+
**input: Unpack[MapsSearchNearbyInput],
|
|
823
|
+
) -> AsyncPaginator[MapsSearchNearbyItem, MapsSearchNearbyData]:
|
|
824
|
+
"""Iterate Google Maps Nearby Search results, following pagination cursors.
|
|
825
|
+
|
|
826
|
+
Yields validated `MapsSearchNearbyItem` items from the `items` field of
|
|
827
|
+
each page. Use `.pages()` on the returned paginator to walk whole
|
|
828
|
+
`RunResult` pages.
|
|
829
|
+
"""
|
|
830
|
+
return apaginate(
|
|
831
|
+
self._client,
|
|
832
|
+
"maps.search_nearby",
|
|
833
|
+
dict(input),
|
|
834
|
+
"items",
|
|
835
|
+
item_model=MapsSearchNearbyItem,
|
|
836
|
+
data_model=MapsSearchNearbyData,
|
|
837
|
+
bare=False,
|
|
838
|
+
options=options,
|
|
839
|
+
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|