getanyapi 0.79.0__tar.gz → 0.80.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.
Files changed (108) hide show
  1. {getanyapi-0.79.0 → getanyapi-0.80.0}/PKG-INFO +1 -1
  2. {getanyapi-0.79.0 → getanyapi-0.80.0}/pyproject.toml +1 -1
  3. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/__init__.py +1 -1
  4. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/__init__.py +2 -0
  5. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/google.py +1 -1
  6. getanyapi-0.80.0/src/getanyapi/platforms/pexels.py +207 -0
  7. getanyapi-0.80.0/src/getanyapi/platforms/unsplash.py +247 -0
  8. {getanyapi-0.79.0 → getanyapi-0.80.0}/.gitignore +0 -0
  9. {getanyapi-0.79.0 → getanyapi-0.80.0}/README.md +0 -0
  10. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/_account.py +0 -0
  11. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/_async_client.py +0 -0
  12. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/_client.py +0 -0
  13. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/_errors.py +0 -0
  14. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/_idempotency.py +0 -0
  15. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/_pagination.py +0 -0
  16. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/_transport.py +0 -0
  17. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/discovery_types.py +0 -0
  18. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/ahrefs.py +0 -0
  19. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/airbnb.py +0 -0
  20. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/alibaba.py +0 -0
  21. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/amazon.py +0 -0
  22. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/apollo.py +0 -0
  23. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/appstore.py +0 -0
  24. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/bluesky.py +0 -0
  25. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/booking.py +0 -0
  26. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/capterra.py +0 -0
  27. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/chatgpt.py +0 -0
  28. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/coinmarketcap.py +0 -0
  29. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/company.py +0 -0
  30. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/company_enrichment.py +0 -0
  31. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/company_identify.py +0 -0
  32. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/company_search.py +0 -0
  33. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/congress.py +0 -0
  34. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/contact_enrichment.py +0 -0
  35. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/douyin.py +0 -0
  36. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/ebay.py +0 -0
  37. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/email.py +0 -0
  38. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/email_finding.py +0 -0
  39. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/email_verification.py +0 -0
  40. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/facebook.py +0 -0
  41. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/fiverr.py +0 -0
  42. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/g2.py +0 -0
  43. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/gemini.py +0 -0
  44. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/github.py +0 -0
  45. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/glassdoor.py +0 -0
  46. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/google_ads.py +0 -0
  47. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/google_finance.py +0 -0
  48. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/google_shopping.py +0 -0
  49. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/hackernews.py +0 -0
  50. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/indeed.py +0 -0
  51. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/instagram.py +0 -0
  52. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/job_search.py +0 -0
  53. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/linkedin.py +0 -0
  54. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/maps.py +0 -0
  55. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/mobile_phone.py +0 -0
  56. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/naver.py +0 -0
  57. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/nextdoor.py +0 -0
  58. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/people_search.py +0 -0
  59. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/perplexity.py +0 -0
  60. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/person.py +0 -0
  61. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/person_enrichment.py +0 -0
  62. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/pinterest.py +0 -0
  63. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/playstore.py +0 -0
  64. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/polymarket.py +0 -0
  65. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/property_records.py +0 -0
  66. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/realtor.py +0 -0
  67. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/reddit.py +0 -0
  68. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/redfin.py +0 -0
  69. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/rednote.py +0 -0
  70. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/sec.py +0 -0
  71. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/semrush.py +0 -0
  72. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/seo.py +0 -0
  73. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/similarweb.py +0 -0
  74. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/snapchat.py +0 -0
  75. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/social.py +0 -0
  76. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/spotify.py +0 -0
  77. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/substack.py +0 -0
  78. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/technographics.py +0 -0
  79. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/threads.py +0 -0
  80. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/tiktok.py +0 -0
  81. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/tiktok_shop.py +0 -0
  82. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/tripadvisor.py +0 -0
  83. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/trustpilot.py +0 -0
  84. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/truthsocial.py +0 -0
  85. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/twitter.py +0 -0
  86. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/upwork.py +0 -0
  87. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/walmart.py +0 -0
  88. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/web.py +0 -0
  89. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/weibo.py +0 -0
  90. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/yahoo_finance.py +0 -0
  91. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/yelp.py +0 -0
  92. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/youtube.py +0 -0
  93. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/zhihu.py +0 -0
  94. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/platforms/zillow.py +0 -0
  95. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/py.typed +0 -0
  96. {getanyapi-0.79.0 → getanyapi-0.80.0}/src/getanyapi/types.py +0 -0
  97. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/conftest.py +0 -0
  98. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_account.py +0 -0
  99. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_client.py +0 -0
  100. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_durable_requests.py +0 -0
  101. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_envelope.py +0 -0
  102. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_errors.py +0 -0
  103. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_fixture_roundtrip.py +0 -0
  104. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_fixture_sweep.py +0 -0
  105. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_not_found_reason.py +0 -0
  106. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_pagination.py +0 -0
  107. {getanyapi-0.79.0 → getanyapi-0.80.0}/tests/test_transport.py +0 -0
  108. {getanyapi-0.79.0 → getanyapi-0.80.0}/uv.lock +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: getanyapi
3
- Version: 0.79.0
3
+ Version: 0.80.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
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "getanyapi"
7
- version = "0.79.0"
7
+ version = "0.80.0"
8
8
  description = "Official typed Python SDK for AnyAPI: any API, one wallet, USD, no subscriptions."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -55,7 +55,7 @@ from .types import (
55
55
  unwrap,
56
56
  )
57
57
 
58
- __version__ = "0.79.0"
58
+ __version__ = "0.80.0"
59
59
 
60
60
  __all__ = [
61
61
  # clients + top-level functions
@@ -102,6 +102,7 @@ REGISTRY: dict[str, tuple[str, str, str]] = {
102
102
  "PersonEnrichmentNamespace",
103
103
  "AsyncPersonEnrichmentNamespace",
104
104
  ),
105
+ "pexels": ("pexels", "PexelsNamespace", "AsyncPexelsNamespace"),
105
106
  "pinterest": ("pinterest", "PinterestNamespace", "AsyncPinterestNamespace"),
106
107
  "playstore": ("playstore", "PlaystoreNamespace", "AsyncPlaystoreNamespace"),
107
108
  "polymarket": ("polymarket", "PolymarketNamespace", "AsyncPolymarketNamespace"),
@@ -134,6 +135,7 @@ REGISTRY: dict[str, tuple[str, str, str]] = {
134
135
  "trustpilot": ("trustpilot", "TrustpilotNamespace", "AsyncTrustpilotNamespace"),
135
136
  "truthsocial": ("truthsocial", "TruthsocialNamespace", "AsyncTruthsocialNamespace"),
136
137
  "twitter": ("twitter", "TwitterNamespace", "AsyncTwitterNamespace"),
138
+ "unsplash": ("unsplash", "UnsplashNamespace", "AsyncUnsplashNamespace"),
137
139
  "upwork": ("upwork", "UpworkNamespace", "AsyncUpworkNamespace"),
138
140
  "walmart": ("walmart", "WalmartNamespace", "AsyncWalmartNamespace"),
139
141
  "web": ("web", "WebNamespace", "AsyncWebNamespace"),
@@ -185,7 +185,7 @@ class GoogleSearchInput(TypedDict, total=False):
185
185
  limit: NotRequired[int]
186
186
  """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, send page (about 10 results per page, 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."""
187
187
  location: NotRequired[str]
188
- """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."""
188
+ """Fine-grained location to localize results to, more specific than the country-level gl. Send it as an Active Canonical Name from Google's geo-target list: place, then each parent region, then country, with no space after each comma, e.g. 'New York,New York,United States', 'Austin,Texas,United States', 'London,England,United Kingdom'. Common variations are translated to that name when they point to exactly one place: spaces after commas, missing accents, a US state abbreviation ('Orlando, FL, United States'), or a skipped region ('Sydney, Australia'). A value that names no place, or more than one, is rejected rather than quietly searched from somewhere else."""
189
189
  page: NotRequired[int]
190
190
  """Which page of about 10 organic results to return, starting at 1. Send page 2, 3, ... to walk deeper; each page is billed as one request and any source can serve any page. Replaces cursor. Minimum: 1. Default: 1."""
191
191
  preferLatencyUnderMs: NotRequired[int]
@@ -0,0 +1,207 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the pexels 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 PexelsSearchPhotosInput(TypedDict, total=False):
19
+ """Input for Pexels Photo Search."""
20
+
21
+ allowFallbacks: NotRequired[bool]
22
+ """Optional, default true. When false, only the sources listed in `source` may serve; the request is refused with no charge if none of them can. When true, the listed sources are tried first and any other source may serve after them, at the normal price. Default: true."""
23
+ ignoreSources: NotRequired[list[str]]
24
+ """Optional. Source ids to skip for this request, taken from this endpoint's `lanes[].source.id`. The cheapest remaining source serves and the price is that of the dearest remaining source. An id that does not serve this endpoint, or that is also in `source`, is rejected as invalid input with no charge; skipping every source is rejected the same way."""
25
+ limit: NotRequired[int]
26
+ """Maximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less. Range: 1 to 20."""
27
+ minHeight: NotRequired[int]
28
+ """Only return photos at least this many pixels tall. Minimum: 1."""
29
+ minWidth: NotRequired[int]
30
+ """Only return photos at least this many pixels wide. Minimum: 1."""
31
+ orientation: NotRequired[Literal["landscape", "portrait", "square"]]
32
+ """Only return photos with this orientation. Omit for any orientation."""
33
+ peopleCount: NotRequired[Literal["0", "1", "2"]]
34
+ """Only return photos showing this many people: "0" for none, "1" or "2". Omit for any number."""
35
+ preferLatencyUnderMs: NotRequired[int]
36
+ """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."""
37
+ query: Required[str]
38
+ """Keyword or phrase to search Pexels photos for, e.g. "coffee" or "city skyline"."""
39
+ requireFields: NotRequired[list[Literal["tags"]]]
40
+ """Optional; omit it and routing is unchanged, with the cheapest source serving. Name the output fields this request must be able to return, for example `tags`, and it is served only by a source that returns every one of them. Fields you do not name are still returned whenever the serving source has them. This can raise your price: when the cheapest source cannot return a named field, a dearer source serves, and you are quoted and charged its price. A named field can still be absent on a photo that genuinely lacks it. Naming a combination that no single source returns together is refused as invalid input, with no charge."""
41
+ source: NotRequired[list[str]]
42
+ """Optional. Source ids to prefer, in order, taken from this endpoint's `lanes[].source.id` in /catalog or /apis. Omit it and the cheapest source serves, with automatic failover. Listed sources are tried first in the order given, then the others, unless `allowFallbacks` is false. A single source with `allowFallbacks` false is served only by that source at its price, quoted and charged exactly, with no failover. The price is that of the dearest source that may serve. An id that does not serve this endpoint is rejected as invalid input with no charge; a listed source that is not serving right now is refused with no charge, so omit `source` to be served by another. On a paginated walk, later pages must include the source that served page one, or omit `source`."""
43
+
44
+
45
+ class PexelsSearchPhotosData(BaseModel):
46
+ photos: list[PexelsSearchPhotosPhoto] = Field(
47
+ description="Free Pexels photos matching the keyword, in Pexels' relevance order."
48
+ )
49
+
50
+
51
+ class PexelsSearchPhotosPhoto(BaseModel):
52
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
53
+
54
+ alt: str | None = Field(
55
+ default=None,
56
+ description="Alt text describing the photo. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
57
+ )
58
+ color: str | None = Field(
59
+ default=None, description='Dominant color as a hex code, e.g. "#918c79".'
60
+ )
61
+ colors: list[str] | None = Field(
62
+ default=None, description="Palette of the photo's main colors as hex codes."
63
+ )
64
+ created_utc: float | None = Field(
65
+ default=None,
66
+ alias="createdUtc",
67
+ description="When the photo was uploaded. UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.",
68
+ )
69
+ download_url: str | None = Field(
70
+ default=None,
71
+ alias="downloadUrl",
72
+ description="Direct download URL for the full-quality file.",
73
+ )
74
+ height: int | None = Field(
75
+ default=None,
76
+ description="Original height in pixels. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
77
+ )
78
+ id: str = Field(
79
+ description="Photo id on the source site. Populated whenever the provider has data for the entity."
80
+ )
81
+ image: str = Field(
82
+ description="Display-size image URL, 1440 px wide. The query parameters set the size, so keep the URL intact. Populated whenever the provider has data for the entity."
83
+ )
84
+ image_medium: str | None = Field(
85
+ default=None, alias="imageMedium", description="Medium image URL, 750 px wide."
86
+ )
87
+ image_original: str | None = Field(
88
+ default=None,
89
+ alias="imageOriginal",
90
+ description="Full-resolution original image URL. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
91
+ )
92
+ license: str | None = Field(
93
+ default=None,
94
+ description='License the photo is published under. "Pexels" means the Pexels License: free to use, attribution appreciated but not required. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.',
95
+ )
96
+ orientation: str | None = Field(
97
+ default=None, description="landscape, portrait, or square."
98
+ )
99
+ photographer: str | None = Field(
100
+ default=None,
101
+ description="Photographer's display name, for attribution. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
102
+ )
103
+ photographer_avatar_url: str | None = Field(
104
+ default=None,
105
+ alias="photographerAvatarUrl",
106
+ description="Photographer's profile picture URL.",
107
+ )
108
+ photographer_instagram_username: str | None = Field(
109
+ default=None,
110
+ alias="photographerInstagramUsername",
111
+ description="Photographer's Instagram username, when they list one on Pexels.",
112
+ )
113
+ photographer_location: str | None = Field(
114
+ default=None,
115
+ alias="photographerLocation",
116
+ description="Photographer's location as they state it on Pexels, when they list one.",
117
+ )
118
+ photographer_url: str | None = Field(
119
+ default=None,
120
+ alias="photographerUrl",
121
+ description="Photographer's Pexels profile page, for attribution. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
122
+ )
123
+ photographer_username: str | None = Field(
124
+ default=None,
125
+ alias="photographerUsername",
126
+ description="Photographer's Pexels handle, without the leading @.",
127
+ )
128
+ published_utc: float | None = Field(
129
+ default=None,
130
+ alias="publishedUtc",
131
+ description="When Pexels published the photo. UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.",
132
+ )
133
+ tags: list[str] | None = Field(
134
+ default=None,
135
+ description="Pexels' tags for the photo. One source returns at most 25 tags; name tags in requireFields to be served the full list.",
136
+ )
137
+ thumbnail: str | None = Field(
138
+ default=None, description="Thumbnail image URL, 130 px tall."
139
+ )
140
+ title: str | None = Field(
141
+ default=None, description="Photo title set by the photographer."
142
+ )
143
+ url: str = Field(
144
+ description="The photo's page on pexels.com. Populated whenever the provider has data for the entity."
145
+ )
146
+ width: int | None = Field(
147
+ default=None,
148
+ description="Original width in pixels. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
149
+ )
150
+
151
+
152
+ class PexelsNamespace:
153
+ """Typed methods for this platform. Attached lazily to the client."""
154
+
155
+ def __init__(self, client: "AnyAPI") -> None:
156
+ self._client = client
157
+
158
+ def search_photos(
159
+ self,
160
+ *,
161
+ options: RequestOptions | None = None,
162
+ **input: Unpack[PexelsSearchPhotosInput],
163
+ ) -> RunResult[PexelsSearchPhotosData]:
164
+ """Pexels Photo Search
165
+
166
+ Search Pexels for free stock photos by keyword. Returns image URLs in
167
+ several sizes, dimensions, alt text, the photographer's name and profile,
168
+ and the photo's Pexels page.
169
+
170
+ Price: $0.00055 per request plus $0.0033 per result (maximum $0.0666).
171
+
172
+ Example:
173
+ res = client.pexels.search_photos(limit=2, query="coffee")
174
+ """
175
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
176
+ "pexels.search_photos", dict(input), options
177
+ )
178
+ return RunResult[PexelsSearchPhotosData].model_validate(raw)
179
+
180
+
181
+ class AsyncPexelsNamespace:
182
+ """Typed methods for this platform. Attached lazily to the client."""
183
+
184
+ def __init__(self, client: "AsyncAnyAPI") -> None:
185
+ self._client = client
186
+
187
+ async def search_photos(
188
+ self,
189
+ *,
190
+ options: RequestOptions | None = None,
191
+ **input: Unpack[PexelsSearchPhotosInput],
192
+ ) -> RunResult[PexelsSearchPhotosData]:
193
+ """Pexels Photo Search
194
+
195
+ Search Pexels for free stock photos by keyword. Returns image URLs in
196
+ several sizes, dimensions, alt text, the photographer's name and profile,
197
+ and the photo's Pexels page.
198
+
199
+ Price: $0.00055 per request plus $0.0033 per result (maximum $0.0666).
200
+
201
+ Example:
202
+ res = client.pexels.search_photos(limit=2, query="coffee")
203
+ """
204
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
205
+ "pexels.search_photos", dict(input), options
206
+ )
207
+ return RunResult[PexelsSearchPhotosData].model_validate(raw)
@@ -0,0 +1,247 @@
1
+ # Generated - do not edit. Regenerate with: pnpm generate
2
+ """Generated namespace module for the unsplash 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 UnsplashSearchPhotosInput(TypedDict, total=False):
19
+ """Input for Unsplash Photo Search."""
20
+
21
+ allowFallbacks: NotRequired[bool]
22
+ """Optional, default true. When false, only the sources listed in `source` may serve; the request is refused with no charge if none of them can. When true, the listed sources are tried first and any other source may serve after them, at the normal price. Default: true."""
23
+ color: NotRequired[
24
+ Literal[
25
+ "black_and_white",
26
+ "black",
27
+ "white",
28
+ "yellow",
29
+ "orange",
30
+ "red",
31
+ "purple",
32
+ "magenta",
33
+ "green",
34
+ "teal",
35
+ "blue",
36
+ ]
37
+ ]
38
+ """Only return photos with this dominant color tone. Omit for any color."""
39
+ ignoreSources: NotRequired[list[str]]
40
+ """Optional. Source ids to skip for this request, taken from this endpoint's `lanes[].source.id`. The cheapest remaining source serves and the price is that of the dearest remaining source. An id that does not serve this endpoint, or that is also in `source`, is rejected as invalid input with no charge; skipping every source is rejected the same way."""
41
+ limit: NotRequired[int]
42
+ """Maximum number of photos to return (1-20, default 20). You are billed per photo returned, so a lower limit costs less. Range: 1 to 20."""
43
+ orientation: NotRequired[Literal["landscape", "portrait", "square"]]
44
+ """Only return photos with this orientation. Omit for any orientation."""
45
+ preferLatencyUnderMs: NotRequired[int]
46
+ """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."""
47
+ query: Required[str]
48
+ """Keyword or phrase to search Unsplash photos for, e.g. "coffee" or "minimal workspace"."""
49
+ sortBy: NotRequired[Literal["relevant", "recent"]]
50
+ """Order results by best match (relevant, the default) or newest first (recent). Default: relevant."""
51
+ source: NotRequired[list[str]]
52
+ """Optional. Source ids to prefer, in order, taken from this endpoint's `lanes[].source.id` in /catalog or /apis. Omit it and the cheapest source serves, with automatic failover. Listed sources are tried first in the order given, then the others, unless `allowFallbacks` is false. A single source with `allowFallbacks` false is served only by that source at its price, quoted and charged exactly, with no failover. The price is that of the dearest source that may serve. An id that does not serve this endpoint is rejected as invalid input with no charge; a listed source that is not serving right now is refused with no charge, so omit `source` to be served by another. On a paginated walk, later pages must include the source that served page one, or omit `source`."""
53
+
54
+
55
+ class UnsplashSearchPhotosData(BaseModel):
56
+ photos: list[UnsplashSearchPhotosPhoto] = Field(
57
+ description="Free Unsplash photos matching the keyword. Unsplash+ premium photos are excluded, so every photo is under the Unsplash License. Unsplash places sponsored photos among the results, flagged by sponsored."
58
+ )
59
+
60
+
61
+ class UnsplashSearchPhotosPhoto(BaseModel):
62
+ model_config = ConfigDict(extra="allow", populate_by_name=True)
63
+
64
+ alt: str | None = Field(
65
+ default=None,
66
+ description="Alt text describing the photo. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
67
+ )
68
+ blur_hash: str | None = Field(
69
+ default=None,
70
+ alias="blurHash",
71
+ description="BlurHash string for rendering a blurred placeholder while the image loads.",
72
+ )
73
+ color: str | None = Field(
74
+ default=None, description='Dominant color as a hex code, e.g. "#918c79".'
75
+ )
76
+ created_utc: float | None = Field(
77
+ default=None,
78
+ alias="createdUtc",
79
+ description="UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.",
80
+ )
81
+ description: str | None = Field(
82
+ default=None,
83
+ description="Photographer's own description. Absent when they wrote none.",
84
+ )
85
+ download_url: str | None = Field(
86
+ default=None,
87
+ alias="downloadUrl",
88
+ description="Unsplash download link for the photo.",
89
+ )
90
+ height: int | None = Field(
91
+ default=None,
92
+ description="Original height in pixels. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
93
+ )
94
+ id: str = Field(
95
+ description="Photo id on the source site. Populated whenever the provider has data for the entity."
96
+ )
97
+ image: str = Field(
98
+ description="Display-size image URL, 1080 px wide. The query parameters set the size, so keep the URL intact. Populated whenever the provider has data for the entity."
99
+ )
100
+ image_full: str | None = Field(
101
+ default=None, alias="imageFull", description="Full-resolution JPEG URL."
102
+ )
103
+ image_original: str | None = Field(
104
+ default=None,
105
+ alias="imageOriginal",
106
+ description="Original image URL at full resolution, unprocessed. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
107
+ )
108
+ image_small: str | None = Field(
109
+ default=None, alias="imageSmall", description="Small image URL, 400 px wide."
110
+ )
111
+ likes: int | None = Field(default=None, description="Number of likes on Unsplash.")
112
+ photographer: str | None = Field(
113
+ default=None,
114
+ description="Photographer's display name, for attribution. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
115
+ )
116
+ photographer_avatar_url: str | None = Field(
117
+ default=None,
118
+ alias="photographerAvatarUrl",
119
+ description="Photographer's profile picture URL.",
120
+ )
121
+ photographer_bio: str | None = Field(
122
+ default=None,
123
+ alias="photographerBio",
124
+ description="Photographer's Unsplash bio, when they wrote one.",
125
+ )
126
+ photographer_for_hire: bool | None = Field(
127
+ default=None,
128
+ alias="photographerForHire",
129
+ description="True when the photographer marks themselves available for hire on Unsplash.",
130
+ )
131
+ photographer_instagram_username: str | None = Field(
132
+ default=None,
133
+ alias="photographerInstagramUsername",
134
+ description="Photographer's Instagram username, when they list one on Unsplash.",
135
+ )
136
+ photographer_location: str | None = Field(
137
+ default=None,
138
+ alias="photographerLocation",
139
+ description="Photographer's location as they state it on Unsplash, when they list one.",
140
+ )
141
+ photographer_total_likes: int | None = Field(
142
+ default=None,
143
+ alias="photographerTotalLikes",
144
+ description="Number of photos the photographer has liked on Unsplash.",
145
+ )
146
+ photographer_total_photos: int | None = Field(
147
+ default=None,
148
+ alias="photographerTotalPhotos",
149
+ description="Number of photos the photographer has published on Unsplash.",
150
+ )
151
+ photographer_twitter_username: str | None = Field(
152
+ default=None,
153
+ alias="photographerTwitterUsername",
154
+ description="Photographer's X (Twitter) username, when they list one on Unsplash.",
155
+ )
156
+ photographer_url: str | None = Field(
157
+ default=None,
158
+ alias="photographerUrl",
159
+ description="Photographer's Unsplash profile page, for attribution. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
160
+ )
161
+ photographer_username: str | None = Field(
162
+ default=None,
163
+ alias="photographerUsername",
164
+ description="Photographer's Unsplash username, without the leading @.",
165
+ )
166
+ photographer_website: str | None = Field(
167
+ default=None,
168
+ alias="photographerWebsite",
169
+ description="Photographer's portfolio or personal website, when they list one.",
170
+ )
171
+ sponsored: bool | None = Field(
172
+ default=None,
173
+ description="True when Unsplash placed this photo in the results as a sponsored listing.",
174
+ )
175
+ thumbnail: str | None = Field(
176
+ default=None, description="Thumbnail image URL, 200 px wide."
177
+ )
178
+ updated_utc: float | None = Field(
179
+ default=None,
180
+ alias="updatedUtc",
181
+ description="When the photo's record last changed on Unsplash. UTC epoch timestamp in seconds (Unix time). Multiply by 1000 for a JS Date in milliseconds.",
182
+ )
183
+ url: str = Field(
184
+ description="The photo's page on unsplash.com. Populated whenever the provider has data for the entity."
185
+ )
186
+ width: int | None = Field(
187
+ default=None,
188
+ description="Original width in pixels. Populated whenever the provider has data for the entity. Present whenever the upstream returns this record.",
189
+ )
190
+
191
+
192
+ class UnsplashNamespace:
193
+ """Typed methods for this platform. Attached lazily to the client."""
194
+
195
+ def __init__(self, client: "AnyAPI") -> None:
196
+ self._client = client
197
+
198
+ def search_photos(
199
+ self,
200
+ *,
201
+ options: RequestOptions | None = None,
202
+ **input: Unpack[UnsplashSearchPhotosInput],
203
+ ) -> RunResult[UnsplashSearchPhotosData]:
204
+ """Unsplash Photo Search
205
+
206
+ Search Unsplash for free stock photos by keyword. Returns image URLs in
207
+ several sizes, dimensions, alt text, the photographer's name and profile,
208
+ and the photo's Unsplash page.
209
+
210
+ Price: $0.00055 per request plus $0.00165 per result (maximum $0.0336).
211
+
212
+ Example:
213
+ res = client.unsplash.search_photos(limit=2, query="coffee")
214
+ """
215
+ raw = self._client._run_raw( # pyright: ignore[reportPrivateUsage]
216
+ "unsplash.search_photos", dict(input), options
217
+ )
218
+ return RunResult[UnsplashSearchPhotosData].model_validate(raw)
219
+
220
+
221
+ class AsyncUnsplashNamespace:
222
+ """Typed methods for this platform. Attached lazily to the client."""
223
+
224
+ def __init__(self, client: "AsyncAnyAPI") -> None:
225
+ self._client = client
226
+
227
+ async def search_photos(
228
+ self,
229
+ *,
230
+ options: RequestOptions | None = None,
231
+ **input: Unpack[UnsplashSearchPhotosInput],
232
+ ) -> RunResult[UnsplashSearchPhotosData]:
233
+ """Unsplash Photo Search
234
+
235
+ Search Unsplash for free stock photos by keyword. Returns image URLs in
236
+ several sizes, dimensions, alt text, the photographer's name and profile,
237
+ and the photo's Unsplash page.
238
+
239
+ Price: $0.00055 per request plus $0.00165 per result (maximum $0.0336).
240
+
241
+ Example:
242
+ res = client.unsplash.search_photos(limit=2, query="coffee")
243
+ """
244
+ raw = await self._client._arun_raw( # pyright: ignore[reportPrivateUsage]
245
+ "unsplash.search_photos", dict(input), options
246
+ )
247
+ return RunResult[UnsplashSearchPhotosData].model_validate(raw)
File without changes
File without changes
File without changes
File without changes