craigslist Bulk Posting Interface

Fri Jan 23 22:13:39 2015 UTC
Overview:   

craigslist provides a bulk posting interface for easy submission of multiple new posts in a single request to our server. This document describes that interface and how it is used.

New postings are submitted to the bulk interface in RSS format with additional craigslist-specific elements via HTTPS POST. craigslist returns another RSS document detailing which postings are valid or which have been posted.

A description of the protocol, RSS submission and response formats, and a reference of acceptable values is below.


Protocol:

Request:

Submitting a request to post or validate postings is done by:
  1. establishing an HTTPS connection to craigslist at one of these URLs:
  2. sending an HTTP request with a Content-Type of "application/x-www-form-urlencoded" and containing RSS content in the correct format
  3. waiting for a response.

See the code sample in this document for an example bulk post client.

Response:

Possible HTTP status values:

Posting Submission Format:

Below is a sample RSS bulk posting submission containing two NYC housing postings.

A submission consists of a <channel> element containing a list of postings to be processed (within <items> element), and a <cl:auth> element containing authentication credentials for the user submitting the postings. The <items> element should contain <rdf:li> elements, each having an attribute, rdf:resource=, whose value is an arbitrary user-supplied string identifying each posting. These identifiers need only be unique within the RSS document.

Additionally, there is an <item> element for every posting submitted, containing various subelements defining the post content. The about= attribute of this element should contain a value that matches one of the rdf:resource= attributes in an <rdf:li> element. A description of the various elements allowed within each <item> is below this example.

<?xml version="1.0"?>

<rdf:RDF xmlns="http://purl.org/rss/1.0/"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:cl="http://www.craigslist.org/about/cl-bulk-ns/1.0">

  <channel>
    <items>
      <rdf:li rdf:resource="NYCBrokerHousingSample1"/>
      <rdf:li rdf:resource="NYCBrokerHousingSample2"/>
    </items>

    <cl:auth username="listuser@bogus.com"
             password="p0stp@rty"
             accountID="14"/>
  </channel>

  <item rdf:about="NYCBrokerHousingSample1">
    <cl:category>fee</cl:category>
    <cl:area>nyc</cl:area>
    <cl:subarea>mnh</cl:subarea>
    <cl:neighborhood>Upper West Side</cl:neighborhood>
    <cl:housingInfo price="1450"
                    bedrooms="0"
                    sqft="600"/>
    <cl:replyEmail privacy="C">bulkuser@bulkposterz.net</cl:replyEmail>
    <cl:brokerInfo companyName="Joe Sample and Associates"
                   feeDisclosure="fee disclosure here" />
    <title>Spacious Sunny Studio in Upper West Side</title>
    <description><![CDATA[
      posting body here
    ]]></description>
  </item>

  <item rdf:about="NYCBrokerHousingSample2">
    <cl:category>fee</cl:category>
    <cl:area>nyc</cl:area>
    <cl:subarea>mnh</cl:subarea>
    <cl:neighborhood>Chelsea</cl:neighborhood>
    <cl:housingInfo price="2175"
                    bedrooms="1"
                    sqft="850"
                    catsOK="1"/>
    <cl:mapLocation city="New York"
                    state="NY"
                    crossStreet1="23rd Street"
                    crossStreet2="9th Avenue"
                    latitude="40.746492"
                    longitude="-74.001326"
    />
    <cl:replyEmail privacy="C" 
                   otherContactInfo="212.555.1212">
      bulkuser@bulkposterz.net
    </cl:replyEmail>
    <cl:brokerInfo companyName="Joe Sample and Associates"
                   feeDisclosure="fee disclosure here" />
    <title>1BR Charmer in Chelsea</title>
    <description><![CDATA[
      posting body goes here
    ]]></description>
    <cl:PONumber>Purchase Order 094122</cl:PONumber>
    <cl:image position="1">/9j/4AAQSkZJRgABAQEASABIAAD/4QCARXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUA
AAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAA
AEgAAAABAAKgAgAEAAAAAQAAABCgAwAEAAAAAQAAABAAAAAA/9sAQwABAQEBAQEBAQEBAQEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB/9sAQwEBAQEB
AQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEB
AQEB/8AAEQgAEAAQAwERAAIRAQMRAf/EAB8AAAEFAQEBAQEBAAAAAAAAAAABAgMEBQYHCAkKC//E
ALUQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFB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7vmqrnqThVj8N/ttfspePP2M9M+NP7L
37Yl/wDHvXP2C/hX8Of2nPHX/BNw/C/wdeap8DtV+PHxWtvGuvfDlP2hPFvhu6TWNE8W/D7xH4lF
lo2k+ILCTTZtXW+1iC50zwFqOuJ4u+84F4ty/jarkfFfBdPh+h4g5tmXC2A8Tf7VxsaWfUeH8ong
cPmT4cwmKi6FfB5jhsM6leth6ntVRcKDjVzCnQ+p/S8N55heIp5bnfD0cqp8U47GZLheMPruIjDM
4ZXgZYeljHlOHrJ06lDF0aLlUqUpe0UHCm1PFQpOg79ib9lPx1+2bpHwU/Zd/Y6vfj5oX7B/xU+H
X7M3jr/gpM3xQ8H3emfAzTfjt8KYPBevfEJf2evFviS6fWda8X/EHxD4baw1zSPD+nx6XFq50/Wp
rrU/Aen6LH4ROOuLcBwTWz3ivjSHD1fxAynMuKMB4YrKsbGrn1XIM3njsPlz4jweFgqFHB5bhsT7
ShWxFV1XR9pQUKWYVKzxhxJnmG4dqZnnfEMcrqcUYHF5zhuD/qWIjPM55ZjpYmlhP7WoUV7OnQwl
KtzUqlWXO6fPTShiZVHiP//Z
    </cl:image>
  </item>
</rdf:RDF>
    
Sample RSS Posting Submission

Inside <channel> Element:

Note: time-related attributes specified as "integer" will often be POSIX timestamps ; i.e. seconds since 1 January 1970 UTC (except when they aren't).

required:

Inside <item> Elements:

required:

optional: