{"openapi":"3.1.0","info":{"title":"Pitch the Plug API","version":"1.0.0","description":"Give us a brand, get back the people who run influencer marketing there, with verified emails. Recently searched brands answer instantly (200). New brands start a live search (202) that you poll for about a minute.","contact":{"email":"neilmagnuson11@gmail.com","url":"https://pitchtheplug.com/developers/docs"}},"servers":[{"url":"https://app.pitchtheplug.com/v1"}],"security":[{"bearerAuth":[]}],"paths":{"/contacts":{"post":{"operationId":"findContacts","summary":"Find the influencer-marketing contacts at a brand","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brand":{"type":"string","description":"Brand name, e.g. Glossier.","minLength":2,"maxLength":120},"domain":{"type":"string","description":"Brand website, e.g. glossier.com. A full URL is fine."}},"anyOf":[{"required":["brand"]},{"required":["domain"]}]},"example":{"brand":"Glossier"}}}},"responses":{"200":{"description":"Contacts are ready (brand was searched in the last 30 days).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"202":{"description":"Live search started. Poll GET /searches/{id} after retry_after seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"400":{"description":"invalid_request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"quota_exhausted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited or too_many_in_flight","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"at_capacity or api_disabled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/searches/{id}":{"get":{"operationId":"getSearch","summary":"Check a search. Free.","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"},"example":"srch_8123"}],"responses":{"200":{"description":"The search: running, done or failed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Search"}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/usage":{"get":{"operationId":"getUsage","summary":"Searches used and remaining on this key. Free.","responses":{"200":{"description":"Usage","content":{"application/json":{"schema":{"type":"object","properties":{"quota":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"}},"required":["quota","used","remaining"]}}}},"401":{"description":"unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Your ptp_live_ key."}},"schemas":{"Search":{"type":"object","required":["id","status","brand","usage"],"properties":{"id":{"type":"string","example":"srch_8123"},"status":{"type":"string","enum":["running","done","failed"]},"brand":{"type":"string"},"poll_url":{"type":"string","description":"Only while running."},"retry_after":{"type":"integer","description":"Seconds to wait before polling. Only while running."},"reason":{"type":"string","description":"Only when failed.","enum":["no_linkedin","no_contacts","no_emails","scrape_error","timeout","error"]},"domain":{"type":["string","null"]},"linkedin_company_url":{"type":["string","null"]},"parent_company":{"type":["string","null"]},"instagram":{"type":["string","null"]},"tiktok":{"type":["string","null"]},"cached":{"type":"boolean"},"charged":{"type":"boolean","description":"false when this search did not count against your quota."},"searched_at":{"type":"string","format":"date-time"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"usage":{"type":"object","properties":{"quota":{"type":"integer"},"used":{"type":"integer"},"remaining":{"type":"integer"}},"required":["quota","used","remaining"]}}},"Contact":{"type":"object","properties":{"full_name":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"title":{"type":["string","null"],"description":"Job title, cleaned up from the LinkedIn headline."},"headline":{"type":["string","null"],"description":"Raw LinkedIn headline."},"company":{"type":["string","null"]},"email":{"type":["string","null"]},"email_status":{"type":"string","enum":["verified","not_found"]},"email_source":{"type":["string","null"]},"linkedin_url":{"type":["string","null"]},"location":{"type":["string","null"]}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"}}}}}}}}