External API filter contract drift
HN Algolia API numericFilters points not filterable
Do not put `points` in Hacker News Algolia `numericFilters` when the API rejects that attribute as non-filterable. Filter by supported fields in the request, then apply the points threshold locally if needed.
Agent Quick Fix
const params = new URLSearchParams({
tags: "story",
query: "AI agents",
numericFilters: "created_at_i>1718750000"
});
const res = await fetch(`https://hn.algolia.com/api/v1/search?${params}`);
const data = await res.json();
const highPointStories = data.hits.filter((story) => Number(story.points || 0) > 100);
Symptom
The API rejects `numericFilters=created_at_i>...,points>100` with an error that `points` is not filterable.
Why This Happens
The local integration is syntactically plausible, but the provider controls which fields are filterable. That contract can differ from the fields returned in search results.
Codex Search Keywords
HN Algolia API numericFilters points not filterable
hn.algolia.com/api documentation numericFilters points
https://hn.algolia.com/api/v1/search?tags=story&numericFilters=created_at_i%3E1718750000%2Cpoints%3E100&query=AI%20agents
https://hn.algolia.com/api/v1/search?tags=story&numericFilters=created_at_i%3E1718750000&query=AI%20agents