unitbytes 1.0.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.
@@ -0,0 +1,238 @@
1
+ Metadata-Version: 2.4
2
+ Name: unitbytes
3
+ Version: 1.0.0
4
+ Summary: Unofficial unified, zero-dependency, provider-agnostic Python SDK & CLI for UnitBytes web data APIs & scrapers across Google Trends (TrendReq), Jobs, Shopping, Travel, AI Overviews/Mode, News, Maps, 1688, Alibaba, Goofish, RedNote, and Reddit.
5
+ Author-email: UnitBytes <contact@unitbytes.com>
6
+ License: MIT
7
+ Project-URL: Homepage, https://unitbytes.com/
8
+ Project-URL: Documentation, https://unitbytes.com/actors/
9
+ Project-URL: Apify Store, https://apify.com/unitbytes?fpr=939u3w&fp_sid=pypi_sdk
10
+ Keywords: unitbytes,web-scraping,pytrends,pytrends-alternative,google-trends,google-maps,google-maps-scraper,b2b-leads,google-jobs,google-shopping,google-flights,google-hotels,ai-overviews,1688,alibaba,goofish,xianyu,goofish-without-login,xiaohongshu,rednote,reddit,apify,rapidapi
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Classifier: Typing :: Typed
23
+ Requires-Python: >=3.10
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Provides-Extra: pandas
27
+ Requires-Dist: pandas>=2.0.0; extra == "pandas"
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
30
+ Dynamic: license-file
31
+
32
+ # `unitbytes` — Unified Provider-Agnostic Python SDK & CLI
33
+
34
+ Unofficial, **zero-dependency**, typed Python SDK and CLI (`pip install unitbytes`) for the **UnitBytes** web data ecosystem across **Google Trends (`TrendReq`), Google Maps B2B Leads & Contributor Forensics, Goofish (Xianyu / 闲鱼), Google Jobs, Google Shopping, Google Travel (Flights & Hotels), Google AI Overviews & AI Mode, Google News, 1688, Alibaba, RedNote (Xiaohongshu), Reddit**, and all 66 UnitBytes data actors.
35
+
36
+ > **Disclaimer:** Unofficial integration by UnitBytes. Not affiliated with, endorsed by, or sponsored by Google LLC, Alibaba Group, Reddit, Inc., Meta Platforms, Inc., Xiaohongshu, or any other third-party platform referenced herein. Google, YouTube, Google Maps, 1688, Alibaba, Xianyu/Goofish, Xiaohongshu/RedNote, and Reddit are trademarks of their respective owners.
37
+
38
+ ---
39
+
40
+ ## Key Highlights
41
+
42
+ - **1-Line `pytrends` Drop-In Replacement (`HTTP 429` Fix, from `$0.30/1K`)**: Swap archived `from pytrends.request import TrendReq` for `from unitbytes.trends import TrendReq` (or `from unitbytes.request import TrendReq`) to eliminate `TooManyRequestsError` (`HTTP 429`) on cloud/CI runners — starting at **`$0.30/1K` GOLD+ (`$0.45/1K` Free)** with optional `pandas.DataFrame` support (`pip install "unitbytes[pandas]"`).
43
+ - **Google Maps B2B Leads & Local Guide Forensics (`ub.gmaps`)**: Extract 48 flat B2B lead fields (`primary_email`, E.164 `phone_international`, `whatsapp_url`, social profiles, `is_claimed`, `website_cms`, `website_tech_stack`, `has_meta_pixel`, `has_google_ads_tag`, `lead_score`, and `review_hook_text`) via `ub.gmaps.leads` (`$1.00/1K` GOLD+ / `$2.00/1K` Free), place reviews via `ub.gmaps.reviews` (`$0.25/1K` GOLD+), and public Local Guide profiles & review histories via `ub.gmaps.contributor` (`$1.20/1K` profiles + `$0.80/1K` reviews GOLD+).
44
+ - **Cookieless Goofish / Xianyu Search & Seller Audits (`ub.goofish`)**: Solve `"Xianyu / Goofish unable to access"` errors and Alipay / `+86` SMS login walls with cookieless keyword search (`prefer_standby=True`), offline English-to-Chinese slang translation (`ub.goofish.translate_keyword`), and **Zhima Credit (`芝麻信用`)** seller verification (`ub.goofish.seller` + `assess_seller_trust`).
45
+ - **Zero External Runtime Dependencies (`dependencies = []`)**: Built 100% on Python 3.10+ standard library (`urllib.request`, `json`, `dataclasses`, `decimal`, `typing`, `csv`). Upstream third-party client updates can never break your production environment.
46
+ - **Provider-Agnostic Pluggable Transports & Duplicate-Charge Protection**: Switch seamlessly between **Apify (`APIFY_TOKEN`)**, **Cloud Gateways (`UNITBYTES_API_KEY` + `UNITBYTES_BASE_URL`)**, **RapidAPI (`RAPIDAPI_KEY`)**, and **Zyla API Hub (`ZYLA_API_KEY`)** — with start-once non-retried `POST` runs, `maxTotalChargeUsd` budget caps, `3xx` redirect blocking, and automatic secret redaction.
47
+
48
+ ---
49
+
50
+ ## Installation & Free API Token
51
+
52
+ ```bash
53
+ pip install unitbytes
54
+
55
+ # Optional: install with pandas for DataFrame outputs in TrendReq / Jobs
56
+ pip install "unitbytes[pandas]"
57
+ ```
58
+
59
+ Grab a free Apify API token (**`$5.00`/month recurring platform credit included — no credit card required**) at [**apify.com/unitbytes**](https://apify.com/unitbytes?fpr=939u3w&fp_sid=pypi_sdk) (or browse full actor schemas at [unitbytes.com/actors/](https://unitbytes.com/actors/)):
60
+
61
+ ```bash
62
+ # Option A: Apify Store Actors (Recommended — $5/mo free credit included)
63
+ export APIFY_TOKEN="apify_api_..."
64
+
65
+ # Option B: Dedicated / Custom Cloud Gateway
66
+ export UNITBYTES_API_KEY="ub_..."
67
+ export UNITBYTES_BASE_URL="https://your-gateway.example.com"
68
+
69
+ # Option C: RapidAPI Hub
70
+ export RAPIDAPI_KEY="your_rapidapi_key"
71
+
72
+ # Option D: Zyla API Hub
73
+ export ZYLA_API_KEY="your_zyla_key"
74
+ export ZYLA_BASE_URL="https://zylalabs.com/api/..."
75
+ ```
76
+
77
+ ---
78
+
79
+ ## Featured Workflows
80
+
81
+ ### 1. 1-Line `pytrends` Drop-In Replacement (`HTTP 429` Fix — `$0.30/1K` GOLD+)
82
+
83
+ Backed by [`unitbytes/google-trends-scraper`](https://apify.com/unitbytes/google-trends-scraper?fpr=939u3w&fp_sid=pypi_sdk) (`$0.45/1K` Free • **`$0.30/1K` GOLD+** + `$0.00005` start):
84
+
85
+ ```python
86
+ # Replace: from pytrends.request import TrendReq
87
+ from unitbytes.trends import TrendReq
88
+
89
+ pytrends = TrendReq(hl="en-US", tz=360)
90
+ pytrends.build_payload(["python", "rust"], timeframe="today 12-m", geo="US")
91
+ timeline = pytrends.interest_over_time()
92
+ related = pytrends.related_queries()
93
+ ```
94
+
95
+ ### 2. Google Maps B2B Leads, Website Tech Stacks & Contributor Forensics (`ub.gmaps`)
96
+
97
+ Backed by [`unitbytes/google-maps-leads-scraper`](https://apify.com/unitbytes/google-maps-leads-scraper?fpr=939u3w&fp_sid=pypi_sdk) (`$2.00/1K` Free • **`$1.00/1K` GOLD+**) and [`unitbytes/google-maps-contributor-scraper`](https://apify.com/unitbytes/google-maps-contributor-scraper?fpr=939u3w&fp_sid=pypi_sdk) (`$1.20/1K` profiles + `$0.80/1K` reviews GOLD+):
98
+
99
+ ```python
100
+ from unitbytes import UnitBytes
101
+
102
+ ub = UnitBytes() # Auto-detects APIFY_TOKEN / provider from environment
103
+
104
+ # Verified B2B emails, E.164 phones, CMS/ad pixels (Meta/Google Ads), unclaimed GBP & review hooks
105
+ leads = ub.gmaps.leads(
106
+ ["dentists in Austin TX", "medspas in Miami FL"],
107
+ max_places_per_query=25,
108
+ scrape_contacts=True,
109
+ include_review_hook=True,
110
+ )
111
+ for lead in leads[:3]:
112
+ print(
113
+ lead.get("business_name"),
114
+ lead.get("primary_email"),
115
+ lead.get("phone_international"),
116
+ lead.get("website_cms"),
117
+ lead.get("has_google_ads_tag"),
118
+ )
119
+
120
+ # Audit Local Guide contributor profiles & cross-location review histories (fake-review forensics)
121
+ contrib_reviews = ub.gmaps.contributor(
122
+ "https://www.google.com/maps/place/?q=place_id:ChIJ2_VLfRdawokRXKfA6CMf5YQ",
123
+ place_sort="negative_and_newest",
124
+ max_reviewers_per_place=20,
125
+ max_reviews=50,
126
+ )
127
+ ```
128
+
129
+ ### 3. Cookieless Goofish (Xianyu / 闲鱼) Search & Seller Zhima Credit (`ub.goofish`)
130
+
131
+ Bypasses `"Xianyu / Goofish unable to access"` walls and Alipay / `+86` login prompts via [`unitbytes/goofish-xianyu-search-scraper`](https://apify.com/unitbytes/goofish-xianyu-search-scraper?fpr=939u3w&fp_sid=pypi_sdk) and [`unitbytes/goofish-scraper`](https://apify.com/unitbytes/goofish-scraper?fpr=939u3w&fp_sid=pypi_sdk):
132
+
133
+ ```python
134
+ from unitbytes import UnitBytes
135
+ from unitbytes.goofish import assess_seller_trust
136
+
137
+ ub = UnitBytes()
138
+
139
+ # Offline English -> Chinese Xianyu slang translation ("索尼 A7M4 微单相机 箱说全") + warm Standby search
140
+ items = ub.goofish.search(
141
+ "Sony A7M4 mirrorless camera box and papers",
142
+ translate_keywords=True,
143
+ personal_only=True,
144
+ free_shipping=True,
145
+ prefer_standby=True,
146
+ only_new=True,
147
+ max_items=20,
148
+ )
149
+
150
+ # Seller Zhima Credit (芝麻信用), biometric KYC badges & storefront audit without login
151
+ seller_data = ub.goofish.seller("100000000123", include_items=True, include_reviews=True, prefer_standby=True)
152
+ trust = assess_seller_trust(seller_data)
153
+ print(f"Trust: {trust.trust_score}/100 | Zhima: {trust.zhima_tier} | Risk: {trust.risk_level}")
154
+ ```
155
+
156
+ ### 4. Multi-Domain Unified Client (`UnitBytes`)
157
+
158
+ ```python
159
+ from unitbytes import UnitBytes
160
+
161
+ ub = UnitBytes()
162
+
163
+ # Google Trends Realtime Breakouts
164
+ spikes = ub.trends.trending_now(geo="US", time_window="24h")
165
+
166
+ # Google Jobs + Direct ATS Classification + Hiring Velocity
167
+ jobs = ub.jobs.search("Senior Python Engineer", locations=["New York, NY"], remote_only=True, max_jobs=25)
168
+ companies = ub.jobs.aggregate_hiring_companies(jobs)
169
+
170
+ # Google Shopping + MAP Violation Auditing
171
+ products = ub.shopping.search("Sony WH-1000XM5", sort_by="price_asc", max_products=20)
172
+ map_report = ub.shopping.detect_map_violations(products, map_price=349.99, authorized_sellers=["bestbuy.com"])
173
+
174
+ # Google Flights & Hotels + OTA Rate Parity
175
+ flights = ub.travel.flights(from_origin="JFK", to_destination="LHR", departure_date="2026-12-10", sort_by="cheapest")
176
+ hotels = ub.travel.hotels("Tokyo", check_in_date="2026-12-10", check_out_date="2026-12-14")
177
+ parity = ub.travel.audit_hotel_ota_parity(hotels, only_undercut=True)
178
+
179
+ # Google AI Overviews ($3.00/1k flat) & AI Mode ($4.00-$5.00/1k) + GEO Share-of-Voice
180
+ sov = ub.ai.audit_brand_share_of_voice(
181
+ ["best crm for startups", "hubspot vs salesforce"],
182
+ brand_domain="hubspot.com",
183
+ competitor_domains=["salesforce.com", "pipedrive.com"],
184
+ )
185
+
186
+ # Google News + LLM/RAG Context Builder
187
+ articles = ub.news.search("semiconductor supply chain", time_range="24h", extract_article_content=True)
188
+ rag_markdown = ub.news.build_rag_context(articles)
189
+
190
+ # 1688, Alibaba, RedNote (Xiaohongshu), Reddit & Generic Actor Runner
191
+ offers_1688 = ub.ali1688.search("wireless charger", province="shenzhen", max_items=20)
192
+ suppliers = ub.alibaba.suppliers("custom packaging", verified_only=True)
193
+ notes = ub.rednote.search("skincare routine", max_items=20)
194
+ posts = ub.reddit.search("self-hosted analytics", subreddit="selfhosted", max_items=20)
195
+ custom_items = ub.run("unitbytes/offerup-scraper", {"query": "road bike", "maxItems": 10})
196
+ ```
197
+
198
+ ---
199
+
200
+ ## Command-Line Interface (`unitbytes`)
201
+
202
+ All CLI commands support `--format {json,jsonl,csv}` (with spreadsheet formula sanitization on both headers and cells) and `--output <file>`:
203
+
204
+ ```bash
205
+ unitbytes --help
206
+ unitbytes trends trending-now --geo US --window 24h --format csv -o trends.csv
207
+ unitbytes gmaps leads "dentists in Austin TX" --max-places 25 --format csv -o austin_dentists.csv
208
+ unitbytes goofish search "Sony A7M4 box and papers" --translate --prefer-standby --max-items 20
209
+ unitbytes jobs search "Machine Learning Engineer" --remote-only --direct-ats-only --max-jobs 20
210
+ unitbytes travel flights --from SFO --to NRT --departure-date 2026-12-15 --sort-by cheapest
211
+ unitbytes ai overviews "best vector database" --country US --target-domain pinecone.io
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Namespace Reference
217
+
218
+ | Namespace | Methods |
219
+ | :--- | :--- |
220
+ | `ub.trends` | `trending_now`, `interest_over_time`, `interest_by_region`, `related_queries`, `related_topics`, `breakouts`, `youtube_trends`, `shopping_trends` (+ `TrendReq`) |
221
+ | `ub.gmaps` | `leads`, `reviews`, `reviews_tracker`, `photos`, `contributor` |
222
+ | `ub.goofish` | `search`, `seller`, `translate_keyword` (+ `assess_seller_trust`) |
223
+ | `ub.jobs` | `search`, `scrape_jobspy_compat`, `classify_ats_provider`, `aggregate_hiring_companies` |
224
+ | `ub.shopping` | `search`, `detect_map_violations` |
225
+ | `ub.travel` | `flights`, `hotels`, `scan_flexible_dates`, `audit_hotel_ota_parity` |
226
+ | `ub.ai` | `overviews`, `ai_mode`, `audit_brand_share_of_voice` |
227
+ | `ub.news` | `search`, `topics`, `build_rag_context` |
228
+ | `ub.ali1688` | `search`, `image_search`, `global_search` |
229
+ | `ub.alibaba` | `search`, `suppliers` |
230
+ | `ub.rednote` | `search`, `profile`, `comments`, `trends` |
231
+ | `ub.reddit` | `search`, `subreddit`, `post`, `comments`, `user` |
232
+ | `ub.run(...)` | Generic execution across any UnitBytes actor slug or `/v1/{service}/{operation}` endpoint |
233
+
234
+ ---
235
+
236
+ ## License
237
+
238
+ MIT License — see [LICENSE](./LICENSE). Documentation & actor catalog: [https://unitbytes.com/](https://unitbytes.com/), [https://unitbytes.com/actors/](https://unitbytes.com/actors/), and [Apify Store](https://apify.com/unitbytes?fpr=939u3w&fp_sid=pypi_sdk).
@@ -0,0 +1,26 @@
1
+ unitbytes/__init__.py,sha256=AJAj2s0HISSZTyQJeTSEhNs_-jClvjJna7EVxDE-v7I,968
2
+ unitbytes/_exceptions.py,sha256=5KDZ4FxC0d_Qd8_Tt9PC9JnPlpDlbWcHSykZi1k3NZM,3247
3
+ unitbytes/_serialization.py,sha256=jxvEhpIoDpnLu_g0Ki7B2cmxbCz2e3Nsgswi4tQQaWA,9112
4
+ unitbytes/_transports.py,sha256=7IXFdWXdEwiOxnbBX6TFBt4gcEFFTp79HMeEILwX-kQ,58906
5
+ unitbytes/ai.py,sha256=ZfJ5Q8Pa7sxSIsJE9KLKlW40VTMKpkCgJ6dHyJEGHuA,41404
6
+ unitbytes/ali1688.py,sha256=UndVITEduguowhIMP1Lzx0nFa2LeQgzcKVt5OiqMi9o,21019
7
+ unitbytes/alibaba.py,sha256=igVmHm257Mx4SPLRNaTXLgY30EPDpOWiy7_ujNeDcdE,8742
8
+ unitbytes/cli.py,sha256=4K-RRMRfFaRazkre9rrkiQIqYIS4SqJLrkU01KWkeWA,22196
9
+ unitbytes/client.py,sha256=cOW_5FJlNATgeVwFdJOL6_Ew8TNKxAaxB7bRV9kIzXc,4338
10
+ unitbytes/gmaps.py,sha256=UfMwBnBF7K9Pz9eyp5PXx17cileGVqQhGSaaajofxQY,14847
11
+ unitbytes/goofish.py,sha256=zTm_beSVSyk42QUcxoVUg4IFjr3gepWsct-391YB5jI,20583
12
+ unitbytes/jobs.py,sha256=84x1De27qQJwdK8Ij5ZipVroVy0gxo1GrJWmAzRHt7A,29887
13
+ unitbytes/news.py,sha256=6rTGHg23CK2D40Ck_x6kKJjgl9if1XCxsfQZFZC9Xoc,17677
14
+ unitbytes/py.typed,sha256=Z4FfgdLm9LWFozbmCt2Asdwdb5Qx4CpTl3SOWSs9Xtg,58
15
+ unitbytes/reddit.py,sha256=2cN-UeQatazim2w-Wke_B6sZ_VxkipVLgh63QeKgqRM,13367
16
+ unitbytes/rednote.py,sha256=ItWfhTFNEEPvfM7YTM4cMNWItvOuS0eREkOhAgqOEvI,11634
17
+ unitbytes/request.py,sha256=w4ORO20AYhpvoBvEe_UBJ6TjFFWCXx_tWuHuF-noCyg,286
18
+ unitbytes/shopping.py,sha256=j_wpNiPVaBEZjQ8OzdUlNWKngZr2GxRVCHBuWmZonA4,26050
19
+ unitbytes/travel.py,sha256=A1l1CWrTJfaSD6Yyu_jSqZqgGmGDj8OvSEtiO0zMYs4,37504
20
+ unitbytes/trends.py,sha256=5T1qYbf3AES7JMH0mQ2qaEnLr45QMsN0ec7-hYLBepY,47490
21
+ unitbytes-1.0.0.dist-info/licenses/LICENSE,sha256=1NeC8ZRZMW-abXD6D15EQMtqyQPM90WsaOL983Q4RFk,1066
22
+ unitbytes-1.0.0.dist-info/METADATA,sha256=RPT6LZZN2u2N_zYhGnv3WZ5WA6rkgY-FAvlQbxDAtPg,12799
23
+ unitbytes-1.0.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
24
+ unitbytes-1.0.0.dist-info/entry_points.txt,sha256=M4FUC91YofYAJP9Q5Jt_Zj28dvPlq_iII_jrOJKiZ4c,49
25
+ unitbytes-1.0.0.dist-info/top_level.txt,sha256=Oh3xlht7GRXMvYgIwOllQJ4AQFtD10Zje-Rh_VEXOOM,10
26
+ unitbytes-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.2.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ unitbytes = unitbytes.cli:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 UnitBytes
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ unitbytes