Library & research
Workspace library files, web research, podcast search and insertion-order parsing.
List library files
/v1/library/filesFiles in the workspace library, newest upload first: filename, type, size, parse status, whether extracted text is available and a short preview.
SDKlistener.library.files.list()client.library.files.list()
Query parameters
- Page size, 1–100 (default 25).
limitintegerDefault
25 - Opaque cursor from the previous page's next_cursor.
cursorstring
Returns
200OK
objectstringrequiredurlstringrequireddataarray of objectsrequiredShow child attributesHide child attributes
has_morebooleanrequired- Pass as
next_cursorstringrequiredcursorto get the next page; null on the last page. - The result's non-list fields (window, coverage, freshness, totals, note …).
metaobjectrequiredShow child attributesHide child attributes
Errors
400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error
Retrieve a library file
/v1/library/files/{file_id}One library file: metadata, extracted text (up to 12,000 characters), the structured summary when one exists and a 1-hour signed download URL. include_text=false returns metadata and the link only.
SDKlistener.library.files.retrieve()client.library.files.retrieve()
Path parameters
- Library file id (see GET /v1/library/files).
file_idstringrequired
Query parameters
include_textbooleanDefault
true
Returns
200OK
idstringrequiredfilenamestringrequiredcomputed_atstringrequiredcache_age_secondsnumberrequiredobjectstringrequiredmedia_typestringDefault
"application/octet-stream"size_bytesintegerDefault
0detected_kindstringDefault
"unknown"is_text_likebooleanDefault
falseparse_statusstringDefault
"unknown"parse_warningsarray of stringsstatusstringDefault
"ready"uploaded_atstringuploaded_by_uidstringhas_extracted_textbooleanDefault
false- Length of the stored extracted text (before the 12,000-character cap).
extracted_text_charsintegerDefault
0 has_structured_summarybooleanDefault
false- First ~280 characters of the stored preview text.
previewstring - Stored extracted text, capped at 12,000 characters.
extracted_textstring extracted_text_truncatedbooleanDefault
falsestructured_summarystringstorage_pathstring- Signed GET URL (1 h) when the Storage bucket is configured.
download_urlstring download_url_expires_atstringnotestring
Errors
400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error
Web research
/v1/research/webSearch the public web and return titles, URLs and snippets plus a short summary of the top hits, for context outside Listener (a brand's news, a competitor's show). configured=false with a note when search is not set up on this server, never an error.
SDKlistener.research.web()client.research.web()
Query parameters
- Search text.
querystringrequired max_resultsintegerDefault
5
Returns
200OK
querystringrequiredconfiguredbooleanrequiredcomputed_atstringrequiredcache_age_secondsnumberrequiredobjectstringrequiredsummarystringsourcesarray of objectsShow child attributesHide child attributes
total_resultsintegernotestring
Errors
400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error
Search podcasts
/v1/podcasts/searchSearch podcasts outside the workspace (prospects, competitors, a guest's own show) by name or keyword: title, publisher, artwork, categories, episode count, Apple / Spotify ids and RSS URL. configured=false with a note when the search provider is not configured.
SDKlistener.podcasts.search()client.podcasts.search()
Query parameters
- Search text.
querystringrequired - Maximum number of items to return.
limitintegerDefault
10
Returns
200OK
objectstringrequiredurlstringrequireddataarray of objectsrequiredShow child attributesHide child attributes
has_morebooleanrequired- Pass as
next_cursorstringrequiredcursorto get the next page; null on the last page. - The result's non-list fields (window, coverage, freshness, totals, note …).
metaobjectrequiredShow child attributesHide child attributes
Errors
400parameter_invalid401credential_invalid403scope_missing404resource_not_found429rate_limited500internal_error
Parse an insertion order
/v1/insertion-orders/parseRead a PDF insertion order and return the extracted order, line items matched to workspace shows, rows that could not be matched, and ready-to-use proposed_create_campaign_args for POST /v1/campaigns. Writes nothing. Send exactly one source: library_file_id (from GET /v1/library/files), file_url (https, up to 4 MB) or file_base64 (upload_id refers to a file attached in Listener's agent chat). show_ids narrows show matching. Review unresolved_line_items before creating the campaign; never guess a show or impressions.
SDKlistener.insertionOrders.parse()client.insertion_orders.parse()
Headers
- Any unique string (≤ 255 chars). Replays within 24 h return the stored response with Idempotent-Replayed: true.
Idempotency-Keystring
Request body
application/jsonupload_idstringlibrary_file_idstringfile_urlstringfile_base64stringfile_namestring- Limit to these show ids (default: every show in the workspace).
show_idsarray of strings
Returns
200OK
- False when this server cannot reach the app's extractor (internal key / app URL missing); nothing was parsed.
configuredbooleanrequired computed_atstringrequiredcache_age_secondsnumberrequiredobjectstringrequiredokbooleanDefault
truesourceobjectShow child attributesHide child attributes
- The extracted InsertionOrder (ioNumber, advertiser, flight, lineItems[], confidence, sourceQuotes …).
ioobject - The app's CampaignPlan as returned (camelCase); proposed_create_campaign_args is the same plan in
planobjectPOST /v1/campaigns's shape. - Exactly the argument names `
proposed_create_campaign_argsobjectPOST /v1/campaigns` accepts, ready to pass through.Show child attributesHide child attributes
- Line items whose show could not be matched to a workspace show; ask the user, never guess.
unresolved_line_itemsarray of objectsShow child attributesHide child attributes
warningsarray of strings- The extraction model the app used.
modelstring notestring
Errors
400parameter_invalid401credential_invalid403scope_missing404resource_not_found409confirmation_required413body_too_large429rate_limited500internal_error