RapidParser bar
RapidParser Header Image
Table of Contents

Quickstart

This page is intended to give you an overview on how to use RapidParser and to help you to integrate RapidParser easily into your application within a few steps.

 

1. Acquire Credentials

In order to use RapidParser you will need one of your API Access Tokens to verify calls against the web service. These can be looked up in the account “Overview” section.

 

For development issues you can use your Sandbox API key, you won't be charged any credits for using it. Please notice that the Sandbox API is limited to one call per second and some fields of the results are randomly selected to be unavailable.

2. Choose Technology

The RapidParser web service may be used with SOAP or REST, the result can either be returned as XML or as JSON. For further information please have a look at the SOAP API reference or REST API reference and at the result reference.

 

3. Call Web Service

The following examples demonstrate how to call the webservice. For these examples Python is used as client language. If you need examples for a different language, please have a look at our SOAP examples or REST examples.

 

Python - REST - XML

import urllib2
import json
# Filename of CV document located in same folder as script 
filename = 'cv.pdf'
 
# Convert file to Base64-String
base64 = open(filename,'rb').read().encode('base64')
 
# Create urllib2.Request instance using RapidParsers parse-function
req = urllib2.Request('https://www.rapidparser.com/api/rest/v1/parse');
 
# Content-Type has to be "application/json"
req.add_header('Content-Type','application/json')
 
# Accepted format can be "application/xml" or "application/json"
req.add_header('Accept','application/xml')
 
# HTTP Authorization Header, replace %TOKEN% with your API access token
req.add_header('Authorization', 'Bearer %TOKEN%')
 
try:
	res = urllib2.urlopen(req, json.dumps({'data':base64,'filename':filename}))
	print repr(res.read())
except urllib2.HTTPError, err:
	print 'Error ' + str(err.code) + ': ' + err.read()

 

Python - SOAP - JSON

from suds.client import Client
 
# Filename of CV document located in same folder as script 
filename = 'cv.pdf'
 
# Convert file to Base64-String
base64 = open(filename,'rb').read().encode('base64')
 
# Create suds.client.Client instance using RapidParsers WSDL
client = Client('https://www.rapidparser.com/api/soap/v1/soapservice?wsdl')
 
# Format can be "json" or "xml", replace %TOKEN% with your API access token
result = client.service.parse('%TOKEN%',base64,filename,'json')
 
# suds bug (https://mail.python.org/pipermail//soap/2012-May/000851.html) & needs to be replaced
result = result.replace('&', '&').encode('utf-8')
print repr(result)