Fabian Lurz
Fabian Lurz

Reputation: 2039

Indeed API Access Control Allow Origin

I want to use the API from indeed.com (https://ads.indeed.com/). The problem is, that they set their Response to "Same Origin" -> Meaning I can't use it on my platform. Since there is not much on google to find the question is, if anyone has figured out how to work with this API?

Example request:

http://api.indeed.com/ads/apisearch?publisher=xxxxx&q=java&l=austin%2C+tx&sort=&radius=&st=&jt=&start=&limit=&fromage=&filter=&latlong=1&co=us&chnl=&v=2&format=json&callback=results&v=2

Example response headers:

 HTTP/1.1 200 OK
Date: Thu, 04 Aug 2016 12:59:01 GMT
Server: Apache
Set-Cookie: CTK=1apaq5d2k5mlkchh; Expires=Tue, 09-Aug-2033 07:47:32 GMT; Path=/
Set-Cookie: ctkgen=1; Expires=Thu, 04-Aug-2016 13:02:01 GMT; Path=/
Set-Cookie: JSESSIONID=47FBC363B7DE7AA7FB455319986F2DC3.jasxA_iad-job4; Path=/; HttpOnly
X-Frame-Options: SAMEORIGIN
Pragma: no-cache
Cache-control: no-store, no-cache, must-revalidate, private
Expires: Thu, 04 Aug 2016 12:58:01 GMT
X-Content-Type-Options: nosniff
Vary: User-Agent,Accept-Encoding
Content-Encoding: gzip
Keep-Alive: timeout=30, max=29977
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: application/javascript;charset=UTF-8
Set-Cookie: BIGipServerjob_iad=!WcxX2VJ58OOojFQRNhs+rOzpOInz86YFI2BZzMsbv9orNwX4rj5v6T936m7gDvyWulSDIiDuepFONA==; path=/

Upvotes: 2

Views: 568

Answers (1)

Fabian Lurz
Fabian Lurz

Reputation: 2039

I basically fixed it by using a Server Side language (in this case Java) to make a request to the api. This solved the problem.

It is probably by design, so that the publisher ID is not visible by the client.

Upvotes: 2

Related Questions