Skip to main content
GET
/
v1
/
raw
/
youtube
/
search
JavaScript
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);
{
  "data": {
    "query": "<string>",
    "estimated_results": 1,
    "results": [
      {
        "type": "<string>",
        "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>"
      }
    ],
    "scraped_at": "<string>"
  }
}

Authorizations

X-API-Key
string
header
required

Query Parameters

q
string
required

Search query

Required string length: 1 - 500
Example:

"fitness workout"

limit
integer
default:20

Maximum number of results to return

Required range: 1 <= x <= 50
Example:

20

country_code
string
default:US

Country code for localized results (ISO 3166-1 alpha-2)

Required string length: 2
Example:

"US"

language_code
string
default:en

Language code for results

Required string length: 2 - 5
Example:

"en"

Response

Successful response

data
object
required