{"openapi":"3.2.0","info":{"title":"LinkedIn Ad Library API","description":"Access LinkedIn’s public ad library data programmatically from the LinkedIn Ad Library, allowing you to search ads by company, keyword, date or country and retrieve detailed ad creatives, formats, and run dates.","version":"1.0.0"},"servers":[{"url":"https://linkedin-ad-scraper.jojapi.net"}],"security":[{"ApiKeyAuth":[]}],"x-agent-commerce":{"catalog_url":"https://linkedin-ad-scraper.jojapi.net/_jojapi/agent/plans","discovery_url":"https://linkedin-ad-scraper.jojapi.net/.well-known/x402","directory_url":"https://agents.jojapi.net/apis/linkedin-ad-library-api","docs":"https://docs.jojapi.com/consumers/agents"},"paths":{"/ads/search":{"post":{"operationId":"post_ads_search","summary":"Search Ads","description":"Search for ads based on provided criteria.\n \nAccepts search parameters in the body and returns matching ads with extracted IDs.","responses":{"200":{"description":"Search results","content":{"application/json":{"schema":{"type":"object","properties":{"ads":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"}}}},"isLastPage":{"type":"boolean"},"paginationToken":{"type":"string"}}},"examples":{"New-Example":{"summary":"New Example","value":{"ads":[{"url":"https://www.linkedin.com/ad-library/detail/971486723"},{"url":"https://www.linkedin.com/ad-library/detail/971602313"},{"url":"https://www.linkedin.com/ad-library/detail/971602233"},{"url":"https://www.linkedin.com/ad-library/detail/971654423"},{"url":"https://www.linkedin.com/ad-library/detail/971572633"},{"url":"https://www.linkedin.com/ad-library/detail/971833193"},{"url":"https://www.linkedin.com/ad-library/detail/971823323"},{"url":"https://www.linkedin.com/ad-library/detail/971784383"},{"url":"https://www.linkedin.com/ad-library/detail/971585653"},{"url":"https://www.linkedin.com/ad-library/detail/971504093"},{"url":"https://www.linkedin.com/ad-library/detail/971484293"},{"url":"https://www.linkedin.com/ad-library/detail/971513523"},{"url":"https://www.linkedin.com/ad-library/detail/971525563"},{"url":"https://www.linkedin.com/ad-library/detail/971525473"},{"url":"https://www.linkedin.com/ad-library/detail/971803983"},{"url":"https://www.linkedin.com/ad-library/detail/971464673"},{"url":"https://www.linkedin.com/ad-library/detail/971464683"},{"url":"https://www.linkedin.com/ad-library/detail/971535593"},{"url":"https://www.linkedin.com/ad-library/detail/971467653"},{"url":"https://www.linkedin.com/ad-library/detail/971464523"},{"url":"https://www.linkedin.com/ad-library/detail/971631633"},{"url":"https://www.linkedin.com/ad-library/detail/971614403"},{"url":"https://www.linkedin.com/ad-library/detail/971466733"},{"url":"https://www.linkedin.com/ad-library/detail/971533063"}],"isLastPage":false,"paginationToken":"97-178"}}}}}},"402":{"description":"Payment required — pay per request with x402/mpp (offer in the PAYMENT-REQUIRED / WWW-Authenticate headers and the JSON body), or send a JoJ API key."}},"x-payment-info":{"protocols":["x402","mpp"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"intent":"charge"},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"keyword":{"type":"string"},"accountOwner":{"type":"string"},"countries":{"type":"array","items":{"type":"string","enum":["AD","AE","AF","AG","AI","AL","AM","AN","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BM","BN","BO","BR","BS","BT","BV","BW","BY","BZ","CA","CB","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CS","CU","CV","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","GB","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KO","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TP","TR","TT","TV","TW","TZ","UA","UG","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","YE","YT","YU","ZA","ZM","ZW"]}},"dateOption":{"type":"string","enum":["last-30-days","current-month","current-year","last-year","custom-date-range"]},"startDate":{"type":"string","format":"date"},"endDate":{"type":"string","format":"date"},"paginationToken":{"type":"string"}},"additionalProperties":false},"example":{"keyword":"jetbrains","accountOwner":"jetbrains","countries":["US"],"dateOption":"custom-date-range","startDate":"2025-12-05","endDate":"2025-12-06","paginationToken":"token"}}}}}},"/ads/{id}":{"get":{"operationId":"get_ads_id","summary":"Get Ad by ID","description":"Retrieve ad details by Ad ID.\n\nFetches the full details for a specific ad using its numeric ID.","responses":{"200":{"description":"Ad details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string"},"format":{"type":"string"},"advertiser":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"logo":{"type":"string"}}},"title":{"type":"string"},"body":{"type":"string"},"buttons":{"type":"array","items":{"type":"string"}},"impressions":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"impressions":{"type":"string"},"estimatedMin":{"type":"integer"},"estimatedMax":{"type":"integer"}}}},"totalImpression":{"type":"object","properties":{"raw":{"type":"string"},"estimatedMin":{"type":"integer"},"estimatedMax":{"type":"integer"}}},"period":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}}},"targetingSettings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"value":{"type":"string"}}}},"imageUrls":{"type":"array"},"videoUrls":{"type":"array","items":{"type":"string"}},"paidBy":{"type":"string"},"clickUrl":{"type":"string"},"event":{"type":"null"}}},"examples":{"New-Example":{"summary":"New Example","value":{"id":1001277563,"url":"https://www.linkedin.com/ad-library/detail/1001277563","format":"VIDEO_AD","advertiser":{"name":"JN","url":"https://www.linkedin.com/company/1211515?trk=ad_library_ad_preview_advertiser","logo":"https://media.licdn.com/dms/image/v2/D4E0BAfasdQFIxLcCtbdBEw/company-logo_100_100/company-logo_100_100/0/17151123703491195/jetbrains_logo?e=17663213620800&v=beta&t=XDs3I_n1d7H-OVKK04h_LdRL_-9vWNsxaweWD9euBm9Zw"},"title":"Junie,","body":"Trusted and reliable AI agent","buttons":["Learn more"],"impressions":[{"country":"Poland","impressions":"10000-50000","estimatedMin":10000,"estimatedMax":50000},{"country":"Belarus","impressions":"100-500","estimatedMin":100,"estimatedMax":500},{"country":"Brazil","impressions":"100-500","estimatedMin":100,"estimatedMax":500},{"country":"Switzerland","impressions":"100-500","estimatedMin":100,"estimatedMax":500}],"totalImpression":{"raw":"10k-50k","estimatedMin":10000,"estimatedMax":50000},"period":{"start":"2025-10-20","end":"2025-11-10"},"targetingSettings":[{"target":"Language","value":"Targeting includes English"},{"target":"Location","value":"Targeting includes Poland"},{"target":"Audience","value":"Exclusion targeting applied"}],"imageUrls":[],"videoUrls":["https://dms.licdn.com/playlist/vid/v2/D4D10AdsfdsQEy0ZuHsvV-EA/mp4-360p-30fp-crf28/B4DZoBk.alKQCQ-/0/176096303268879/JB_External_Main_Video_ENG_subsmp4?e=214748323647&v=beta&t=dwvnJP6GrPI6r9Ufsda9bZSyRePWdr9f_xkHt0fdsafgTKE2gcOk"],"paidBy":"JN","clickUrl":"https://www.jn.com/junie/t","event":null}}}}}},"402":{"description":"Payment required — pay per request with x402/mpp (offer in the PAYMENT-REQUIRED / WWW-Authenticate headers and the JSON body), or send a JoJ API key."}},"x-payment-info":{"protocols":["x402","mpp"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"intent":"charge"},"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"number","example":971486723}}]}},"/ads/by-url":{"get":{"operationId":"get_ads_by_url","summary":"Get Ad by URL","description":"Retrieve ad details using the LinkedIn Ad Library URL.\n\nValidates the URL, extracts the ID, and fetches the ad details.","responses":{"200":{"description":"Ad details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"url":{"type":"string"},"format":{"type":"string"},"advertiser":{"type":"object","properties":{"name":{"type":"string"},"url":{"type":"string"},"logo":{"type":"string"}}},"title":{"type":"string"},"body":{"type":"string"},"buttons":{"type":"array","items":{"type":"string"}},"impressions":{"type":"array","items":{"type":"object","properties":{"country":{"type":"string"},"impressions":{"type":"string"},"estimatedMin":{"type":"integer"},"estimatedMax":{"type":"integer"}}}},"totalImpression":{"type":"object","properties":{"raw":{"type":"string"},"estimatedMin":{"type":"integer"},"estimatedMax":{"type":"integer"}}},"period":{"type":"object","properties":{"start":{"type":"string"},"end":{"type":"string"}}},"targetingSettings":{"type":"array","items":{"type":"object","properties":{"target":{"type":"string"},"value":{"type":"string"}}}},"imageUrls":{"type":"array"},"videoUrls":{"type":"array","items":{"type":"string"}},"paidBy":{"type":"string"},"clickUrl":{"type":"string"},"event":{"type":"null"}}},"examples":{"New-Example":{"summary":"New Example","value":{"id":1001277563,"url":"https://www.linkedin.com/ad-library/detail/1001277563","format":"VIDEO_AD","advertiser":{"name":"JN","url":"https://www.linkedin.com/company/1211515?trk=ad_library_ad_preview_advertiser","logo":"https://media.licdn.com/dms/image/v2/D4E0BAfasdQFIxLcCtbdBEw/company-logo_100_100/company-logo_100_100/0/17151123703491195/jetbrains_logo?e=17663213620800&v=beta&t=XDs3I_n1d7H-OVKK04h_LdRL_-9vWNsxaweWD9euBm9Zw"},"title":"Junie,","body":"Trusted and reliable AI agent","buttons":["Learn more"],"impressions":[{"country":"Poland","impressions":"10000-50000","estimatedMin":10000,"estimatedMax":50000},{"country":"Belarus","impressions":"100-500","estimatedMin":100,"estimatedMax":500},{"country":"Brazil","impressions":"100-500","estimatedMin":100,"estimatedMax":500},{"country":"Switzerland","impressions":"100-500","estimatedMin":100,"estimatedMax":500}],"totalImpression":{"raw":"10k-50k","estimatedMin":10000,"estimatedMax":50000},"period":{"start":"2025-10-20","end":"2025-11-10"},"targetingSettings":[{"target":"Language","value":"Targeting includes English"},{"target":"Location","value":"Targeting includes Poland"},{"target":"Audience","value":"Exclusion targeting applied"}],"imageUrls":[],"videoUrls":["https://dms.licdn.com/playlist/vid/v2/D4D10AdsfdsQEy0ZuHsvV-EA/mp4-360p-30fp-crf28/B4DZoBk.alKQCQ-/0/176096303268879/JB_External_Main_Video_ENG_subsmp4?e=214748323647&v=beta&t=dwvnJP6GrPI6r9Ufsda9bZSyRePWdr9f_xkHt0fdsafgTKE2gcOk"],"paidBy":"JN","clickUrl":"https://www.jn.com/junie/t","event":null}}}}}},"402":{"description":"Payment required — pay per request with x402/mpp (offer in the PAYMENT-REQUIRED / WWW-Authenticate headers and the JSON body), or send a JoJ API key."}},"x-payment-info":{"protocols":["x402","mpp"],"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"intent":"charge"},"parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string","example":"https://www.linkedin.com/ad-library/detail/971486723","default":"https://www.linkedin.com/ad-library/detail/127756311"}}]}}},"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-JoJAPI-Key","description":"Your JoJ API key."}}}}