{"openapi":"3.0.2","info":{"title":"API for Diffbot's Knowledge Graph","description":"Search and find facts of organizations and people from Diffbot Knowledge Graph, and extract information from the Web using Diffbot API.","version":"0.1"},"servers":[{"url":"https://llm.diffbot.com"}],"paths":{"/chatgpt/v1/extract":{"get":{"tags":["chatgpt"],"summary":"Extract Plugin Api","description":"Extract the content from the given URLs. Only call this endpoint if the user mentioned a URL.","operationId":"extraction_plugin_api_v1","parameters":[{"description":"URLs to extract, up to 5","required":true,"schema":{"title":"Page Url","type":"array","items":{"type":"string"},"description":"URLs to extract, up to 5"},"name":"page_url","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExtractionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatgpt/v1/enhance_person":{"get":{"tags":["chatgpt"],"summary":"Enhance Person Plugin Api","description":"Find person from knowledge graph with information extracted from the user query.","operationId":"enhance_person_api_v1","parameters":[{"description":"Person name.","required":true,"schema":{"title":"Name","type":"string","description":"Person name."},"name":"name","in":"query"},{"description":"Person email.","required":false,"schema":{"title":"Email","type":"string","description":"Person email."},"name":"email","in":"query"},{"description":"Name of the person's employer.","required":false,"schema":{"title":"Employer","type":"string","description":"Name of the person's employer."},"name":"employer","in":"query"},{"description":"Location of the person.","required":false,"schema":{"title":"Location","type":"string","description":"Location of the person."},"name":"location","in":"query"},{"description":"Job title of the person.","required":false,"schema":{"title":"Job Title","type":"string","description":"Job title of the person."},"name":"job_title","in":"query"},{"description":"Phone number of the person.","required":false,"schema":{"title":"Phone","type":"string","description":"Phone number of the person."},"name":"phone","in":"query"},{"description":"A website for the person.","required":false,"schema":{"title":"Url","type":"string","description":"A website for the person."},"name":"url","in":"query"},{"description":"Name of the person's school.","required":false,"schema":{"title":"School","type":"string","description":"Name of the person's school."},"name":"school","in":"query"},{"description":"['twitterUri', 'educations', 'nationalities', 'youtubeUri', 'children', 'id', 'wikipediaUri', 'diffbotUri', 'name', 'linkedInUri', 'parents', 'gender', 'githubUri', 'homepageUri', 'birthPlace', 'descriptors', 'facebookUri', 'employments', 'crunchbaseUri', 'location', 'instagramUri', 'age']\n\n from the list above, fill extra_fields with the fields the query asks for.","required":false,"schema":{"title":"Extra Fields","type":"array","items":{"type":"string"},"description":"['twitterUri', 'educations', 'nationalities', 'youtubeUri', 'children', 'id', 'wikipediaUri', 'diffbotUri', 'name', 'linkedInUri', 'parents', 'gender', 'githubUri', 'homepageUri', 'birthPlace', 'descriptors', 'facebookUri', 'employments', 'crunchbaseUri', 'location', 'instagramUri', 'age']\n\n from the list above, fill extra_fields with the fields the query asks for."},"name":"extra_fields","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatgpt/v1/enhance_organization":{"get":{"tags":["chatgpt"],"summary":"Enhance Organization Plugin Api","description":"Find organization from knowledge graph with information extracted from the user query.","operationId":"enhance_organization_api_v1","parameters":[{"description":"Organization name.","required":true,"schema":{"title":"Name","type":"string","description":"Organization name."},"name":"name","in":"query"},{"description":"Homepage of the organization.","required":false,"schema":{"title":"Url","type":"string","description":"Homepage of the organization."},"name":"url","in":"query"},{"description":"Location of the organization.","required":false,"schema":{"title":"Location","type":"string","description":"Location of the organization."},"name":"location","in":"query"},{"description":"Phone number of the organization.","required":false,"schema":{"title":"Phone","type":"string","description":"Phone number of the organization."},"name":"phone","in":"query"},{"description":"Text description of the organization.","required":false,"schema":{"title":"Description","type":"string","description":"Text description of the organization."},"name":"description","in":"query"},{"description":"['isAcquired', 'competitors', 'id', 'foundingDate', 'wikipediaUri', 'nbEmployeesMin', 'ipo', 'nbEmployeesMax', 'nbEmployees', 'isDissolved', 'homepageUri', 'investments', 'ceo', 'partnerships', 'isNonProfit', 'categories', 'customers', 'technographics', 'boardMembers', 'quarterlyRevenues', 'crunchbaseUri', 'subsidiaries', 'twitterUri', 'suppliers', 'revenue', 'yearlyRevenues', 'stock', 'diffbotUri', 'parentCompany', 'capitalization', 'name', 'totalInvestment', 'linkedInUri', 'githubUri', 'founders', 'acquiredBy', 'descriptors', 'isPublic', 'facebookUri', 'remoteScore', 'location']\n\n from the list above, fill extra_fields with the fields the query asks for.","required":false,"schema":{"title":"Extra Fields","type":"array","items":{"type":"string"},"description":"['isAcquired', 'competitors', 'id', 'foundingDate', 'wikipediaUri', 'nbEmployeesMin', 'ipo', 'nbEmployeesMax', 'nbEmployees', 'isDissolved', 'homepageUri', 'investments', 'ceo', 'partnerships', 'isNonProfit', 'categories', 'customers', 'technographics', 'boardMembers', 'quarterlyRevenues', 'crunchbaseUri', 'subsidiaries', 'twitterUri', 'suppliers', 'revenue', 'yearlyRevenues', 'stock', 'diffbotUri', 'parentCompany', 'capitalization', 'name', 'totalInvestment', 'linkedInUri', 'githubUri', 'founders', 'acquiredBy', 'descriptors', 'isPublic', 'facebookUri', 'remoteScore', 'location']\n\n from the list above, fill extra_fields with the fields the query asks for."},"name":"extra_fields","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnhanceResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatgpt/v1/text2dql":{"get":{"tags":["chatgpt"],"summary":"Text2Dql","description":"Called to translate natural language queries into Diffbot Query Language queries. Accept the natural language query and the types of entities the query is looking for, and construct an instruction for the next step.","operationId":"text2dql_plugin_api_v1","parameters":[{"description":"Query text from the user.","required":true,"schema":{"title":"Query","type":"string","description":"Query text from the user."},"name":"query","in":"query"},{"description":"List of entity types: Organization,Person,Article,Movie,Song,Track,Product,Event,Album,JobPost,Podcast,Investment","required":true,"schema":{"title":"Types","type":"array","items":{"type":"string"},"description":"List of entity types: Organization,Person,Article,Movie,Song,Track,Product,Event,Album,JobPost,Podcast,Investment"},"name":"types","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Text2Dql Plugin Api V1","type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatgpt/v1/dql":{"get":{"tags":["chatgpt"],"summary":"Dql Plugin Api","description":"Query the Diffbot Knowledge Graph for an entity or set of entities that match a set of criteria. Input includes both query and dql_query.","operationId":"dql_plugin_api_v1","parameters":[{"description":"Query text from the user (the one passed to text2dql).","required":false,"schema":{"title":"Query","type":"string","description":"Query text from the user (the one passed to text2dql).","default":""},"name":"query","in":"query"},{"description":"Diffbot Query Language translated from the query text. Can be a single query string or a list of query strings.","required":true,"schema":{"title":"Dql Query","type":"array","items":{"type":"string"},"description":"Diffbot Query Language translated from the query text. Can be a single query string or a list of query strings."},"name":"dql_query","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/QueryResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/chatgpt/v1/execute_js":{"get":{"tags":["chatgpt"],"summary":"Execute Js","description":"Execute JavaScript expression.","operationId":"execute_js_plugin_api_v1","parameters":[{"description":"JavaScript expressions to be executed.","required":true,"schema":{"title":"Expressions","type":"string","description":"JavaScript expressions to be executed."},"name":"expressions","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JSExecutionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]}]}},"/chatgpt/v1/web_search":{"get":{"tags":["chatgpt"],"summary":"Web Search Plugin","description":"Search the web for information that could help answer the user's question and instructions for how to format the response.","operationId":"web_search_plugin_api_v1","parameters":[{"description":"List of Google advanced search strings (can include phrases, booleans, site:, before:, after:, filetype:, etc)","required":true,"schema":{"title":"Text","type":"array","items":{"type":"string"},"description":"List of Google advanced search strings (can include phrases, booleans, site:, before:, after:, filetype:, etc)"},"name":"text","in":"query"},{"description":"Number of results to return (default 10)","required":false,"schema":{"title":"Num","type":"integer","description":"Number of results to return (default 10)","default":10},"name":"num","in":"query"},{"description":"Page number of results to return (default 1)","required":false,"schema":{"title":"Page","type":"integer","description":"Page number of results to return (default 1)","default":1},"name":"page","in":"query"},{"description":"Max number of tokens to be returned (default 0=unlimited)","required":false,"schema":{"title":"Max Tokens","type":"integer","description":"Max number of tokens to be returned (default 0=unlimited)","default":0},"name":"max_tokens","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"EnhanceResponse":{"title":"EnhanceResponse","type":"object","properties":{"status":{"title":"Status","type":"integer","default":200},"message":{"title":"Message","type":"string"},"type":{"title":"Type","type":"string"},"entity":{"title":"Entity"},"articles":{"title":"Articles"}}},"ExtractionResponse":{"title":"ExtractionResponse","type":"object","properties":{"status":{"title":"Status","type":"integer","default":200},"message":{"title":"Message","type":"string"},"data":{"title":"Data"}}},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"JSExecutionResponse":{"title":"JSExecutionResponse","type":"object","properties":{"status":{"title":"Status","type":"integer","default":200},"message":{"title":"Message","type":"string"},"expression":{"title":"Expression"},"output":{"title":"Output"}}},"QueryResponse":{"title":"QueryResponse","type":"object","properties":{"status":{"title":"Status","type":"integer","default":200},"message":{"title":"Message","type":"string"},"dql_query":{"title":"Dql Query","type":"array","items":{"type":"string"}},"hits":{"title":"Hits","type":"integer"},"data":{"title":"Data"},"articles":{"title":"Articles"},"instruction":{"title":"Instruction","type":"string"},"page_url":{"title":"Page Url","type":"string"},"errors":{"title":"Errors"}}},"SearchResponse":{"title":"SearchResponse","type":"object","properties":{"status":{"title":"Status","type":"integer","default":200},"message":{"title":"Message","type":"string"},"query":{"title":"Query","type":"array","items":{"type":"string"}},"search_results":{"title":"Search Results"},"instructions":{"title":"Instructions","type":"string"}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"anyOf":[{"type":"string"},{"type":"integer"}]}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"token"}}}}}}