Skip to content

feat(huntapi): add HuntAPI integration - #9835

Open
josselinlbe wants to merge 2 commits into
simstudioai:stagingfrom
huntapi:feat/huntapi-integration
Open

josselinlbe wants to merge 2 commits into
simstudioai:stagingfrom
huntapi:feat/huntapi-integration

Conversation

@josselinlbe

Copy link
Copy Markdown

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:

  • Download Video (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.
  • Download Audio (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.
  • Get Job (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 the x-api-key header. Every tool is an external ToolConfig.request against 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

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

  • Outputs follow the documented OpenAPI response schemas, and every tool was run against the live HuntAPI API through its request and transformResponse to confirm the mapped outputs; fields that the API documents as nullable are optional outputs.
  • Local gate on this branch: 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 existing blocks and tools/request-transport Vitest suites all pass.
  • Regenerated artifacts are committed: tool metadata, docs, block successors and the docs manifest.
  • No new unit tests, following the repo's testing guidance; the live run above is the end-to-end check.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

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.
@vercel

vercel Bot commented Nov 10, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Sim Team on Vercel.

A member of the Team first needs to authorize it.

@greptile-apps

greptile-apps Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect workflows that choose to use HuntAPI.

The single-consumer helper must move into get_job.ts before merging to satisfy the repository's explicit rule.

Findings

  1. P2 One mapping spans two files ▶

Summary

Adds HuntAPI video downloads, audio extraction, and job lookup.

  • HuntAPI tools start media jobs and return their results.
  • Builders can add HuntAPI blocks from the integration catalog.

Diagram

sequenceDiagram
  participant Workflow
  participant HuntAPI
  Workflow->>HuntAPI: Download Video or Download Audio
  HuntAPI-->>Workflow: jobId
  loop Check until completed
    Workflow->>HuntAPI: Get Job(jobId)
    HuntAPI-->>Workflow: status and progress
  end
  HuntAPI-->>Workflow: fileUrl and metadata
Loading

Reviews (1) · Last reviewed commit: "feat(huntapi): add HuntAPI integration" · Reviewed by Greptile

Comment thread apps/sim/tools/huntapi/utils.ts Outdated
import type { HuntApiMediaMetadata } from '@/tools/huntapi/types'

/** Reads a `HuntApiMediaMetadata` from an untyped HuntAPI API payload. */
export function mapHuntApiMediaMetadata(value: unknown): HuntApiMediaMetadata | null {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 One mapping spans two files

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

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant