Count matching events per craft
count_events_by_craftCount matching events per craft. How many events match a search, per top-level craft, for the 'Jump to a craft' chips. Takes the same filters as GET /api/events (q, type, tag, state, when or from+to, near or lat+lng, radius, free, online, inperson, tz) and counts with every one of them except craft, which is accepted and ignored, so each craft keeps its number while one is chosen. Child crafts count toward their top-level parent (needlepoint, cross-stitch and embroidery count as needlework), and an event counts once per top-level craft, so the crafts can add up to more than total, the distinct number of matching events. A craft's count equals the total GET /api/events reports for that craft=, with one known exception: with a text query (q), the typo-tolerant fallback applies only when a search has no exact text match, so it can apply to the all-crafts count but not to one craft's search (or the other way round) and the numbers can then differ. Only crafts with at least one match are listed, most first, then in taxonomy order. Location is never inferred from the caller's IP; a near that matches no US place is a 400. Answers 503 not_configured while the counts aren't available.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| q | No | ||
| to | No | ||
| tz | No | ||
| lat | No | ||
| lng | No | ||
| tag | No | ||
| free | No | ||
| from | No | ||
| near | No | ||
| sort | No | ||
| type | No | ||
| when | No | ||
| craft | No | ||
| state | No | ||
| online | No | ||
| radius | No | ||
| inperson | No |