Bug: Metadata.__init__() missing required url argument when calling supadata_client.metadata()

When calling supadata_client.metadata(url=tiktok_url), the SDK throws a TypeError instead of returning the metadata object.

I am trying to just get the video description from a tiktok.

Error

TypeError: Metadata.__init__() missing 1 required positional argument: 'url'

Steps to Reproduce

python

from supadata import Supadata  

client = Supadata(api_key="your_api_key") 
metadata = client.metadata(url="https://www.tiktok.com/@user/video/123456")

Expected Behaviour

A Metadata object is returned containing the video metadata including description,title, author etc.

Actual Behaviour

The API call succeeds and returns a response, but the SDK fails to construct the Metadata object because the url field is missing from the response, causing a TypeError.

Workaround

Currently bypassing the SDK and calling the API directly: (python)

import requests  

response = requests.get(  
"https://api.supadata.ai/v1/tiktok/metadata",  
params={"url": tiktok_url},  
headers={"x-api-key": "your_api_key"} 
) 

data = response.json()

Environment

  • Python version: 3.12

  • Supadata SDK version: 1.6.0

  • OS: macOS

Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
πŸ’‘

Feature Request

Date

2 days ago

Author

franklatank01

Subscribe to post

Get notified by email when there are changes.