GoogleDorking

Methods for specifying the search query and applying filters - site, file type, URL, title, date range, sort order, and exclusions.

Methods for specifying the search query and applying filters - site, file type, URL, title, date range, sort order, and exclusions.

SearchFor sets the primary search term. SearchForExactPhrase wraps the term in quotes for exact phrase matching. WithSite restricts results to a specific domain. WithFileType filters by document type (PDF, DOCX, etc.). WithInTitle restricts results to pages where the title contains the term. WithInUrl restricts to pages where the URL contains the term. WithExcludeTerm excludes pages containing the term. WithDateRestriction filters by date range. WithSortBy orders results. WithResultsPerPageUpTo10 limits the number of results (maximum 10 per the API).

GPAL Fluent: High-level fluent C# API

//Multiple filter methods can be chained before GetResults. Each filter method corresponds to a Google Custom Search API operator. WithDateRestriction(DateRestriction.Month, 3) restricts to the last 3 months.

// Search for PDFs on a specific site GPAL.GoogleDorking .WithApiKey("AIzaSyD...") .WithEngineId("cx-value") .SearchFor("annual report") .WithSite("example.com") .WithFileType(FileType.PDF) .WithResultsPerPageUpTo10(10) .GetResults(out var results); // Exact phrase search with date restriction GPAL.GoogleDorking .WithApiKey("AIzaSyD...") .WithEngineId("cx-value") .SearchForExactPhrase("data breach disclosure") .WithDateRestriction(DateRestriction.Month, 3) .WithSortBy(SortOption.Date) .GetResults(out var news);