ngrams-dev / general

NGRAMS is a search engine for the Google Books Ngram Dataset. This repository contains documentation, discussions, announcements, and issues.
https://ngrams.dev
14 stars 0 forks source link

Add endpoint to fetch year-based match counts by ngram text #2

Open mtrenkmann opened 1 year ago

mtrenkmann commented 1 year ago

Fetching year-based match counts is currently a two-step process:

  1. Send a search request and get a list of matching lite ngrams (including ngram IDs).
  2. Send an ngram ID in an ngram request and get the corresponding full ngram with year-based stats.

This feature request proposes to support this use case in a one-step process by introducing a new endpoint like:

GET {base_url}/{corpus}/get?ngram={ngram_text}&flags={flags}