#Code snippet to consume Product Code Builder API using python #import required libraries import requests import json import datetime #create a signature and append it to the URL to avoid cached responses from server. signature = str(int(datetime.datetime.now().timestamp())) #set the url url = 'https://www.accessdata.fda.gov/rest/pcbapi/v1/product/name/?signature='+signature #set headers headers = { 'Content-Type': 'application/x-www-form-urlencoded', 'Authorization-User': 'Insert your Authorization-User here', 'Authorization-Key': 'Insert your Authorization-Key here' } #build the payload data = 'payload=blood/plasma'; response = requests.post(url, headers=headers, data=data) json = response.json() print(json)