YouTube search via API

Use your API key and team_id to search teams, videos, and transcripts—and to add or scan YouTube videos.

Before you start

  • You need a Pro account for endpoints 4–12 (search, videos, add, scan).
  • Create a team in the app (and optionally tag it).
  • Use your personal API key in the request header: Authorization: Bearer YOUR_API_KEY.
  • Where an endpoint asks for team_id, send the ID of a team you belong to.

Base URL for all endpoints below: https://trends.smartestcrowd.com/api/v1 (for YouTube-specific routes use /api/v1/youtube).

1. Get teams

List teams you belong to. No Pro required.

GET /api/v1/teams

Headers: Authorization: Bearer YOUR_API_KEY

2. Get tags used by teams

List all tags that are used by creator teams. Use this to discover tag_id and tag_slug for Search teams and Search in another language. Returns id, slug, name, team_count. Optional query: limit (default 100, max 500). No Pro required.

GET /api/v1/youtube/tags?limit=100

Headers: Authorization: Bearer YOUR_API_KEY

3. Get team tags

Tags for a single team. Returns id, title, count (integer).

GET /api/v1/youtube/teams/<team_id>/tags

4. Search teams

Pro. List creator teams by tag. Query: tag_id or tag_slug.

GET /api/v1/youtube/teams/search?tag_id=... or ?tag_slug=...

5. Get videos

Pro. List videos for a team. Each item: transcript (bool), opinions (count), topics (count), searchable (true if transcript is embedded).

GET /api/v1/youtube/teams/<team_id>/videos

6. Search a single video

Pro. Body: team_id, source_id, query, type (default opinions). type: opinions (opinions + topics), rag (vector matches), full (RAG + generated answer).

POST /api/v1/youtube/videos/search-one
{"team_id": "...", "source_id": "...", "query": "...", "type": "opinions"}

7. Search multiple videos

Pro. Body: team_id, source_ids (array), query, type (opinions | rag | full).

POST /api/v1/youtube/videos/search-multiple

8. Search all videos

Pro. Body: team_id, query, type: topics or full (RAG over all team transcripts).

POST /api/v1/youtube/videos/search-all

9. Search in another language

Pro. Body: team_id, tag_id, lang (language code), query. Query is translated to English, search runs, answer translated back.

POST /api/v1/youtube/search-language

10. Add video by URL

Pro. Body: team_id, url (YouTube video URL), optional guidance (if omitted, default extraction).

POST /api/v1/youtube/videos/add

11. Add N most recent YouTube videos

Pro. Body: team_id, videos (default 2), get_transcript, extract, embed_transcript (defaults false).

POST /api/v1/youtube/videos/add-recent

12. Scan most recent YouTube videos

Pro. Body: team_id, extract (default true), custom (text guidance for opinion/topic extraction), embed (default false; if true, embed transcripts).

POST /api/v1/youtube/videos/scan-recent

All POST bodies: Content-Type: application/json. Use your API key in Authorization: Bearer YOUR_API_KEY.