Skip to content

instagram_posts metadata: the 'country' output field description is an input instruction #58

Description

@anil-bd

SDK: brightdata-sdk 2.5.2 (latest on PyPI). Dataset gd_lk5ns7kz21pck8jpis (Instagram posts).

The SDK may only be relaying what the API returns; if so, please route this to whoever owns the dataset schema.

Steps to reproduce

pip install brightdata-sdk==2.5.2
export BRIGHTDATA_API_TOKEN=YOUR_API_KEY
python - <<'PY'
from brightdata import SyncBrightDataClient

with SyncBrightDataClient(auto_create_zones=False) as client:
    fields = client.datasets.instagram_posts.get_metadata().fields
    print(len(fields), "fields")
    print("country:", fields["country"])
PY

Actual

44 fields
country: {'type': 'text', 'active': False, 'required': False, 'description': 'Some profiles are restricted by location. Please set the country code in Alpha-2 format'}

The description tells the caller what to send. Every other field in the schema describes the value that comes back (for example likes: "Number of likes on the post"). This is the only one of the 44 that reads as an input instruction, and it is also the only inactive one.

Expected

Either a description of the output value, something like "Country code (ISO 3166-1 alpha-2) the collection was routed through, when the profile is restricted by location", or the field removed from the output schema if it is really the request parameter.

Why it matters

Anything that renders the schema shows this text as documentation of an output field. https://github.com/brightdata/instagram-scraper-python regenerates its field table daily from get_metadata(), and this row is the one that misleads.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions