feat!: remove the Discover API surface - #51
Open
nirsha-brd wants to merge 1 commit into
Open
Conversation
Removes the Bright Data Discover API integration (POST/GET https://api.brightdata.com/discover). Deletes the brightdata.discover package and notebooks/07_discover_api.ipynb; removes BrightDataClient.discover() / discover_trigger(); removes the six SyncBrightDataClient verbs (discover, discover_trigger, discover_status, discover_wait, discover_fetch, discover_to_result) and the _discover_service helper; drops the DiscoverResult / DiscoverJob / DiscoverSnapshot exports from brightdata.__init__; and removes the Discover test classes from test_colorless_service_verbs.py and test_sync_client_coverage.py along with the imports they orphaned. The dataset discovery feature is a DIFFERENT product and is untouched: discover_by / discover_new dataset triggers, discover_by_category, InstagramPostsDiscoverPayload / InstagramReelsDiscoverPayload, and the search.* scrapers all remain. BREAKING CHANGE: client.discover(), client.discover_trigger() and the sync discover_* verbs are removed, along with the DiscoverResult, DiscoverJob and DiscoverSnapshot exports.
nirsha-brd
marked this pull request as ready for review
August 12, 2026 15:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes the Bright Data Discover API integration (
POST/GET https://api.brightdata.com/discover).Changes
src/brightdata/discover/__init__.py,models.py,service.py)notebooks/07_discover_api.ipynbsrc/brightdata/client.py_discover_servicefield, anddiscover()/discover_trigger()src/brightdata/sync_client.pydiscover,discover_trigger,discover_status,discover_wait,discover_fetch,discover_to_result— plus the_discover_servicehelpersrc/brightdata/__init__.pyDiscoverResult/DiscoverJob/DiscoverSnapshot__all__entriessrc/brightdata/models.pydiscover/models.pytests/unit/test_colorless_service_verbs.pyTestDiscoverServiceVerbsand the imports it orphanedtests/unit/test_sync_client_coverage.pyTestDiscoverSyncPathand theDiscoverSnapshotimportREADME.md### Discover APIsectionCHANGELOG.md/pyproject.tomlThe trap worth flagging in review
"discover" means two different products in this repo. 204 files match the string. All but a handful belong to the dataset discovery feature, which this PR does not touch:
discover_by/discover_newdataset triggersdiscover_by_category(DigiKey, and its sync wrappers)InstagramPostsDiscoverPayload/InstagramReelsDiscoverPayloadclient.search.*scraperssrc/brightdata/datasets/— I checked every one; their only match is the English verb in docstrings like "Use get_metadata() to discover all available fields"I classified each reference before deleting anything.
tests/unit/test_x_scraper.py::test_forwarded_on_discover_triggeris likewise unrelated — it is a test name, and its body callsposts_by_profile_trigger.Verification
Baseline captured on pristine
mainbefore any edit, then re-run on this branch.mainpytestruff check .black --check .The suite is fully green before and after. The delta of 8 is exactly the removed Discover tests: 5 from
TestDiscoverServiceVerbsand 3 fromTestDiscoverSyncPath. No test that existed before fails now.The single ruff error is
setup.py:8:1: I001 Import block is un-sorted or un-formatted— pre-existing and identical on untouchedmain, in a file this PR never opens.Import smoke test on the built package:
Python resolves imports at module load, so a dangling reference to the deleted package would surface immediately on
import brightdata. It does not.Migration
Use
client.search.google()/bing()/yandex()to find sources andclient.scrape_url()to read them.Version
3.0.0, matching this changelog's precedent —
## Version 2.0.0carried a### 🚨 Breaking Changessection for a change of this class. Removing eight public methods and three exported models is breaking.Out of scope
brightdata/skillsstill ships adiscover-apiskill, and itspython-sdk-best-practices,live-researchandrag-pipelineskills referenceclient.discover. Those need a follow-up PR.