Skip to content

HTTP Response Codes

The APITube News API uses conventional HTTP response codes to indicate the success or failure of an API request. In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error due to the information provided by the client, and codes in the 5xx range indicate an error on the server side.

HTTP Response CodeStatusDescription
200okEverything worked as expected.
400not_okAPI request is malformed or contains invalid parameters.
401not_okAPI key is invalid or missing.
402not_okYou have no points on your account.
403not_okAccess denied: IP address is not in the allowed list.
404not_okEntry not found.
429not_okThe emergence of this error code indicates surpassing the rate limit allocated for your plan. You must wait for the rate limit to reset before initiating additional requests.
500not_okThe appearance of this error code signifies an unforeseen server error. Typically, this is a transient problem, so it's advisable to attempt your request again at a later time.
502not_okAn upstream service is temporarily unavailable. This is usually transient, so retry your request shortly.

API Error Codes

This section lists all error codes returned by the API. Each error includes a unique code identifier (ER####), HTTP status code, and description.

Authentication & Authorization Errors

Error CodeHTTP StatusDescription
ER0175401API key is invalid or missing.
ER0176402You have no points on your account.
ER0177402Monthly pay-as-you-go spending limit reached.
ER0200400API key is required.
ER0201401API key is required. Provide it via X-API-Key header or api_key query parameter.
ER0202401API key is invalid.
ER0230401API key has expired.

The same ER0176 code (always 402) is reused by the SSE stream with a different message — "You have no SSE points on your account." REST requests and streaming draw from separate credit pools, so the message tells you which balance is empty (regular points vs SSE points).

API Key Restriction Errors

Error CodeHTTP StatusDescription
ER0601403Access denied: your IP address is not allowed for this API key.
ER0602403Access denied: your domain is not allowed for this API key.
ER0603403Access denied: this API key is not authorized for this endpoint. Required scope: {scope}.

Rate Limiting Errors

Error CodeHTTP StatusDescription
ER0203429Rate limit exceeded. You can make X requests per minute. Try again in Y.
ER0204429You have been temporarily banned for exceeding rate limits. Try again in Y.

Repeatedly exceeding the per-minute rate limit (30 violations) results in a temporary ban returned as 429 ER0204. Note that the same ER0204 code is also used with HTTP status 400 by the author filter ("Author with name not found."). Always branch on the HTTP status alongside the error code: 429 means a rate-limit ban, 400 means the author lookup failed.

General Errors

Error CodeHTTP StatusDescription
ER0182404Requested endpoint not found. Please check the URL and try again.
ER0183500Something went wrong.

Article Filter Errors

Error CodeHTTP StatusDescription
ER0001400Invalid article.id value.
ER0002400article.id must be between 1 and 20 characters.
ER0231400Article ID is required. (story endpoint)
ER0232400Article ID is required. (article endpoint)
ER0235404Article not found.
ER0240404No keywords found in article title.

Duplicate Filter Errors

Error CodeHTTP StatusDescription
ER0003400Invalid is_duplicate value.
ER0004400is_duplicate must be 0 or 1.

Paywall Filter Errors

Error CodeHTTP StatusDescription
ER0005400Invalid is_paywall value.
ER0006400is_paywall must be 0 or 1.

Title Filter Errors

Error CodeHTTP StatusDescription
ER0007400title must be between 1 and 100 characters.
ER0008400ignore.title must be between 1 and 100 characters.
ER0009400title_starts_with must be between 1 and 100 characters.
ER0010400title_ends_with must be between 1 and 100 characters.
ER0011400title_pattern must be between 1 and 200 characters.
ER0340400Phrase in quotes must be between 3 and 200 characters.
ER0341400Slop value must be between 0 and 10.

Media Filter Errors

Error CodeHTTP StatusDescription
ER0012400Invalid media.images.count value.
ER0013400media.images.count must be greater than or equal to 0.
ER0014400media.images.count must be between 1 and 10 characters.
ER0015400Invalid media.images.count.min value.
ER0016400media.images.count.min must be greater than or equal to 0.
ER0017400media.images.count.min must be between 1 and 10 characters.
ER0018400Invalid media.images.count.max value.
ER0019400media.images.count.max must be greater than or equal to 0.
ER0020400media.images.count.max must be between 1 and 10 characters.
ER0021400Invalid media.images.width.min value.
ER0022400media.images.width.min must be greater than or equal to 0.
ER0023400media.images.width.min must be between 1 and 10 characters.
ER0024400Invalid media.images.width.max value.
ER0025400media.images.width.max must be greater than or equal to 0.
ER0026400media.images.width.max must be between 1 and 10 characters.
ER0027400Invalid media.images.height.min value.
ER0028400media.images.height.min must be greater than or equal to 0.
ER0029400media.images.height.min must be between 1 and 10 characters.
ER0030400Invalid media.images.height.max value.
ER0031400media.images.height.max must be greater than or equal to 0.
ER0032400media.images.height.max must be between 1 and 10 characters.
ER0033400Invalid media.videos.count value.
ER0034400media.videos.count must be greater than or equal to 0.
ER0035400media.videos.count must be between 1 and 10 characters.
ER0036400Invalid media.videos.count.min value.
ER0037400media.videos.count.min must be between 1 and 10 characters.
ER0038400Invalid media.videos.count.max value.
ER0039400media.videos.count.max must be greater than or equal to 0.
ER0040400media.videos.count.max must be between 1 and 10 characters.
ER0041400has_image must be 0 or 1.
ER0042400has_video must be 0 or 1.
ER0043400has_hq_images must be 0 or 1.
ER0233400is_media_rich must be 0 or 1.
ER0245400media.videos.count.min must be greater than or equal to 0.
ER0250400is_landscape_media must be 0 or 1.
ER0251400is_portrait_media must be 0 or 1.
ER0252400has_multiple_images must be 0 or 1.
ER0253400has_fullhd_images must be 0 or 1.
ER0254400has_4k_images must be 0 or 1.
ER0255400has_mobile_optimized_images must be 0 or 1.
ER0256400is_instagram_ready must be 0 or 1.
ER0257400is_twitter_card_ready must be 0 or 1.
ER0258400has_consistent_image_sizes must be 0 or 1.
ER0259400has_thumbnail must be 0 or 1.
ER0260400has_social_share_image must be 0 or 1.
ER0261400has_mixed_media must be 0 or 1.

Source Filter Errors

Error CodeHTTP StatusDescription
ER0044400Invalid source.rank.opr.min value.
ER0045400source.rank.opr.min must be greater than or equal to 0.
ER0046400source.rank.opr.min must be between 1 and 10 characters.
ER0047400Invalid source.rank.opr.max value.
ER0048400source.rank.opr.max must be greater than or equal to 0.
ER0049400source.rank.opr.max must be between 1 and 10 characters.
ER0050400Invalid source.id value.
ER0051400source.id must be greater than or equal to 0.
ER0052400source.id must be between 1 and 20 characters.
ER0053400Invalid ignore.source.id value.
ER0054400ignore.source.id must be greater than or equal to 0.
ER0055400ignore.source.id must be between 1 and 20 characters.
ER0057400source.domain must be between 1 and 255 characters.
ER0059400ignore.source.domain must be between 1 and 255 characters.
ER0195400is_premium_source must be 0 or 1.
ER0196400is_verified_source must be 0 or 1.
ER0212400Source country code not found.
ER0213400Source country code not found. (ignore filter)
ER0214400Source domain name not found.
ER0215400Source domain name not found. (ignore filter)
ER0246400source.country.code must be 2 characters.
ER0247400ignore.source.country.code must be 2 characters.

Language Filter Errors

Error CodeHTTP StatusDescription
ER0061400language.code must be between 1 and 2 characters.
ER0063400ignore.language.code must be between 1 and 2 characters.
ER0237400Language with code not found.
ER0239400Language with code not found. (ignore filter)

Author Filter Errors

Error CodeHTTP StatusDescription
ER0064400Invalid author.id value.
ER0066400author.id must be between 1 and 20 characters.
ER0067400Invalid ignore.author.id value.
ER0069400ignore.author.id must be between 1 and 20 characters.
ER0070400has_author must be 0 or 1.
ER0071400author.name must be between 1 and 100 characters.
ER0073400ignore.author.name must be between 1 and 100 characters.
ER0204400Author with name not found.
ER0205400Author with name not found. (ignore filter)

Sentiment Filter Errors

Error CodeHTTP StatusDescription
ER0074400Invalid sentiment.title.score.min value.
ER0075400sentiment.title.score.min must be between -1 and 1.
ER0076400sentiment.title.score.min must be between 1 and 10 characters.
ER0077400Invalid sentiment.title.score.max value.
ER0078400sentiment.title.score.max must be between -1 and 1.
ER0079400sentiment.title.score.max must be between 1 and 10 characters.
ER0080400Invalid sentiment.title.score value.
ER0081400sentiment.title.score must be between -1 and 1.
ER0082400sentiment.title.score must be between 1 and 10 characters.
ER0083400sentiment.title.polarity must be between 1 and 10 characters.
ER0084400Invalid sentiment.body.score.min value.
ER0085400sentiment.body.score.min must be between -1 and 1.
ER0086400sentiment.body.score.min must be between 1 and 10 characters.
ER0087400Invalid sentiment.body.score.max value.
ER0088400sentiment.body.score.max must be between -1 and 1.
ER0089400sentiment.body.score.max must be between 1 and 10 characters.
ER0090400Invalid sentiment.body.score value.
ER0091400sentiment.body.score must be between -1 and 1.
ER0092400sentiment.body.score must be between 1 and 10 characters.
ER0093400sentiment.body.polarity must be between 1 and 10 characters.
ER0094400Invalid sentiment.overall.score.min value.
ER0095400sentiment.overall.score.min must be between -1 and 1.
ER0096400sentiment.overall.score.min must be between 1 and 10 characters.
ER0097400Invalid sentiment.overall.score.max value.
ER0098400sentiment.overall.score.max must be between -1 and 1.
ER0099400sentiment.overall.score.max must be between 1 and 10 characters.
ER0100400Invalid sentiment.overall.score value.
ER0101400sentiment.overall.score must be between -1 and 1.
ER0102400sentiment.overall.score must be between 1 and 10 characters.
ER0103400sentiment.overall.polarity must be between 1 and 10 characters.
ER0243400sentiment.mixed must be 0 or 1.
ER0244400sentiment.consistent must be 0 or 1.
ER0249400sentiment_gap.max must be between 0 and 2.
ER0342400is_clickbait must be 0 or 1.
ER0343400Invalid sentiment_gap.min value.
ER0344400sentiment_gap.min must be between 0 and 2.
ER0345400Invalid sentiment_gap.max value.

Published Date Filter Errors

Error CodeHTTP StatusDescription
ER0104400Invalid published_at.start value.
ER0105400published_at.start must be between 1 and 30 characters.
ER0106400Invalid published_at.end value.
ER0107400published_at.end must be between 1 and 30 characters.
ER0108400published_at must be between 1 and 30 characters.
ER0109400Invalid published_at value.
ER0371400published_at.start must be before published_at.end.

Category Filter Errors

Error CodeHTTP StatusDescription
ER0112400category.id must be between 1 and 20 characters.
ER0115400ignore.category.id must be between 1 and 20 characters.
ER0206400Category with ID not found.
ER0207400Category with ID not found. (ignore filter)
ER0241404Category not found.
ER0242404Category not found.

Topic Filter Errors

Error CodeHTTP StatusDescription
ER0117400topic.id must be between 1 and 20 characters.
ER0120400ignore.topic.id must be between 1 and 20 characters.
ER0149404Topic not found.
ER0208400Topic with ID not found.
ER0209400Topic with ID not found. (ignore filter)

Industry Filter Errors

Error CodeHTTP StatusDescription
ER0121400Invalid industry.id value.
ER0123400industry.id must be between 1 and 20 characters.
ER0124400Invalid ignore.industry.id value.
ER0126400ignore.industry.id must be between 1 and 20 characters.
ER0150404Industry not found.
ER0210400Industry with ID not found.
ER0211400Industry with ID not found. (ignore filter)

Entity Filter Errors

Error CodeHTTP StatusDescription
ER0127400Invalid entity.id value.
ER0128400entity.id must be between 1 and 30 characters.
ER0129400Invalid ignore.entity.id value.
ER0130400ignore.entity.id must be between 1 and 120 characters.
ER0132400person.name must be between 1 and 120 characters.
ER0134400ignore.person.name must be between 1 and 120 characters.
ER0136400location.name must be between 1 and 120 characters.
ER0138400ignore.location.name must be between 1 and 120 characters.
ER0140400organization.name must be between 1 and 120 characters.
ER0142400ignore.organization.name must be between 1 and 120 characters.
ER0144400brand.name must be between 1 and 120 characters.
ER0146400ignore.brand.name must be between 1 and 120 characters.
ER0148400disaster.name must be between 1 and 120 characters.
ER0151404Entity not found.
ER0152400disease.name must be between 1 and 120 characters.
ER0154400ignore.disease.name must be between 1 and 120 characters.
ER0156400event.name must be between 1 and 120 characters.
ER0158400ignore.event.name must be between 1 and 120 characters.
ER0160400sport.name must be between 1 and 120 characters.
ER0162400ignore.sport.name must be between 1 and 120 characters.
ER0216400Entity person name not found.
ER0217400Entity person name not found. (ignore filter)
ER0218400Entity location name not found.
ER0219400Entity location name not found. (ignore filter)
ER0220400Entity organization name not found.
ER0221400Entity organization name not found. (ignore filter)
ER0222400Entity brand name not found.
ER0223400Entity brand name not found. (ignore filter)
ER0224400Entity disaster name not found.
ER0225400Entity disaster name not found. (ignore filter)
ER0226400Entity disease name not found.
ER0227400Entity disease name not found. (ignore filter)
ER0228400Entity event name not found.
ER0229400Entity event name not found. (ignore filter)
ER0248400ignore.disaster.name must be between 1 and 120 characters.
ER0290400entity.sentiment.polarity must be positive, negative or neutral.
ER0291400entity.sentiment.score.min must be a number between -1 and 1.
ER0292400entity.sentiment.score.max must be a number between -1 and 1.

Breaking News Filter Errors

Error CodeHTTP StatusDescription
ER0185400Invalid is_breaking value.
ER0186400is_breaking must be 0 or 1.

Read Time Filter Errors

Error CodeHTTP StatusDescription
ER0187400Invalid read_time value.
ER0188400read_time must be between 1 and 1000 characters.
ER0189400Invalid read_time.min value.
ER0190400read_time.min must be between 1 and 1000 characters.
ER0191400Invalid read_time.max value.
ER0192400read_time.max must be between 1 and 1000 characters.
ER0193400is_long_read must be 0 or 1.
ER0194400is_short_read must be 0 or 1.
ER0302400is_deep_dive must be 0 or 1.
ER0347400is_quick_read must be 0 or 1.
ER0348400is_medium_read must be 0 or 1.

The same ER0302 code (also 400) is reused by the webhooks endpoints with a different message — "Invalid or disallowed webhook URL." Both are 400; distinguish them by which endpoint you called and by the message text.

Pagination Errors

Error CodeHTTP StatusDescription
ER0170400'Per page' is not a number.
ER0171400Limit is out of range. (per_page must be 250 or less)
ER0172400Page is not a number.
ER0173400Free plan is limited to the first 5 pages. Upgrade your subscription plan to paginate further.
ER0174400Cursor is malformed or invalid.
ER0178400Cursor pagination is not supported for this sort order, or the cursor does not match the current sort. Reset pagination or use page-based pagination.

Readability Filter Errors

Error CodeHTTP StatusDescription
ER0262400Invalid readability.fk_grade value.
ER0263400readability.fk_grade must be between 0 and 30.
ER0264400Invalid readability.fk_grade.min value.
ER0265400readability.fk_grade.min must be between 0 and 30.
ER0266400Invalid readability.fk_grade.max value.
ER0267400readability.fk_grade.max must be between 0 and 30.
ER0268400Invalid readability.ease value.
ER0269400readability.ease must be between 0 and 100.
ER0270400Invalid readability.ease.min value.
ER0271400readability.ease.min must be between 0 and 100.
ER0272400Invalid readability.ease.max value.
ER0273400readability.ease.max must be between 0 and 100.
ER0274400Invalid readability.ari value.
ER0275400readability.ari must be between 0 and 30.
ER0276400Invalid readability.ari.min value.
ER0277400readability.ari.min must be between 0 and 30.
ER0278400Invalid readability.ari.max value.
ER0279400readability.ari.max must be between 0 and 30.
ER0280400readability.difficulty must be one of: beginner, intermediate, advanced, expert.
ER0281400readability.audience must be one of: children, general, professional, academic.
ER0282400Invalid readability.age value.
ER0283400readability.age must be between 6 and 22.
ER0284400Invalid readability.age.min value.
ER0285400readability.age.min must be between 6 and 22.
ER0286400Invalid readability.age.max value.
ER0287400readability.age.max must be between 6 and 22.
ER0288400is_easy_read must be 0 or 1.
ER0289400is_difficult_read must be 0 or 1.

Quality Filter Errors

Error CodeHTTP StatusDescription
ER0303400is_high_quality must be 0 or 1.

The same ER0303 code (also 400) is reused by the webhooks GET, PATCH and DELETE /{id} endpoints with a different message — "Invalid webhook ID." Both are 400; distinguish them by which endpoint you called and by the message text.

Field Selection Errors

Error CodeHTTP StatusDescription
ER0300400fl must be a string.
ER0301400fl cannot be empty.

Facet Errors

Error CodeHTTP StatusDescription
ER0310400facet.field is required when facet=true.
ER0311400facet.field cannot be empty.
ER0312400facet.field cannot contain more than 5 fields.
ER0313400Invalid field in facet.field.
ER0330400facet.range.field is required when facet.range=true.
ER0331400Invalid field in facet.range.field.
ER0332400facet.range.start and facet.range.end are required for range faceting.

Highlight Errors

Error CodeHTTP StatusDescription
ER0320400hl.fl cannot be empty when hl=true.
ER0321400hl.fl cannot contain more than 5 fields.
ER0322400Invalid field in hl.fl.

Location Filter Errors

Error CodeHTTP StatusDescription
ER0400400location.bbox must be 4 comma-separated values: minLat,maxLat,minLng,maxLng.
ER0401400location.bbox latitudes must be between -90 and 90.
ER0402400location.bbox longitudes must be between -180 and 180.
ER0403400location.bbox minLat must be less than or equal to maxLat.
ER0404400location.bbox minLng must be less than or equal to maxLng.
ER0405400has_location_geo must be 0 or 1.
ER0406400location.lat and location.lng are required when using radius filters.
ER0407400location.lat must be a valid latitude between -90 and 90.
ER0408400location.lng must be a valid longitude between -180 and 180.
ER0409400location.radius must be a positive number up to 20000 km.
ER0410400location.radius.min must be a non-negative number up to 20000 km.
ER0411400location.radius.min must be less than location.radius.
ER0412400At least one of location.radius or location.radius.min must be provided.
Error CodeHTTP StatusDescription
ER0350400field is required.
ER0352400compare_window is required when compare=true or has invalid format.
ER0353400Invalid date range. Maximum allowed range is 30 days for trends endpoint.

Event Type Filter Errors

Error CodeHTTP StatusDescription
ER0501400Invalid event.type value.
ER0502400Invalid event type(s). See /v1/news/event-types for valid types.
ER0503400Invalid event.category. Valid categories: business, society, environment.
ER0504400Invalid ignore.event.type(s).

Suggest Errors

Error CodeHTTP StatusDescription
ER0346400Prefix in query required.

SSE Stream Errors

ER0360 and ER0363 are returned as HTTP responses when the connection is rejected on connect. The others are delivered mid-stream as SSE error events (event: error) on an already-open 200 connection, after which the stream closes — reconnect (with Last-Event-ID) to resume.

Error CodeHTTP StatusDescription
ER0360429Maximum SSE connections reached for your plan.
ER0361200 (stream event)API key revoked — the stream was closed because the key was revoked.
ER0362200 (stream event)Stream lifetime exceeded (6h max session) — reconnect to continue.
ER0363400Invalid stream.max_age — must be a positive integer number of minutes.
ER0364200 (stream event)SSE session terminated by API — closed via DELETE /v1/news/stream/sessions or key rotation.

WebSocket Stream Errors

Delivered over the WebSocket stream as a JSON message with type: "error" on the already-open connection, after which the socket closes.

Error CodeDescription
ER0365Connection replaced by a newer connection (takeover) — a second WebSocket opened with the same API key took over, closing this one.

Local News Errors

Error CodeHTTP StatusDescription
ER0420400Invalid insights value.
ER0421400Could not geocode place. Try a more specific name, add country, or pass lat/lng.

Source Stats Errors

Error CodeHTTP StatusDescription
ER0370404Source not found.

Webhook Errors

Error CodeHTTP StatusDescription
ER0302400Invalid or disallowed webhook URL. (Same code is used by the read-time is_deep_dive filter.)
ER0303400Invalid webhook ID. (Same code is used by the is_high_quality quality filter.)
ER0304404Webhook not found.
ER0305400Invalid status. Allowed values listed in the error message.
ER0306400filters must be an object (or contains invalid filters).

Fact-Check Errors

Error CodeHTTP StatusDescription
ER0700400Provide one of the parameters: id, text, or claim.
ER0701400text must be between 100 and 10000 characters.
ER0702404Article with the provided id was not found.
ER0703502Fact-check service is temporarily unavailable. Please try again later.
ER0704400id must be a valid integer.
ER0705400claim must be between 5 and 500 characters.
ER0706403Fact-check is not available on the free plan. Please upgrade your subscription.

Query Parameter Errors

The boolean query parameter validates its input and reuses the code numbers ER0701ER0706 — but here they are always HTTP 400 with different messages (parse and validation failures), unlike the Fact-Check codes above which use 404/502/403. When a request sends query, treat these codes as query-validation errors; branch on the HTTP status and message, not the code alone.

Error CodeHTTP StatusDescription
ER0701400Query could not be parsed, is empty, is not a string, or produced no condition.
ER0702400Unknown field, or a block was used on a field other than entity.
ER0703400Query is too long, has too many predicates, or is nested too deeply.
ER0704400Unsupported syntax — regex, fuzzy (~), boost (^) and wildcard are not supported.
ER0705400A field value failed validation (invalid number, enum, date, range, coordinates, etc.).
ER0706400Range syntax is not supported for this field.
ER0710400Invalid condition inside an entity block (bad id, field, or sentiment value).
ER0711400Empty entity block .
ER0712400Malformed entity block — check pairing.