Python Integration Guide
Add Parse media analysis to your Python application in minutes.
Installation
pip install requests
Basic Usage
import os
import requests
API_KEY = os.environ["PARSE_API_KEY"]
BASE_URL = "https://www.parsethe.media/api/v1"
def analyze_article(url: str) -> dict:
response = requests.post(
f"{BASE_URL}/analyze",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json",
},
json={"url": url},
)
response.raise_for_status()
return response.json()["data"]
# Usage
result = analyze_article("https://example.com/article")
print(f"Credibility: {result['credibility']} ({result['truthScore']}/100)")See Authentication and the full API reference for more options.