roasOS
API referenceResearch

Quote or submit a Research job

Quote or run a Research job. Set `quote_only: true` to see the price without being charged, then send the same request with its `quote_id` to run it (costs at most 1 credit). Two capabilities are live, each one page and up to 30 results: Facebook company ads by Page ID, and a Meta Ad Library keyword search.

POST
/v1/research/jobs

Quote or run a Research job. Set quote_only: true to see the price without being charged, then send the same request with its quote_id to run it (costs at most 1 credit). Two capabilities are live, each one page and up to 30 results: Facebook company ads by Page ID, and a Meta Ad Library keyword search.

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication. Use your API key as the bearer token: Authorization: Bearer roasos_sk_...

In: header

Header Parameters

Idempotency-Key*string

A unique string that makes retries safe. Any value 16-255 characters; reuse it only when retrying the exact same request.

Match^[A-Za-z0-9._:-]+$
Length16 <= length <= 255
X-RoasOS-Project?string

Optional label to group this request under one of your projects. Appears in your usage records.

Match^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$
Length1 <= length <= 64
X-RoasOS-Cost-Center?string

Optional label to attribute this request to a cost center. Appears in your usage records.

Match^[A-Za-z0-9][A-Za-z0-9._:-]{0,63}$
Length1 <= length <= 64

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/research/jobs" \  -H "Idempotency-Key: stringstringstri" \  -H "Content-Type: application/json" \  -d '{    "capability_id": "research.facebook-company-ads@1",    "target": {      "kind": "page_id",      "page_id": "string"    },    "filters": {},    "page": {      "max_pages": 1,      "max_results": 1    },    "freshness": {      "max_age_seconds": 0,      "allow_stale": true    }  }'
{  "data": {    "schema_version": "research-quote@1",    "kind": "research_quote",    "status": "quoted",    "quote_id": "3c071a1d-db86-46a7-9dc8-72ba3fbca992",    "capability_id": "research.facebook-company-ads@1",    "cache_disposition": "cache_hit",    "reserved_credits": 0,    "maximum_credits": 0,    "expires_at": "2019-08-24T14:15:22Z",    "pricing_version": "string",    "authorization": {      "status": "auto_approved"    },    "confirmation": {      "max_pages": 1,      "max_results": 1,      "max_age_seconds": 0,      "allow_stale": true    }  }}