This site has facilities for querying data on an automated basis, in a machine parsable format.
Most queries (all?) require an API key. This should exist on your account, but can be found and/or regenerated through the account profile page.

Any query requiring an API key: These queries also require an active account with Advanced Class or better. Queries will reject if the account is allowed to lapse. The examples below contain your live API key, do not share them with others!
If I see a super large amount of queries (millions a day) or lots of invalid queries I may be reaching out to discuss alternative solutions or fixes to your queries. If you're sending over a million queries a day, you're almost certainly better off just using the downloaded files locally, since there's far less than a million prefixes. That can be automated too!

There is documentation for the following interfaces:

queryexchangevalid - This is a simple flat text file giving "title=data" type formats. This is intended mostly for verifying an exchange is valid.
queryexchangexml - This is a similar interface, designed for retrieving data on a single exchange. Returns data in XML format.
queryareacodexml - This is a mass transfer interface, the information this gives is in bulk quantities. It's preferred you cache it, but low volume pulls are probably okay. Data is returned in XML format.

queryexchangevalid

URL: /query/queryexchangevalid.html
Parameters:
	npa [required] - 3 digit "area code"
	nxx [required] - 3 digit exchange
        apikey [required] - The API key from your account

Example: http://www.telcodata.us/query/queryexchangevalid.html?npa=248&nxx=455&apikey=
Notes: Order of text may change. Treat as "variable=value" pairs. Don't be dependent on the order of the text in the returned data.

queryexchangexml

URL: /query/queryexchangexml.html
Parameters:
	npa [required] - 3 digit "area code"
	nxx [required] - 3 digit exchange
        apikey [required] - The API key from your account

Example: http://www.telcodata.us/query/queryexchangexml.html?npa=248&nxx=455&apikey=
Notes: Additional values may be returned in the future.

queryareacodexml

URL: /query/queryareacodexml.html
Parameters:
   npa [required] - 3 digit "area code"
        apikey [required] - The API key from your account

Example: http://www.telcodata.us/query/queryareacodexml.html?npa=947&apikey=
Notes: Additional values may be returned in the future.