Python 3 Example: Searching for NMR Entries

import requests

url = 'http://www.rcsb.org/pdb/rest/search'

query_text = """


B0907
org.pdb.query.simple.ExpTypeQuery
Experimental Method Search: Experimental Method=SOLID-STATE
NMR
SOLID-STATE NMR

"""

print(f"query: {query_text}")
print("querying PDB...")

header = {'Content-Type': 'application/x-www-form-urlencoded'}

response = requests.post(url, data=query_text, headers=header)

if response.status_code == 200:
    print(f"found {len(response.text)} PDB entries matching query.")
    print(f"Matches: \n{response.text}")
else:
    print("Failed to retrieve results")

Provided by Carlos Oliver