{"html_url": "https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886140431", "issue_url": "https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2", "id": 886140431, "node_id": "IC_kwDODtX3eM400W4P", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-07-25T03:12:57Z", "updated_at": "2021-07-25T03:12:57Z", "author_association": "MEMBER", "body": "I'm going to build a general-purpose `hacker-new-to-sqlite search ...` command, where one of the options is to search within the URL.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 952179830, "label": "Command for fetching Hacker News threads from the search API"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886136224", "issue_url": "https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2", "id": 886136224, "node_id": "IC_kwDODtX3eM400V2g", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-07-25T02:08:29Z", "updated_at": "2021-07-25T02:08:29Z", "author_association": "MEMBER", "body": "Prototype:\r\n\r\n curl \"https://hn.algolia.com/api/v1/search_by_date?query=simonwillison.net&restrictSearchableAttributes=url&hitsPerPage=1000\" | \\\r\n jq .hits | sqlite-utils insert hn.db items - --pk objectID --alter", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 952179830, "label": "Command for fetching Hacker News threads from the search API"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886135922", "issue_url": "https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2", "id": 886135922, "node_id": "IC_kwDODtX3eM400Vxy", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-07-25T02:06:20Z", "updated_at": "2021-07-25T02:06:20Z", "author_association": "MEMBER", "body": "https://hn.algolia.com/api/v1/search_by_date?query=simonwillison.net&restrictSearchableAttributes=url looks like it does what I want.\r\n\r\nhttps://hn.algolia.com/api/v1/search_by_date?query=simonwillison.net&restrictSearchableAttributes=url&hitsPerPage=1000 - returns 1000 at once.\r\n\r\nOtherwise you have to paginate using `&page=2` etc - up to `nbPages` pages.\r\n\r\nhttps://www.algolia.com/doc/api-reference/api-parameters/hitsPerPage/ says 1000 is the maximum.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 952179830, "label": "Command for fetching Hacker News threads from the search API"}, "performed_via_github_app": null} {"html_url": "https://github.com/dogsheep/hacker-news-to-sqlite/issues/2#issuecomment-886135562", "issue_url": "https://api.github.com/repos/dogsheep/hacker-news-to-sqlite/issues/2", "id": 886135562, "node_id": "IC_kwDODtX3eM400VsK", "user": {"value": 9599, "label": "simonw"}, "created_at": "2021-07-25T02:01:11Z", "updated_at": "2021-07-25T02:01:11Z", "author_association": "MEMBER", "body": "That page doesn't have an API but does look easy to scrape.\r\n\r\nThe other option here is the HN Search API powered by Algolia, documented at https://hn.algolia.com/api", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 952179830, "label": "Command for fetching Hacker News threads from the search API"}, "performed_via_github_app": null}