File tree 4 files changed +25
-6
lines changed
4 files changed +25
-6
lines changed Original file line number Diff line number Diff line change @@ -77,7 +77,7 @@ scraper = webt.Scraper(
77
77
out_json = scraper.scrape(" https://www.example.com" )
78
78
```
79
79
80
- ## Web Search (SERP API)
80
+ ## Web Search (AI SERP API)
81
81
82
82
``` python
83
83
import webtranspose as webt
Original file line number Diff line number Diff line change 1
1
2
2
[tool .poetry ]
3
3
name = " webtranspose"
4
- version = " 0.3.0 "
5
- description = " APIs for the internet "
4
+ version = " 0.3.1 "
5
+ description = " Reliable APIs for the website data "
6
6
authors = [
" Mike Gee <[email protected] >" ]
7
7
8
8
readme = " README.md"
Original file line number Diff line number Diff line change 2
2
3
3
__author__ = """Mike Gee"""
4
4
5
- __version__ = "0.3.0 "
5
+ __version__ = "0.3.1 "
6
6
7
7
from .chat import *
8
8
from .crawl import *
Original file line number Diff line number Diff line change 3
3
4
4
from .webt_api import run_webt_api
5
5
6
+ def search (query , api_key = None ) -> dict :
7
+ """
8
+ Search for a query using the Web Transpose API.
6
9
7
- def search (query ):
10
+ Args:
11
+ query (str): The query to search for.
12
+ api_key (str, optional): The API key to use for authentication. Defaults to None.
13
+
14
+ Returns:
15
+ dict: The search results.
16
+ """
8
17
if api_key is None :
9
18
api_key = os .environ .get ("WEBTRANSPOSE_API_KEY" )
10
19
@@ -21,7 +30,17 @@ def search(query):
21
30
raise ValueError ("Must provide api_key or set WEBTRANSPOSE_API_KEY in environment variables." )
22
31
23
32
24
- def search_filter (query ):
33
+ def search_filter (query , api_key = None ) -> dict :
34
+ """
35
+ Search for a query using the Web Transpose API with filtering.
36
+
37
+ Args:
38
+ query (str): The query to search for.
39
+ api_key (str, optional): The API key to use for authentication. Defaults to None.
40
+
41
+ Returns:
42
+ dict: The filtered search results.
43
+ """
25
44
if api_key is None :
26
45
api_key = os .environ .get ("WEBTRANSPOSE_API_KEY" )
27
46
You can’t perform that action at this time.
0 commit comments