Skip to content

Commit 5831ec0

Browse files
author
Josselin Liebe
committed
feat(huntapi): add HuntAPI integration
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.
1 parent 61843fe commit 5831ec0

23 files changed

Lines changed: 1004 additions & 7 deletions

File tree

‎apps/docs/components/icons.tsx‎

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10459,3 +10459,42 @@ export function PlaneIcon(props: SVGProps<SVGSVGElement>) {
1045910459
</svg>
1046010460
)
1046110461
}
10462+
10463+
export function HuntApiIcon(props: SVGProps<SVGSVGElement>) {
10464+
return (
10465+
<svg viewBox='-0.3 1.7 20.6 20.6' fill='none' xmlns='http://www.w3.org/2000/svg' {...props}>
10466+
<title>HuntAPI</title>
10467+
<g clipPath='url(#huntapi-clip0_78_1795)'>
10468+
<path
10469+
d='M12.544 2.527L10.578 2L8.921 8.185L7.424 2.601L5.458 3.128L7.074 9.161L3.048 5.135L1.608 6.574L6.025 10.991L0.525 9.517L-0.002 11.483L6.007 13.094C5.939 12.797 5.902 12.488 5.902 12.17C5.902 9.921 7.725 8.098 9.974 8.098C12.223 8.098 14.046 9.921 14.046 12.17C14.046 12.486 14.01 12.793 13.942 13.088L19.403 14.551L19.93 12.585L13.897 10.968L19.397 9.494L18.87 7.528L12.837 9.144L16.864 5.118L15.424 3.678L11.069 8.034L12.544 2.527Z'
10470+
fill='#6BB666'
10471+
/>
10472+
<path
10473+
d='M13.936 13.111C13.768 13.823 13.412 14.464 12.923 14.977L16.88 18.933L18.319 17.494L13.936 13.111Z'
10474+
fill='#6BB666'
10475+
/>
10476+
<path
10477+
d='M12.883 15.018C12.389 15.523 11.764 15.9 11.064 16.094L12.504 21.467L14.47 20.94L12.883 15.018Z'
10478+
fill='#6BB666'
10479+
/>
10480+
<path
10481+
d='M10.99 16.114C10.665 16.197 10.325 16.242 9.974 16.242C9.598 16.242 9.233 16.191 8.888 16.095L7.447 21.473L9.413 22L10.99 16.114Z'
10482+
fill='#6BB666'
10483+
/>
10484+
<path
10485+
d='M8.818 16.075C8.128 15.872 7.515 15.49 7.03 14.984L3.064 18.95L4.504 20.39L8.818 16.075Z'
10486+
fill='#6BB666'
10487+
/>
10488+
<path
10489+
d='M6.998 14.949C6.522 14.439 6.175 13.807 6.01 13.105L0.531 14.574L1.058 16.54L6.998 14.949Z'
10490+
fill='#6BB666'
10491+
/>
10492+
</g>
10493+
<defs>
10494+
<clipPath id='huntapi-clip0_78_1795'>
10495+
<rect width='20' height='24' fill='white' />
10496+
</clipPath>
10497+
</defs>
10498+
</svg>
10499+
)
10500+
}

‎apps/docs/components/ui/icon-mapping.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ import {
145145
HubspotIcon,
146146
HuggingFaceIcon,
147147
HumanInTheLoopIcon,
148+
HuntApiIcon,
148149
HunterIOIcon,
149150
IAMIcon,
150151
IcypeasIcon,
@@ -483,6 +484,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
483484
huggingface: HuggingFaceIcon,
484485
human_in_the_loop: HumanInTheLoopIcon,
485486
human_in_the_loop_v2: HumanInTheLoopIcon,
487+
huntapi: HuntApiIcon,
486488
hunter: HunterIOIcon,
487489
iam: IAMIcon,
488490
icypeas: IcypeasIcon,
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
---
2+
title: HuntAPI
3+
description: Download videos and audio from public video URLs
4+
integration:
5+
type: "huntapi"
6+
color: "#FFFFFF"
7+
---
8+
9+
import { ReferenceDetails } from "@/components/ui/reference-details"
10+
11+
12+
{/* MANUAL-CONTENT-START:intro */}
13+
[HuntAPI](https://www.huntapi.com/) downloads video and audio from public video URLs, with the video's metadata.
14+
15+
With the HuntAPI block, you can:
16+
17+
- **Download videos**: start a download in a chosen quality and format, with or without sound
18+
- **Extract audio**: start extracting a video's audio track as MP3, M4A or WAV
19+
- **Get the file**: check a download job and, once it completes, get the link to the file with the video's title, duration, uploader and view counts
20+
21+
Downloads run as jobs: Download Video and Download Audio return a job ID, and Get Job returns the file link once the job's status is CompletedJob.
22+
23+
Create an API key in the [HuntAPI dashboard](https://app.huntapi.com/) and paste it into the block.
24+
25+
In Sim, the HuntAPI block lets your agents transcribe videos, archive content and collect video metadata.
26+
{/* MANUAL-CONTENT-END */}
27+
28+
## Use the block [#usage-instructions]
29+
30+
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.
31+
32+
## Actions
33+
34+
### HuntAPI Download Video
35+
36+
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.
37+
38+
<ReferenceDetails>
39+
40+
#### Input
41+
42+
| Parameter | Type | Required | Description |
43+
| --------- | ---- | -------- | ----------- |
44+
| `url` | string | Yes | URL of the public video \(e.g., "https://www.youtube.com/watch?v=jNQXAC9IVRw") |
45+
| `videoQuality` | string | No | Quality: best, 1080p, 720p, 480p or 360p \(defaults to "best"\); videos over an hour are capped at 720p |
46+
| `videoFormat` | string | No | Preferred format: mp4, webm or mkv \(defaults to "mp4"\) |
47+
| `downloadType` | string | No | audio_video for the video with sound, video for the picture only \(defaults to "audio_video"\) |
48+
| `maxDuration` | number | No | Maximum duration in seconds; longer content is cut at this length |
49+
| `apiKey` | string | Yes | HuntAPI API key |
50+
51+
#### Output
52+
53+
| Parameter | Type | Description |
54+
| --------- | ---- | ----------- |
55+
| `jobId` | string | ID of the download job, to pass to Get Job |
56+
57+
</ReferenceDetails>
58+
59+
### HuntAPI Download Audio
60+
61+
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.
62+
63+
<ReferenceDetails>
64+
65+
#### Input
66+
67+
| Parameter | Type | Required | Description |
68+
| --------- | ---- | -------- | ----------- |
69+
| `url` | string | Yes | URL of the public video \(e.g., "https://www.youtube.com/watch?v=jNQXAC9IVRw") |
70+
| `audioQuality` | string | No | Quality: best, 320kbps, 256kbps or 128kbps \(defaults to "best"\) |
71+
| `audioFormat` | string | No | Preferred format: mp3, m4a or wav \(defaults to "mp3"\) |
72+
| `maxDuration` | number | No | Maximum duration in seconds; longer content is cut at this length |
73+
| `apiKey` | string | Yes | HuntAPI API key |
74+
75+
#### Output
76+
77+
| Parameter | Type | Description |
78+
| --------- | ---- | ----------- |
79+
| `jobId` | string | ID of the download job, to pass to Get Job |
80+
81+
</ReferenceDetails>
82+
83+
### HuntAPI Get Job
84+
85+
Get a download job's status and progress and, once it completes, the link to the file with the video's metadata.
86+
87+
<ReferenceDetails>
88+
89+
#### Input
90+
91+
| Parameter | Type | Required | Description |
92+
| --------- | ---- | -------- | ----------- |
93+
| `jobId` | string | Yes | The job ID returned by Download Video or Download Audio |
94+
| `apiKey` | string | Yes | HuntAPI API key |
95+
96+
#### Output
97+
98+
| Parameter | Type | Description |
99+
| --------- | ---- | ----------- |
100+
| `jobId` | string | ID of the download job |
101+
| `status` | string | Status of the job, CompletedJob once the file is ready |
102+
| `progress` | number | Progress of the job, from 0 to 100 |
103+
| `fileUrl` | string | Link to the downloaded file, once the job completes |
104+
| `createdAt` | string | When the job was created |
105+
| `completedAt` | string | When the job completed |
106+
| `durationMs` | number | Time the job took, in milliseconds |
107+
| `metadata` | object | Metadata of the video, once the job completes |
108+
| ↳ `title` | string | Title of the video |
109+
| ↳ `description` | string | Description of the video |
110+
| ↳ `duration` | number | Duration of the video in seconds |
111+
| ↳ `extension` | string | File extension of the download |
112+
| ↳ `thumbnail` | string | URL of the video thumbnail |
113+
| ↳ `uploader` | string | Name of the uploader |
114+
| ↳ `uploaderUrl` | string | URL of the uploader's page |
115+
| ↳ `viewCount` | number | Number of views |
116+
| ↳ `likeCount` | number | Number of likes |
117+
| ↳ `commentCount` | number | Number of comments |
118+
| ↳ `uploadDate` | number | Upload date as a Unix timestamp in seconds |
119+
| ↳ `webpageUrl` | string | URL of the video page |
120+
121+
</ReferenceDetails>
122+
123+

‎apps/docs/content/docs/integrations/meta.json‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
"hubspot-service-account",
129129
"hubspot-setup",
130130
"huggingface",
131+
"huntapi",
131132
"hunter",
132133
"iam",
133134
"icypeas",

0 commit comments

Comments
 (0)