curl --request GET \
--url https://api.influship.com/v1/raw/youtube/search \
--header 'X-API-Key: <api-key>'import Influship from 'influship';
const client = new Influship({
apiKey: process.env['INFLUSHIP_API_KEY'], // This is the default and can be omitted
});
const response = await client.raw.youtube.search({ q: 'fitness workout' });
console.log(response.data);import requests
url = "https://api.influship.com/v1/raw/youtube/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"query": "<string>",
"estimated_results": 1,
"results": [
{
"type": "video",
"video_id": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "<string>",
"description": "<string>",
"channel_id": "<string>",
"channel_name": "<string>",
"channel_handle": "<string>",
"channel_verified": true,
"thumbnail_url": "<string>",
"duration_seconds": 1,
"duration_text": "<string>",
"view_count": 1,
"view_count_text": "<string>",
"published_text": "<string>",
"published_at": "<string>"
}
],
"next_cursor": "<string>",
"scraped_at": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "Invalid value for parameter 'limit': must be between 1 and 100",
"param": "limit",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "unauthorized",
"message": "API key missing or invalid",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "payment_required",
"message": "Payment authentication is required.",
"status_code": 402,
"reason_code": "PAYMENT_ACTION_REQUIRED",
"next_step": "complete_authentication",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden",
"message": "Your plan does not include access to this endpoint",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded (per minute)",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred. Please try again later.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "upstream_contract_broken",
"message": "The upstream source returned data this endpoint cannot process. This is not retryable; it has been reported.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"details": {
"upstream_error": "upstream_contract_broken",
"retryable": false
}
}
}{
"error": {
"code": "service_unavailable",
"message": "Live Instagram data is temporarily unavailable. Please retry shortly.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"details": {
"retry_after_seconds": 60,
"upstream_error": "upstream_rate_limited"
}
}
}Search YouTube
Search YouTube videos and channels.
Each request fetches one page. Pass next_cursor back as cursor to fetch and bill the next page.
Availability: When live data is temporarily unavailable this endpoint returns 503 with error.code: service_unavailable in the standard error envelope. Honor Retry-After when present and retry with bounded backoff; you are not charged for 503 responses.
Pricing: 0.5 credits per fetched page ($0.005)
curl --request GET \
--url https://api.influship.com/v1/raw/youtube/search \
--header 'X-API-Key: <api-key>'import Influship from 'influship';
const client = new Influship({
apiKey: process.env['INFLUSHIP_API_KEY'], // This is the default and can be omitted
});
const response = await client.raw.youtube.search({ q: 'fitness workout' });
console.log(response.data);import requests
url = "https://api.influship.com/v1/raw/youtube/search"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"query": "<string>",
"estimated_results": 1,
"results": [
{
"type": "video",
"video_id": "dQw4w9WgXcQ",
"url": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"title": "<string>",
"description": "<string>",
"channel_id": "<string>",
"channel_name": "<string>",
"channel_handle": "<string>",
"channel_verified": true,
"thumbnail_url": "<string>",
"duration_seconds": 1,
"duration_text": "<string>",
"view_count": 1,
"view_count_text": "<string>",
"published_text": "<string>",
"published_at": "<string>"
}
],
"next_cursor": "<string>",
"scraped_at": "<string>"
}
}{
"error": {
"code": "validation_error",
"message": "Invalid value for parameter 'limit': must be between 1 and 100",
"param": "limit",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "unauthorized",
"message": "API key missing or invalid",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "payment_required",
"message": "Payment authentication is required.",
"status_code": 402,
"reason_code": "PAYMENT_ACTION_REQUIRED",
"next_step": "complete_authentication",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "forbidden",
"message": "Your plan does not include access to this endpoint",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "Rate limit exceeded (per minute)",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "internal_error",
"message": "An unexpected error occurred. Please try again later.",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "upstream_contract_broken",
"message": "The upstream source returned data this endpoint cannot process. This is not retryable; it has been reported.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"details": {
"upstream_error": "upstream_contract_broken",
"retryable": false
}
}
}{
"error": {
"code": "service_unavailable",
"message": "Live Instagram data is temporarily unavailable. Please retry shortly.",
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"details": {
"retry_after_seconds": 60,
"upstream_error": "upstream_rate_limited"
}
}
}Authorizations
Query Parameters
Search query
1 - 500"fitness workout"
Maximum number of results to return
1 <= x <= 5020
Country code for localized results (ISO 3166-1 alpha-2)
2"US"
Language code for results
2 - 5"en"
Only return results uploaded within the selected window
any, last_hour, today, this_week, this_month, this_year "this_week"
Order results by relevance or view popularity
relevance, popular "popular"
Return all result types or only videos
all, videos "videos"
Filter videos by YouTube duration band
any, short, medium, long "long"
Opaque cursor from next_cursor to fetch the next result page
1 - 4000Response
Successful response
Show child attributes
Show child attributes