On this page
Your first authenticated catalog read.
Start with your assigned key and a small request. No new dependencies are needed for the supplied examples.
1. Configure your key privately
Use your assigned MKT_ key in the X-API-Key header. Keep it on your server or local development machine. Never place it in browser JavaScript, URLs, source control, screenshots or an AI conversation. Use a secret manager or your shell's private prompt, not a literal key in shell history.
Bash:
read -r -s -p 'Posticy API key: ' POSTICY_API_KEY; printf '\n'
export POSTICY_API_KEYzsh:
read -r -s 'POSTICY_API_KEY?Posticy API key: '; printf '\n'
export POSTICY_API_KEYThe .env.example file is a template only. These examples read the process environment; they do not automatically load .env files.
2. First request with cURL
Run from the extracted kit directory:
bash examples/requests.shIt requests the first 10 Dofollow listings with DR >= 30. A successful response has success: true, data and pagination. Read services.guest_post and services.link_insertion for availability and each service's amount/currency. Do not treat the top-level Guest Post price as the Niche Edit price.
For details, replace RETURNED_ID with an id from your own list result:
curl --silent --show-error --fail-with-body --max-time 30 \
'https://marketplace.posticy.com/api/v1/marketplace/websites/RETURNED_ID' \
--header "X-API-Key: ${POSTICY_API_KEY}" \
--header 'Accept: application/json'3. Export with Python or JavaScript
No additional packages are needed. Both examples make at most one page request by default and export separate service prices to CSV.
python3 examples/catalog.py --min-dr 30 --pages 2 --per-page 10 --output python-catalog.csv
node examples/catalog.mjs --min-dr 30 --pages 2 --per-page 10 --output node-catalog.csvSingle-listing detail:
python3 examples/catalog.py --id RETURNED_ID
node examples/catalog.mjs --id RETURNED_IDOptional: --max-price 250 filters raw Guest Post amounts; it does not convert currencies. Repeat --country-id CONFIRMED_ID for multiple country IDs. Get valid country IDs from Posticy; do not assume numbers represent a particular country. Never copy MCP's country-name parameters into this API.
A capped export says PARTIAL when more pages exist. It must not be used to delete or hide listings in your own system. Exports replace the chosen CSV file only after all requested pages succeed. Deduplication is by id; offset pagination is not a snapshot. Reconcile only after a complete, successful crawl, and investigate count discrepancies.
4. Use Postman
Import both files from postman/, select the local environment, and set posticy_api_key privately. Keep it out of shared/synced environment exports. Run List websites first; its test saves a returned ID for Get website details. If the result is empty, the ID is cleared and the detail request is skipped. Automatic redirect following is disabled in the requests.
The collection includes manual missing-key and invalid-key checks. Normal runs use small reads; there is no rate-limit stress test or business write.
5. Handle errors
- 401: check that your assigned key is active and in the header.
- 404 on detail: refresh the catalog; unavailable and nonexistent listings are not distinguished.
- 422: correct parameters according to the response.
- 429: wait for
retry_afterbefore retrying. Python/Node allow up to three retries with waits no longer than 120 seconds; longer waits fail for a later rerun. - Network failures, invalid responses and other non-2xx errors: stop the export and investigate. Examples suppress raw error details to avoid logging credentials.
The simple cURL and Postman examples do not retry automatically. Never add verbose request logging with a real key.
Python certificate setup
If Python reports CERTIFICATE_VERIFY_FAILED, fix its local trusted-CA configuration; do not disable certificate checks. In our macOS test environment the system CA bundle worked:
SSL_CERT_FILE=/etc/ssl/cert.pem python3 examples/catalog.py --min-dr 30 --pages 2 --per-page 5 --output catalog.csvUse that path only where it exists and is the trusted system CA bundle. On other installations, configure the CA bundle appropriate to your operating system or organization. TLS verification stays enabled.
Request API access
Contact Posticy Support with your company, intended workflow, expected usage and storage/display needs. API access and commercial arrangements are separate from Marketplace subscriptions.