Find the parent project and resource name of the API key that matches the key string in the request. If the API key has been purged, resource name will not be set. The service account must have the apikeys.keys.lookup permission on the parent project.
HTTP request
GET https://apikeys.googleapis.com/v2/keys:lookupKey
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-26 UTC."],[[["\u003cp\u003eThis API endpoint \u003ccode\u003ekeys:lookupKey\u003c/code\u003e retrieves information about an API key, including its parent project and resource name.\u003c/p\u003e\n"],["\u003cp\u003eThe endpoint uses a \u003ccode\u003eGET\u003c/code\u003e request to \u003ccode\u003ehttps://apikeys.googleapis.com/v2/keys:lookupKey\u003c/code\u003e and requires the \u003ccode\u003ekeyString\u003c/code\u003e query parameter to identify the API key.\u003c/p\u003e\n"],["\u003cp\u003eThe request body must be empty, as all input is provided via the \u003ccode\u003ekeyString\u003c/code\u003e query parameter.\u003c/p\u003e\n"],["\u003cp\u003eA successful response includes the \u003ccode\u003eparent\u003c/code\u003e field indicating the project owning the key, and the \u003ccode\u003ename\u003c/code\u003e field, which is the resource name of the API key or is empty if the key has been purged.\u003c/p\u003e\n"],["\u003cp\u003eAccessing this endpoint requires the service account to have the \u003ccode\u003eapikeys.keys.lookup\u003c/code\u003e permission and one of two OAuth scopes: \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform.read-only\u003c/code\u003e or \u003ccode\u003ehttps://www.googleapis.com/auth/cloud-platform\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]