I am encountering the following error when making a REST request with Python.
Note: This API can help determine whether an individual address is up to date by typing individual address, first name, last name, etc.
Below is my code.
import requests
import json
req = requests.get('https://smartmover.melissadata.net/v3/WEB/SmartMover/doSmartMover
?t=1353
&id=428h8f8ghd8u
&jobid=1
&act=NCOA, CCOA
&cols=TransmissionResults,TransmissionReference, Version, TotalRecords,CASSReportLink,NCOAReportLink,Records,AddressExtras,AddressKey,AddressLine1,AddressLine2,AddressTypeCode,BaseMelissaAddressKey,CarrierRoute,City,CityAbbreviation,CompanyName,CountryCode,CountryName,DeliveryIndicator,DeliveryPointCheckDigit,DeliveryPointCode,MelissaAddressKey,MoveEffectiveDate,MoveTypeCode,PostalCode,RecordID,Results,State,StateName,Urbanization
&opt=ProcessingType: Standard
&List=test
&full=PATEL MANISH
&first=MANISH
&last=PATEL
&a1=1600 S 5TH ST
&a2=1600 S 5TH ST
&city=Austin
&state=TX
&postal=78704
&ctry=USA
Below is my error.
File "C:\Users\testu\Documents\api.py", line 4
req = requests.get('https://smartmover.melissadata.net/v3/WEB/SmartMover/doSmartMover
^
SyntaxError: EOL while scanning string literal
Below is an excerpt from the documentation for REST JSON. (Link: http://wiki.melissadata.com/index.php?title=SmartMover_V3%3AREST_JSON)
REST Request
https://smartmover.melissadata.net/v3/WEB/SmartMover/doSmartMover
?t={Transmission Reference}
&id={License Key}
&jobid={Job ID}
&pafid={PAF ID}
&act={Actions}
&cols={Columns}
&opt={Options}
&List={List Name}
&comp={Company}
&full={Name Full}
&first={Name First}
&Middle={Name Middle}
&Namepre={Name Prefix}
&Namesfx={Name Suffix}
&last={Name Last}
&u={Urbanization}
&a1={Address Line 1}
&a2={Address Line 2}
&ste={Suite}
&pmb={Private Mailbox}
&city={City}
&state={State}
&postal={Postal Code}
&plus4={Plus4}
&ctry={Country}
&format={Format}
Below is an excerpt from the documentation for the request field. (Link: http://wiki.melissadata.com/index.php?title=SmartMover_V3%3ARequest)
Transmission Reference
- Optional. This is a string value that serves as a unique identifier for this set of records. It is returned as sent.
- REST: ?t = string
- JSON: "TransmissionReference":"string"
Thanks for any help.
requests.get()is invalid Python.