Search Dataset

Search for articles within a news dataset. Performs search constrained to the dataset's domain. **Supported Datasets:** - `nytimes`: New York Times (nytimes.com) - `washpost`: Washington Post (washingtonpost.com) - `sfstandard`: SF Standard (sfstandard.com) - `sacbee`: Sacramento Bee (sacbee.com) - `sfchronicle`: San Francisco Chronicle (sfchronicle.com) - `newyorker`: The New Yorker (newyorker.com) - `theatlantic`: The Atlantic (theatlantic.com) - `sjmercury`: San Jose Mercury News (mercurynews.com) - `latimes`: Los Angeles Times (latimes.com) - `wired`: WIRED (wired.com) - `scientificamerican`: Scientific American (scientificamerican.com) **Headers:** - `Authorization`: Bearer {api_key} - Captain API key for authentication - `X-Organization-ID`: Organization UUID **Query Parameters:** - `q`: Search query (required) - `limit`: Maximum results to return (default: 10, max: 100) **Returns:** List of search results with title, URL, snippet, and date. **Example:** ``` GET /v2/datasets/nytimes/search?q=artificial+intelligence&limit=5 ```

Path parameters

datasetstringRequired
The news dataset to search

Query parameters

qstringRequired
Search query
limitintegerOptional1-100Defaults to 10
Maximum number of results to return
authorstring or nullOptional

Filter by author/byline name (appended as quoted phrase to search)

Response

Successful Response
datasetstring
querystring
errorstring or null
Error message if search failed
limitintegerDefaults to 10
resultslist of objects
total_resultsintegerDefaults to 0

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error
502
Bad Gateway Error
503
Service Unavailable Error
504
Gateway Timeout Error