Add example of REST API call

This commit is contained in:
unclecode
2024-06-07 16:24:40 +08:00
parent b8d405fddd
commit aeb2114170
2 changed files with 31 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
import requests
data = {
"urls": [
"https://www.nbcnews.com/business"
],
"word_count_threshold": 5,
"screenshot": True
}
response = requests.post("https://crawl4ai.com/crawl", json=data) # OR local host if your run locally
response_data = response.json()
print(response_data['results'][0].keys())