Repository navigation
feat(huntapi): add HuntAPI integration - #9835
josselinlbe wants to merge 2 commits into
Conversation
Add a HuntAPI block for video and audio downloads: - Start downloading a public video in a chosen quality and format - Start extracting a video's audio track as MP3, M4A or WAV - Get a download job's status and, once complete, the file link with the video's title, duration, uploader and view counts Outputs follow the documented OpenAPI schemas and were checked against live responses. Credentials are a HuntAPI key sent in the x-api-key header.
|
Someone is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
[Medium impact] The changes affect workflows that choose to use HuntAPI. The single-consumer helper must move into Findings
SummaryAdds HuntAPI video downloads, audio extraction, and job lookup.
|
| import type { HuntApiMediaMetadata } from '@/tools/huntapi/types' | ||
|
|
||
| /** Reads a `HuntApiMediaMetadata` from an untyped HuntAPI API payload. */ | ||
| export function mapHuntApiMediaMetadata(value: unknown): HuntApiMediaMetadata | null { |
There was a problem hiding this comment.
mapHuntApiMediaMetadata has only one caller, in get_job.ts. The repository guide requires helpers with one consumer to stay inline and reserves shared utility files for multiple consumers. Move this helper into get_job.ts before merging to meet that requirement and avoid an extra file and import.
Context Used: CLAUDE.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
- Keep the media metadata mapper in get_job.ts, its only caller - Document the HuntApiIcon export - Read the operation from the mapper context so agent tools coerce Max Duration too
Summary
Adds a HuntAPI integration: tools, block, icon and generated docs page. I work on HuntAPI, so this PR comes from the HuntAPI team.
Start a download of a public video in a chosen quality and format, or extract its audio track, then check the job to get a link to the file with the video's title, duration, channel and view counts.
Operations:
huntapi_download_video): Start downloading a public video in a chosen quality and format. Returns a job ID; use Get Job to get the file link once the job completes.huntapi_download_audio): Start extracting the audio track of a public video as MP3 or another format. Returns a job ID; use Get Job to get the file link once the job completes.huntapi_get_job): Get a download job's status and progress and, once it completes, the link to the file with the video's metadata.Credentials are a HuntAPI API key on the block (
AuthMode.ApiKey), sent as thex-api-keyheader. Every tool is an externalToolConfig.requestagainst the HuntAPI API.Product update (if relevant)
Teams that work with video can transcribe, archive and analyze public videos from a workflow. The block appears in the integrations catalog with 7 templates and grounded skills; the docs page is
apps/docs/content/docs/integrations/huntapi.mdx.Type of Change
Testing
requestandtransformResponseto confirm the mapped outputs; fields that the API documents as nullable are optional outputs.bun run lint,bun run type-check,bun run check:audits(all 62 audits),bun run apps/sim/scripts/check-block-registry.ts origin/staging,bun run apps/sim/scripts/check-canvas-sentences.ts --block=huntapi, and the existingblocksandtools/request-transportVitest suites all pass.Checklist
Screenshots/Videos